api.go 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package workspaces provides a client for Amazon WorkSpaces.
  3. package workspaces
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opCreateTags = "CreateTags"
  11. // CreateTagsRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateTags operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // See CreateTags for usage and error information.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CreateTags method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CreateTagsRequest method.
  28. // req, resp := client.CreateTagsRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *WorkSpaces) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
  36. op := &request.Operation{
  37. Name: opCreateTags,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &CreateTagsInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &CreateTagsOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // CreateTags API operation for Amazon WorkSpaces.
  50. //
  51. // Creates tags for a WorkSpace.
  52. //
  53. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  54. // with awserr.Error's Code and Message methods to get detailed information about
  55. // the error.
  56. //
  57. // See the AWS API reference guide for Amazon WorkSpaces's
  58. // API operation CreateTags for usage and error information.
  59. //
  60. // Returned Error Codes:
  61. // * ResourceNotFoundException
  62. // The resource could not be found.
  63. //
  64. // * InvalidParameterValuesException
  65. // One or more parameter values are not valid.
  66. //
  67. // * ResourceLimitExceededException
  68. // Your resource limits have been exceeded.
  69. //
  70. func (c *WorkSpaces) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
  71. req, out := c.CreateTagsRequest(input)
  72. err := req.Send()
  73. return out, err
  74. }
  75. const opCreateWorkspaces = "CreateWorkspaces"
  76. // CreateWorkspacesRequest generates a "aws/request.Request" representing the
  77. // client's request for the CreateWorkspaces operation. The "output" return
  78. // value can be used to capture response data after the request's "Send" method
  79. // is called.
  80. //
  81. // See CreateWorkspaces for usage and error information.
  82. //
  83. // Creating a request object using this method should be used when you want to inject
  84. // custom logic into the request's lifecycle using a custom handler, or if you want to
  85. // access properties on the request object before or after sending the request. If
  86. // you just want the service response, call the CreateWorkspaces method directly
  87. // instead.
  88. //
  89. // Note: You must call the "Send" method on the returned request object in order
  90. // to execute the request.
  91. //
  92. // // Example sending a request using the CreateWorkspacesRequest method.
  93. // req, resp := client.CreateWorkspacesRequest(params)
  94. //
  95. // err := req.Send()
  96. // if err == nil { // resp is now filled
  97. // fmt.Println(resp)
  98. // }
  99. //
  100. func (c *WorkSpaces) CreateWorkspacesRequest(input *CreateWorkspacesInput) (req *request.Request, output *CreateWorkspacesOutput) {
  101. op := &request.Operation{
  102. Name: opCreateWorkspaces,
  103. HTTPMethod: "POST",
  104. HTTPPath: "/",
  105. }
  106. if input == nil {
  107. input = &CreateWorkspacesInput{}
  108. }
  109. req = c.newRequest(op, input, output)
  110. output = &CreateWorkspacesOutput{}
  111. req.Data = output
  112. return
  113. }
  114. // CreateWorkspaces API operation for Amazon WorkSpaces.
  115. //
  116. // Creates one or more WorkSpaces.
  117. //
  118. // This operation is asynchronous and returns before the WorkSpaces are created.
  119. //
  120. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  121. // with awserr.Error's Code and Message methods to get detailed information about
  122. // the error.
  123. //
  124. // See the AWS API reference guide for Amazon WorkSpaces's
  125. // API operation CreateWorkspaces for usage and error information.
  126. //
  127. // Returned Error Codes:
  128. // * ResourceLimitExceededException
  129. // Your resource limits have been exceeded.
  130. //
  131. // * InvalidParameterValuesException
  132. // One or more parameter values are not valid.
  133. //
  134. func (c *WorkSpaces) CreateWorkspaces(input *CreateWorkspacesInput) (*CreateWorkspacesOutput, error) {
  135. req, out := c.CreateWorkspacesRequest(input)
  136. err := req.Send()
  137. return out, err
  138. }
  139. const opDeleteTags = "DeleteTags"
  140. // DeleteTagsRequest generates a "aws/request.Request" representing the
  141. // client's request for the DeleteTags operation. The "output" return
  142. // value can be used to capture response data after the request's "Send" method
  143. // is called.
  144. //
  145. // See DeleteTags for usage and error information.
  146. //
  147. // Creating a request object using this method should be used when you want to inject
  148. // custom logic into the request's lifecycle using a custom handler, or if you want to
  149. // access properties on the request object before or after sending the request. If
  150. // you just want the service response, call the DeleteTags method directly
  151. // instead.
  152. //
  153. // Note: You must call the "Send" method on the returned request object in order
  154. // to execute the request.
  155. //
  156. // // Example sending a request using the DeleteTagsRequest method.
  157. // req, resp := client.DeleteTagsRequest(params)
  158. //
  159. // err := req.Send()
  160. // if err == nil { // resp is now filled
  161. // fmt.Println(resp)
  162. // }
  163. //
  164. func (c *WorkSpaces) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  165. op := &request.Operation{
  166. Name: opDeleteTags,
  167. HTTPMethod: "POST",
  168. HTTPPath: "/",
  169. }
  170. if input == nil {
  171. input = &DeleteTagsInput{}
  172. }
  173. req = c.newRequest(op, input, output)
  174. output = &DeleteTagsOutput{}
  175. req.Data = output
  176. return
  177. }
  178. // DeleteTags API operation for Amazon WorkSpaces.
  179. //
  180. // Deletes tags from a WorkSpace.
  181. //
  182. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  183. // with awserr.Error's Code and Message methods to get detailed information about
  184. // the error.
  185. //
  186. // See the AWS API reference guide for Amazon WorkSpaces's
  187. // API operation DeleteTags for usage and error information.
  188. //
  189. // Returned Error Codes:
  190. // * ResourceNotFoundException
  191. // The resource could not be found.
  192. //
  193. // * InvalidParameterValuesException
  194. // One or more parameter values are not valid.
  195. //
  196. func (c *WorkSpaces) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  197. req, out := c.DeleteTagsRequest(input)
  198. err := req.Send()
  199. return out, err
  200. }
  201. const opDescribeTags = "DescribeTags"
  202. // DescribeTagsRequest generates a "aws/request.Request" representing the
  203. // client's request for the DescribeTags operation. The "output" return
  204. // value can be used to capture response data after the request's "Send" method
  205. // is called.
  206. //
  207. // See DescribeTags for usage and error information.
  208. //
  209. // Creating a request object using this method should be used when you want to inject
  210. // custom logic into the request's lifecycle using a custom handler, or if you want to
  211. // access properties on the request object before or after sending the request. If
  212. // you just want the service response, call the DescribeTags method directly
  213. // instead.
  214. //
  215. // Note: You must call the "Send" method on the returned request object in order
  216. // to execute the request.
  217. //
  218. // // Example sending a request using the DescribeTagsRequest method.
  219. // req, resp := client.DescribeTagsRequest(params)
  220. //
  221. // err := req.Send()
  222. // if err == nil { // resp is now filled
  223. // fmt.Println(resp)
  224. // }
  225. //
  226. func (c *WorkSpaces) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  227. op := &request.Operation{
  228. Name: opDescribeTags,
  229. HTTPMethod: "POST",
  230. HTTPPath: "/",
  231. }
  232. if input == nil {
  233. input = &DescribeTagsInput{}
  234. }
  235. req = c.newRequest(op, input, output)
  236. output = &DescribeTagsOutput{}
  237. req.Data = output
  238. return
  239. }
  240. // DescribeTags API operation for Amazon WorkSpaces.
  241. //
  242. // Describes tags for a WorkSpace.
  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 DescribeTags for usage and error information.
  250. //
  251. // Returned Error Codes:
  252. // * ResourceNotFoundException
  253. // The resource could not be found.
  254. //
  255. func (c *WorkSpaces) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  256. req, out := c.DescribeTagsRequest(input)
  257. err := req.Send()
  258. return out, err
  259. }
  260. const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles"
  261. // DescribeWorkspaceBundlesRequest generates a "aws/request.Request" representing the
  262. // client's request for the DescribeWorkspaceBundles operation. The "output" return
  263. // value can be used to capture response data after the request's "Send" method
  264. // is called.
  265. //
  266. // See DescribeWorkspaceBundles for usage and error information.
  267. //
  268. // Creating a request object using this method should be used when you want to inject
  269. // custom logic into the request's lifecycle using a custom handler, or if you want to
  270. // access properties on the request object before or after sending the request. If
  271. // you just want the service response, call the DescribeWorkspaceBundles method directly
  272. // instead.
  273. //
  274. // Note: You must call the "Send" method on the returned request object in order
  275. // to execute the request.
  276. //
  277. // // Example sending a request using the DescribeWorkspaceBundlesRequest method.
  278. // req, resp := client.DescribeWorkspaceBundlesRequest(params)
  279. //
  280. // err := req.Send()
  281. // if err == nil { // resp is now filled
  282. // fmt.Println(resp)
  283. // }
  284. //
  285. func (c *WorkSpaces) DescribeWorkspaceBundlesRequest(input *DescribeWorkspaceBundlesInput) (req *request.Request, output *DescribeWorkspaceBundlesOutput) {
  286. op := &request.Operation{
  287. Name: opDescribeWorkspaceBundles,
  288. HTTPMethod: "POST",
  289. HTTPPath: "/",
  290. Paginator: &request.Paginator{
  291. InputTokens: []string{"NextToken"},
  292. OutputTokens: []string{"NextToken"},
  293. LimitToken: "",
  294. TruncationToken: "",
  295. },
  296. }
  297. if input == nil {
  298. input = &DescribeWorkspaceBundlesInput{}
  299. }
  300. req = c.newRequest(op, input, output)
  301. output = &DescribeWorkspaceBundlesOutput{}
  302. req.Data = output
  303. return
  304. }
  305. // DescribeWorkspaceBundles API operation for Amazon WorkSpaces.
  306. //
  307. // Obtains information about the WorkSpace bundles that are available to your
  308. // account in the specified region.
  309. //
  310. // You can filter the results with either the BundleIds parameter, or the Owner
  311. // parameter, but not both.
  312. //
  313. // This operation supports pagination with the use of the NextToken request
  314. // and response parameters. If more results are available, the NextToken response
  315. // member contains a token that you pass in the next call to this operation
  316. // to retrieve the next set of items.
  317. //
  318. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  319. // with awserr.Error's Code and Message methods to get detailed information about
  320. // the error.
  321. //
  322. // See the AWS API reference guide for Amazon WorkSpaces's
  323. // API operation DescribeWorkspaceBundles for usage and error information.
  324. //
  325. // Returned Error Codes:
  326. // * InvalidParameterValuesException
  327. // One or more parameter values are not valid.
  328. //
  329. func (c *WorkSpaces) DescribeWorkspaceBundles(input *DescribeWorkspaceBundlesInput) (*DescribeWorkspaceBundlesOutput, error) {
  330. req, out := c.DescribeWorkspaceBundlesRequest(input)
  331. err := req.Send()
  332. return out, err
  333. }
  334. // DescribeWorkspaceBundlesPages iterates over the pages of a DescribeWorkspaceBundles operation,
  335. // calling the "fn" function with the response data for each page. To stop
  336. // iterating, return false from the fn function.
  337. //
  338. // See DescribeWorkspaceBundles method for more information on how to use this operation.
  339. //
  340. // Note: This operation can generate multiple requests to a service.
  341. //
  342. // // Example iterating over at most 3 pages of a DescribeWorkspaceBundles operation.
  343. // pageNum := 0
  344. // err := client.DescribeWorkspaceBundlesPages(params,
  345. // func(page *DescribeWorkspaceBundlesOutput, lastPage bool) bool {
  346. // pageNum++
  347. // fmt.Println(page)
  348. // return pageNum <= 3
  349. // })
  350. //
  351. func (c *WorkSpaces) DescribeWorkspaceBundlesPages(input *DescribeWorkspaceBundlesInput, fn func(p *DescribeWorkspaceBundlesOutput, lastPage bool) (shouldContinue bool)) error {
  352. page, _ := c.DescribeWorkspaceBundlesRequest(input)
  353. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  354. return page.EachPage(func(p interface{}, lastPage bool) bool {
  355. return fn(p.(*DescribeWorkspaceBundlesOutput), lastPage)
  356. })
  357. }
  358. const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories"
  359. // DescribeWorkspaceDirectoriesRequest generates a "aws/request.Request" representing the
  360. // client's request for the DescribeWorkspaceDirectories operation. The "output" return
  361. // value can be used to capture response data after the request's "Send" method
  362. // is called.
  363. //
  364. // See DescribeWorkspaceDirectories for usage and error information.
  365. //
  366. // Creating a request object using this method should be used when you want to inject
  367. // custom logic into the request's lifecycle using a custom handler, or if you want to
  368. // access properties on the request object before or after sending the request. If
  369. // you just want the service response, call the DescribeWorkspaceDirectories method directly
  370. // instead.
  371. //
  372. // Note: You must call the "Send" method on the returned request object in order
  373. // to execute the request.
  374. //
  375. // // Example sending a request using the DescribeWorkspaceDirectoriesRequest method.
  376. // req, resp := client.DescribeWorkspaceDirectoriesRequest(params)
  377. //
  378. // err := req.Send()
  379. // if err == nil { // resp is now filled
  380. // fmt.Println(resp)
  381. // }
  382. //
  383. func (c *WorkSpaces) DescribeWorkspaceDirectoriesRequest(input *DescribeWorkspaceDirectoriesInput) (req *request.Request, output *DescribeWorkspaceDirectoriesOutput) {
  384. op := &request.Operation{
  385. Name: opDescribeWorkspaceDirectories,
  386. HTTPMethod: "POST",
  387. HTTPPath: "/",
  388. Paginator: &request.Paginator{
  389. InputTokens: []string{"NextToken"},
  390. OutputTokens: []string{"NextToken"},
  391. LimitToken: "",
  392. TruncationToken: "",
  393. },
  394. }
  395. if input == nil {
  396. input = &DescribeWorkspaceDirectoriesInput{}
  397. }
  398. req = c.newRequest(op, input, output)
  399. output = &DescribeWorkspaceDirectoriesOutput{}
  400. req.Data = output
  401. return
  402. }
  403. // DescribeWorkspaceDirectories API operation for Amazon WorkSpaces.
  404. //
  405. // Retrieves information about the AWS Directory Service directories in the
  406. // region that are registered with Amazon WorkSpaces and are available to your
  407. // account.
  408. //
  409. // This operation supports pagination with the use of the NextToken request
  410. // and response parameters. If more results are available, the NextToken response
  411. // member contains a token that you pass in the next call to this operation
  412. // to retrieve the next set of items.
  413. //
  414. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  415. // with awserr.Error's Code and Message methods to get detailed information about
  416. // the error.
  417. //
  418. // See the AWS API reference guide for Amazon WorkSpaces's
  419. // API operation DescribeWorkspaceDirectories for usage and error information.
  420. //
  421. // Returned Error Codes:
  422. // * InvalidParameterValuesException
  423. // One or more parameter values are not valid.
  424. //
  425. func (c *WorkSpaces) DescribeWorkspaceDirectories(input *DescribeWorkspaceDirectoriesInput) (*DescribeWorkspaceDirectoriesOutput, error) {
  426. req, out := c.DescribeWorkspaceDirectoriesRequest(input)
  427. err := req.Send()
  428. return out, err
  429. }
  430. // DescribeWorkspaceDirectoriesPages iterates over the pages of a DescribeWorkspaceDirectories operation,
  431. // calling the "fn" function with the response data for each page. To stop
  432. // iterating, return false from the fn function.
  433. //
  434. // See DescribeWorkspaceDirectories method for more information on how to use this operation.
  435. //
  436. // Note: This operation can generate multiple requests to a service.
  437. //
  438. // // Example iterating over at most 3 pages of a DescribeWorkspaceDirectories operation.
  439. // pageNum := 0
  440. // err := client.DescribeWorkspaceDirectoriesPages(params,
  441. // func(page *DescribeWorkspaceDirectoriesOutput, lastPage bool) bool {
  442. // pageNum++
  443. // fmt.Println(page)
  444. // return pageNum <= 3
  445. // })
  446. //
  447. func (c *WorkSpaces) DescribeWorkspaceDirectoriesPages(input *DescribeWorkspaceDirectoriesInput, fn func(p *DescribeWorkspaceDirectoriesOutput, lastPage bool) (shouldContinue bool)) error {
  448. page, _ := c.DescribeWorkspaceDirectoriesRequest(input)
  449. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  450. return page.EachPage(func(p interface{}, lastPage bool) bool {
  451. return fn(p.(*DescribeWorkspaceDirectoriesOutput), lastPage)
  452. })
  453. }
  454. const opDescribeWorkspaces = "DescribeWorkspaces"
  455. // DescribeWorkspacesRequest generates a "aws/request.Request" representing the
  456. // client's request for the DescribeWorkspaces operation. The "output" return
  457. // value can be used to capture response data after the request's "Send" method
  458. // is called.
  459. //
  460. // See DescribeWorkspaces for usage and error information.
  461. //
  462. // Creating a request object using this method should be used when you want to inject
  463. // custom logic into the request's lifecycle using a custom handler, or if you want to
  464. // access properties on the request object before or after sending the request. If
  465. // you just want the service response, call the DescribeWorkspaces method directly
  466. // instead.
  467. //
  468. // Note: You must call the "Send" method on the returned request object in order
  469. // to execute the request.
  470. //
  471. // // Example sending a request using the DescribeWorkspacesRequest method.
  472. // req, resp := client.DescribeWorkspacesRequest(params)
  473. //
  474. // err := req.Send()
  475. // if err == nil { // resp is now filled
  476. // fmt.Println(resp)
  477. // }
  478. //
  479. func (c *WorkSpaces) DescribeWorkspacesRequest(input *DescribeWorkspacesInput) (req *request.Request, output *DescribeWorkspacesOutput) {
  480. op := &request.Operation{
  481. Name: opDescribeWorkspaces,
  482. HTTPMethod: "POST",
  483. HTTPPath: "/",
  484. Paginator: &request.Paginator{
  485. InputTokens: []string{"NextToken"},
  486. OutputTokens: []string{"NextToken"},
  487. LimitToken: "Limit",
  488. TruncationToken: "",
  489. },
  490. }
  491. if input == nil {
  492. input = &DescribeWorkspacesInput{}
  493. }
  494. req = c.newRequest(op, input, output)
  495. output = &DescribeWorkspacesOutput{}
  496. req.Data = output
  497. return
  498. }
  499. // DescribeWorkspaces API operation for Amazon WorkSpaces.
  500. //
  501. // Obtains information about the specified WorkSpaces.
  502. //
  503. // Only one of the filter parameters, such as BundleId, DirectoryId, or WorkspaceIds,
  504. // can be specified at a time.
  505. //
  506. // This operation supports pagination with the use of the NextToken request
  507. // and response parameters. If more results are available, the NextToken response
  508. // member contains a token that you pass in the next call to this operation
  509. // to retrieve the next set of items.
  510. //
  511. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  512. // with awserr.Error's Code and Message methods to get detailed information about
  513. // the error.
  514. //
  515. // See the AWS API reference guide for Amazon WorkSpaces's
  516. // API operation DescribeWorkspaces for usage and error information.
  517. //
  518. // Returned Error Codes:
  519. // * InvalidParameterValuesException
  520. // One or more parameter values are not valid.
  521. //
  522. // * ResourceUnavailableException
  523. // The specified resource is not available.
  524. //
  525. func (c *WorkSpaces) DescribeWorkspaces(input *DescribeWorkspacesInput) (*DescribeWorkspacesOutput, error) {
  526. req, out := c.DescribeWorkspacesRequest(input)
  527. err := req.Send()
  528. return out, err
  529. }
  530. // DescribeWorkspacesPages iterates over the pages of a DescribeWorkspaces operation,
  531. // calling the "fn" function with the response data for each page. To stop
  532. // iterating, return false from the fn function.
  533. //
  534. // See DescribeWorkspaces method for more information on how to use this operation.
  535. //
  536. // Note: This operation can generate multiple requests to a service.
  537. //
  538. // // Example iterating over at most 3 pages of a DescribeWorkspaces operation.
  539. // pageNum := 0
  540. // err := client.DescribeWorkspacesPages(params,
  541. // func(page *DescribeWorkspacesOutput, lastPage bool) bool {
  542. // pageNum++
  543. // fmt.Println(page)
  544. // return pageNum <= 3
  545. // })
  546. //
  547. func (c *WorkSpaces) DescribeWorkspacesPages(input *DescribeWorkspacesInput, fn func(p *DescribeWorkspacesOutput, lastPage bool) (shouldContinue bool)) error {
  548. page, _ := c.DescribeWorkspacesRequest(input)
  549. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  550. return page.EachPage(func(p interface{}, lastPage bool) bool {
  551. return fn(p.(*DescribeWorkspacesOutput), lastPage)
  552. })
  553. }
  554. const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus"
  555. // DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the
  556. // client's request for the DescribeWorkspacesConnectionStatus operation. The "output" return
  557. // value can be used to capture response data after the request's "Send" method
  558. // is called.
  559. //
  560. // See DescribeWorkspacesConnectionStatus for usage and error information.
  561. //
  562. // Creating a request object using this method should be used when you want to inject
  563. // custom logic into the request's lifecycle using a custom handler, or if you want to
  564. // access properties on the request object before or after sending the request. If
  565. // you just want the service response, call the DescribeWorkspacesConnectionStatus method directly
  566. // instead.
  567. //
  568. // Note: You must call the "Send" method on the returned request object in order
  569. // to execute the request.
  570. //
  571. // // Example sending a request using the DescribeWorkspacesConnectionStatusRequest method.
  572. // req, resp := client.DescribeWorkspacesConnectionStatusRequest(params)
  573. //
  574. // err := req.Send()
  575. // if err == nil { // resp is now filled
  576. // fmt.Println(resp)
  577. // }
  578. //
  579. func (c *WorkSpaces) DescribeWorkspacesConnectionStatusRequest(input *DescribeWorkspacesConnectionStatusInput) (req *request.Request, output *DescribeWorkspacesConnectionStatusOutput) {
  580. op := &request.Operation{
  581. Name: opDescribeWorkspacesConnectionStatus,
  582. HTTPMethod: "POST",
  583. HTTPPath: "/",
  584. }
  585. if input == nil {
  586. input = &DescribeWorkspacesConnectionStatusInput{}
  587. }
  588. req = c.newRequest(op, input, output)
  589. output = &DescribeWorkspacesConnectionStatusOutput{}
  590. req.Data = output
  591. return
  592. }
  593. // DescribeWorkspacesConnectionStatus API operation for Amazon WorkSpaces.
  594. //
  595. // Describes the connection status of a specified WorkSpace.
  596. //
  597. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  598. // with awserr.Error's Code and Message methods to get detailed information about
  599. // the error.
  600. //
  601. // See the AWS API reference guide for Amazon WorkSpaces's
  602. // API operation DescribeWorkspacesConnectionStatus for usage and error information.
  603. //
  604. // Returned Error Codes:
  605. // * InvalidParameterValuesException
  606. // One or more parameter values are not valid.
  607. //
  608. func (c *WorkSpaces) DescribeWorkspacesConnectionStatus(input *DescribeWorkspacesConnectionStatusInput) (*DescribeWorkspacesConnectionStatusOutput, error) {
  609. req, out := c.DescribeWorkspacesConnectionStatusRequest(input)
  610. err := req.Send()
  611. return out, err
  612. }
  613. const opModifyWorkspaceProperties = "ModifyWorkspaceProperties"
  614. // ModifyWorkspacePropertiesRequest generates a "aws/request.Request" representing the
  615. // client's request for the ModifyWorkspaceProperties operation. The "output" return
  616. // value can be used to capture response data after the request's "Send" method
  617. // is called.
  618. //
  619. // See ModifyWorkspaceProperties for usage and error information.
  620. //
  621. // Creating a request object using this method should be used when you want to inject
  622. // custom logic into the request's lifecycle using a custom handler, or if you want to
  623. // access properties on the request object before or after sending the request. If
  624. // you just want the service response, call the ModifyWorkspaceProperties method directly
  625. // instead.
  626. //
  627. // Note: You must call the "Send" method on the returned request object in order
  628. // to execute the request.
  629. //
  630. // // Example sending a request using the ModifyWorkspacePropertiesRequest method.
  631. // req, resp := client.ModifyWorkspacePropertiesRequest(params)
  632. //
  633. // err := req.Send()
  634. // if err == nil { // resp is now filled
  635. // fmt.Println(resp)
  636. // }
  637. //
  638. func (c *WorkSpaces) ModifyWorkspacePropertiesRequest(input *ModifyWorkspacePropertiesInput) (req *request.Request, output *ModifyWorkspacePropertiesOutput) {
  639. op := &request.Operation{
  640. Name: opModifyWorkspaceProperties,
  641. HTTPMethod: "POST",
  642. HTTPPath: "/",
  643. }
  644. if input == nil {
  645. input = &ModifyWorkspacePropertiesInput{}
  646. }
  647. req = c.newRequest(op, input, output)
  648. output = &ModifyWorkspacePropertiesOutput{}
  649. req.Data = output
  650. return
  651. }
  652. // ModifyWorkspaceProperties API operation for Amazon WorkSpaces.
  653. //
  654. // Modifies the WorkSpace properties, including the RunningMode and AutoStop
  655. // time.
  656. //
  657. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  658. // with awserr.Error's Code and Message methods to get detailed information about
  659. // the error.
  660. //
  661. // See the AWS API reference guide for Amazon WorkSpaces's
  662. // API operation ModifyWorkspaceProperties for usage and error information.
  663. //
  664. // Returned Error Codes:
  665. // * InvalidParameterValuesException
  666. // One or more parameter values are not valid.
  667. //
  668. // * InvalidResourceStateException
  669. // The specified WorkSpace has an invalid state for this operation.
  670. //
  671. // * OperationInProgressException
  672. // The properties of this WorkSpace are currently being modified. Try again
  673. // in a moment.
  674. //
  675. // * UnsupportedWorkspaceConfigurationException
  676. // The WorkSpace does not have the supported configuration for this operation.
  677. // For more information, see the Amazon WorkSpaces Administration Guide (http://docs.aws.amazon.com/workspaces/latest/adminguide).
  678. //
  679. // * ResourceNotFoundException
  680. // The resource could not be found.
  681. //
  682. // * AccessDeniedException
  683. //
  684. // * ResourceUnavailableException
  685. // The specified resource is not available.
  686. //
  687. func (c *WorkSpaces) ModifyWorkspaceProperties(input *ModifyWorkspacePropertiesInput) (*ModifyWorkspacePropertiesOutput, error) {
  688. req, out := c.ModifyWorkspacePropertiesRequest(input)
  689. err := req.Send()
  690. return out, err
  691. }
  692. const opRebootWorkspaces = "RebootWorkspaces"
  693. // RebootWorkspacesRequest generates a "aws/request.Request" representing the
  694. // client's request for the RebootWorkspaces operation. The "output" return
  695. // value can be used to capture response data after the request's "Send" method
  696. // is called.
  697. //
  698. // See RebootWorkspaces for usage and error information.
  699. //
  700. // Creating a request object using this method should be used when you want to inject
  701. // custom logic into the request's lifecycle using a custom handler, or if you want to
  702. // access properties on the request object before or after sending the request. If
  703. // you just want the service response, call the RebootWorkspaces method directly
  704. // instead.
  705. //
  706. // Note: You must call the "Send" method on the returned request object in order
  707. // to execute the request.
  708. //
  709. // // Example sending a request using the RebootWorkspacesRequest method.
  710. // req, resp := client.RebootWorkspacesRequest(params)
  711. //
  712. // err := req.Send()
  713. // if err == nil { // resp is now filled
  714. // fmt.Println(resp)
  715. // }
  716. //
  717. func (c *WorkSpaces) RebootWorkspacesRequest(input *RebootWorkspacesInput) (req *request.Request, output *RebootWorkspacesOutput) {
  718. op := &request.Operation{
  719. Name: opRebootWorkspaces,
  720. HTTPMethod: "POST",
  721. HTTPPath: "/",
  722. }
  723. if input == nil {
  724. input = &RebootWorkspacesInput{}
  725. }
  726. req = c.newRequest(op, input, output)
  727. output = &RebootWorkspacesOutput{}
  728. req.Data = output
  729. return
  730. }
  731. // RebootWorkspaces API operation for Amazon WorkSpaces.
  732. //
  733. // Reboots the specified WorkSpaces.
  734. //
  735. // To be able to reboot a WorkSpace, the WorkSpace must have a State of AVAILABLE,
  736. // IMPAIRED, or INOPERABLE.
  737. //
  738. // This operation is asynchronous and returns before the WorkSpaces have rebooted.
  739. //
  740. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  741. // with awserr.Error's Code and Message methods to get detailed information about
  742. // the error.
  743. //
  744. // See the AWS API reference guide for Amazon WorkSpaces's
  745. // API operation RebootWorkspaces for usage and error information.
  746. func (c *WorkSpaces) RebootWorkspaces(input *RebootWorkspacesInput) (*RebootWorkspacesOutput, error) {
  747. req, out := c.RebootWorkspacesRequest(input)
  748. err := req.Send()
  749. return out, err
  750. }
  751. const opRebuildWorkspaces = "RebuildWorkspaces"
  752. // RebuildWorkspacesRequest generates a "aws/request.Request" representing the
  753. // client's request for the RebuildWorkspaces operation. The "output" return
  754. // value can be used to capture response data after the request's "Send" method
  755. // is called.
  756. //
  757. // See RebuildWorkspaces for usage and error information.
  758. //
  759. // Creating a request object using this method should be used when you want to inject
  760. // custom logic into the request's lifecycle using a custom handler, or if you want to
  761. // access properties on the request object before or after sending the request. If
  762. // you just want the service response, call the RebuildWorkspaces method directly
  763. // instead.
  764. //
  765. // Note: You must call the "Send" method on the returned request object in order
  766. // to execute the request.
  767. //
  768. // // Example sending a request using the RebuildWorkspacesRequest method.
  769. // req, resp := client.RebuildWorkspacesRequest(params)
  770. //
  771. // err := req.Send()
  772. // if err == nil { // resp is now filled
  773. // fmt.Println(resp)
  774. // }
  775. //
  776. func (c *WorkSpaces) RebuildWorkspacesRequest(input *RebuildWorkspacesInput) (req *request.Request, output *RebuildWorkspacesOutput) {
  777. op := &request.Operation{
  778. Name: opRebuildWorkspaces,
  779. HTTPMethod: "POST",
  780. HTTPPath: "/",
  781. }
  782. if input == nil {
  783. input = &RebuildWorkspacesInput{}
  784. }
  785. req = c.newRequest(op, input, output)
  786. output = &RebuildWorkspacesOutput{}
  787. req.Data = output
  788. return
  789. }
  790. // RebuildWorkspaces API operation for Amazon WorkSpaces.
  791. //
  792. // Rebuilds the specified WorkSpaces.
  793. //
  794. // Rebuilding a WorkSpace is a potentially destructive action that can result
  795. // in the loss of data. Rebuilding a WorkSpace causes the following to occur:
  796. //
  797. // * The system is restored to the image of the bundle that the WorkSpace
  798. // is created from. Any applications that have been installed, or system
  799. // settings that have been made since the WorkSpace was created will be lost.
  800. //
  801. // * The data drive (D drive) is re-created from the last automatic snapshot
  802. // taken of the data drive. The current contents of the data drive are overwritten.
  803. // Automatic snapshots of the data drive are taken every 12 hours, so the
  804. // snapshot can be as much as 12 hours old.
  805. //
  806. // To be able to rebuild a WorkSpace, the WorkSpace must have a State of AVAILABLE
  807. // or ERROR.
  808. //
  809. // This operation is asynchronous and returns before the WorkSpaces have been
  810. // completely rebuilt.
  811. //
  812. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  813. // with awserr.Error's Code and Message methods to get detailed information about
  814. // the error.
  815. //
  816. // See the AWS API reference guide for Amazon WorkSpaces's
  817. // API operation RebuildWorkspaces for usage and error information.
  818. func (c *WorkSpaces) RebuildWorkspaces(input *RebuildWorkspacesInput) (*RebuildWorkspacesOutput, error) {
  819. req, out := c.RebuildWorkspacesRequest(input)
  820. err := req.Send()
  821. return out, err
  822. }
  823. const opStartWorkspaces = "StartWorkspaces"
  824. // StartWorkspacesRequest generates a "aws/request.Request" representing the
  825. // client's request for the StartWorkspaces operation. The "output" return
  826. // value can be used to capture response data after the request's "Send" method
  827. // is called.
  828. //
  829. // See StartWorkspaces for usage and error information.
  830. //
  831. // Creating a request object using this method should be used when you want to inject
  832. // custom logic into the request's lifecycle using a custom handler, or if you want to
  833. // access properties on the request object before or after sending the request. If
  834. // you just want the service response, call the StartWorkspaces method directly
  835. // instead.
  836. //
  837. // Note: You must call the "Send" method on the returned request object in order
  838. // to execute the request.
  839. //
  840. // // Example sending a request using the StartWorkspacesRequest method.
  841. // req, resp := client.StartWorkspacesRequest(params)
  842. //
  843. // err := req.Send()
  844. // if err == nil { // resp is now filled
  845. // fmt.Println(resp)
  846. // }
  847. //
  848. func (c *WorkSpaces) StartWorkspacesRequest(input *StartWorkspacesInput) (req *request.Request, output *StartWorkspacesOutput) {
  849. op := &request.Operation{
  850. Name: opStartWorkspaces,
  851. HTTPMethod: "POST",
  852. HTTPPath: "/",
  853. }
  854. if input == nil {
  855. input = &StartWorkspacesInput{}
  856. }
  857. req = c.newRequest(op, input, output)
  858. output = &StartWorkspacesOutput{}
  859. req.Data = output
  860. return
  861. }
  862. // StartWorkspaces API operation for Amazon WorkSpaces.
  863. //
  864. // Starts the specified WorkSpaces. The API only works with WorkSpaces that
  865. // have RunningMode configured as AutoStop and the State set to “STOPPED.”
  866. //
  867. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  868. // with awserr.Error's Code and Message methods to get detailed information about
  869. // the error.
  870. //
  871. // See the AWS API reference guide for Amazon WorkSpaces's
  872. // API operation StartWorkspaces for usage and error information.
  873. func (c *WorkSpaces) StartWorkspaces(input *StartWorkspacesInput) (*StartWorkspacesOutput, error) {
  874. req, out := c.StartWorkspacesRequest(input)
  875. err := req.Send()
  876. return out, err
  877. }
  878. const opStopWorkspaces = "StopWorkspaces"
  879. // StopWorkspacesRequest generates a "aws/request.Request" representing the
  880. // client's request for the StopWorkspaces operation. The "output" return
  881. // value can be used to capture response data after the request's "Send" method
  882. // is called.
  883. //
  884. // See StopWorkspaces for usage and error information.
  885. //
  886. // Creating a request object using this method should be used when you want to inject
  887. // custom logic into the request's lifecycle using a custom handler, or if you want to
  888. // access properties on the request object before or after sending the request. If
  889. // you just want the service response, call the StopWorkspaces method directly
  890. // instead.
  891. //
  892. // Note: You must call the "Send" method on the returned request object in order
  893. // to execute the request.
  894. //
  895. // // Example sending a request using the StopWorkspacesRequest method.
  896. // req, resp := client.StopWorkspacesRequest(params)
  897. //
  898. // err := req.Send()
  899. // if err == nil { // resp is now filled
  900. // fmt.Println(resp)
  901. // }
  902. //
  903. func (c *WorkSpaces) StopWorkspacesRequest(input *StopWorkspacesInput) (req *request.Request, output *StopWorkspacesOutput) {
  904. op := &request.Operation{
  905. Name: opStopWorkspaces,
  906. HTTPMethod: "POST",
  907. HTTPPath: "/",
  908. }
  909. if input == nil {
  910. input = &StopWorkspacesInput{}
  911. }
  912. req = c.newRequest(op, input, output)
  913. output = &StopWorkspacesOutput{}
  914. req.Data = output
  915. return
  916. }
  917. // StopWorkspaces API operation for Amazon WorkSpaces.
  918. //
  919. // Stops the specified WorkSpaces. The API only works with WorkSpaces that have
  920. // RunningMode configured as AutoStop and the State set to AVAILABLE, IMPAIRED,
  921. // UNHEALTHY, or ERROR.
  922. //
  923. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  924. // with awserr.Error's Code and Message methods to get detailed information about
  925. // the error.
  926. //
  927. // See the AWS API reference guide for Amazon WorkSpaces's
  928. // API operation StopWorkspaces for usage and error information.
  929. func (c *WorkSpaces) StopWorkspaces(input *StopWorkspacesInput) (*StopWorkspacesOutput, error) {
  930. req, out := c.StopWorkspacesRequest(input)
  931. err := req.Send()
  932. return out, err
  933. }
  934. const opTerminateWorkspaces = "TerminateWorkspaces"
  935. // TerminateWorkspacesRequest generates a "aws/request.Request" representing the
  936. // client's request for the TerminateWorkspaces operation. The "output" return
  937. // value can be used to capture response data after the request's "Send" method
  938. // is called.
  939. //
  940. // See TerminateWorkspaces for usage and error information.
  941. //
  942. // Creating a request object using this method should be used when you want to inject
  943. // custom logic into the request's lifecycle using a custom handler, or if you want to
  944. // access properties on the request object before or after sending the request. If
  945. // you just want the service response, call the TerminateWorkspaces method directly
  946. // instead.
  947. //
  948. // Note: You must call the "Send" method on the returned request object in order
  949. // to execute the request.
  950. //
  951. // // Example sending a request using the TerminateWorkspacesRequest method.
  952. // req, resp := client.TerminateWorkspacesRequest(params)
  953. //
  954. // err := req.Send()
  955. // if err == nil { // resp is now filled
  956. // fmt.Println(resp)
  957. // }
  958. //
  959. func (c *WorkSpaces) TerminateWorkspacesRequest(input *TerminateWorkspacesInput) (req *request.Request, output *TerminateWorkspacesOutput) {
  960. op := &request.Operation{
  961. Name: opTerminateWorkspaces,
  962. HTTPMethod: "POST",
  963. HTTPPath: "/",
  964. }
  965. if input == nil {
  966. input = &TerminateWorkspacesInput{}
  967. }
  968. req = c.newRequest(op, input, output)
  969. output = &TerminateWorkspacesOutput{}
  970. req.Data = output
  971. return
  972. }
  973. // TerminateWorkspaces API operation for Amazon WorkSpaces.
  974. //
  975. // Terminates the specified WorkSpaces.
  976. //
  977. // Terminating a WorkSpace is a permanent action and cannot be undone. The user's
  978. // data is not maintained and will be destroyed. If you need to archive any
  979. // user data, contact Amazon Web Services before terminating the WorkSpace.
  980. //
  981. // You can terminate a WorkSpace that is in any state except SUSPENDED.
  982. //
  983. // This operation is asynchronous and returns before the WorkSpaces have been
  984. // completely terminated.
  985. //
  986. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  987. // with awserr.Error's Code and Message methods to get detailed information about
  988. // the error.
  989. //
  990. // See the AWS API reference guide for Amazon WorkSpaces's
  991. // API operation TerminateWorkspaces for usage and error information.
  992. func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) {
  993. req, out := c.TerminateWorkspacesRequest(input)
  994. err := req.Send()
  995. return out, err
  996. }
  997. // Contains information about the compute type of a WorkSpace bundle.
  998. type ComputeType struct {
  999. _ struct{} `type:"structure"`
  1000. // The name of the compute type for the bundle.
  1001. Name *string `type:"string" enum:"Compute"`
  1002. }
  1003. // String returns the string representation
  1004. func (s ComputeType) String() string {
  1005. return awsutil.Prettify(s)
  1006. }
  1007. // GoString returns the string representation
  1008. func (s ComputeType) GoString() string {
  1009. return s.String()
  1010. }
  1011. // The request of the CreateTags operation.
  1012. type CreateTagsInput struct {
  1013. _ struct{} `type:"structure"`
  1014. // The resource ID of the request.
  1015. //
  1016. // ResourceId is a required field
  1017. ResourceId *string `min:"1" type:"string" required:"true"`
  1018. // The tags of the request.
  1019. //
  1020. // Tags is a required field
  1021. Tags []*Tag `type:"list" required:"true"`
  1022. }
  1023. // String returns the string representation
  1024. func (s CreateTagsInput) String() string {
  1025. return awsutil.Prettify(s)
  1026. }
  1027. // GoString returns the string representation
  1028. func (s CreateTagsInput) GoString() string {
  1029. return s.String()
  1030. }
  1031. // Validate inspects the fields of the type to determine if they are valid.
  1032. func (s *CreateTagsInput) Validate() error {
  1033. invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"}
  1034. if s.ResourceId == nil {
  1035. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1036. }
  1037. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  1038. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  1039. }
  1040. if s.Tags == nil {
  1041. invalidParams.Add(request.NewErrParamRequired("Tags"))
  1042. }
  1043. if s.Tags != nil {
  1044. for i, v := range s.Tags {
  1045. if v == nil {
  1046. continue
  1047. }
  1048. if err := v.Validate(); err != nil {
  1049. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  1050. }
  1051. }
  1052. }
  1053. if invalidParams.Len() > 0 {
  1054. return invalidParams
  1055. }
  1056. return nil
  1057. }
  1058. // The result of the CreateTags operation.
  1059. type CreateTagsOutput struct {
  1060. _ struct{} `type:"structure"`
  1061. }
  1062. // String returns the string representation
  1063. func (s CreateTagsOutput) String() string {
  1064. return awsutil.Prettify(s)
  1065. }
  1066. // GoString returns the string representation
  1067. func (s CreateTagsOutput) GoString() string {
  1068. return s.String()
  1069. }
  1070. // Contains the inputs for the CreateWorkspaces operation.
  1071. type CreateWorkspacesInput struct {
  1072. _ struct{} `type:"structure"`
  1073. // An array of structures that specify the WorkSpaces to create.
  1074. //
  1075. // Workspaces is a required field
  1076. Workspaces []*WorkspaceRequest `min:"1" type:"list" required:"true"`
  1077. }
  1078. // String returns the string representation
  1079. func (s CreateWorkspacesInput) String() string {
  1080. return awsutil.Prettify(s)
  1081. }
  1082. // GoString returns the string representation
  1083. func (s CreateWorkspacesInput) GoString() string {
  1084. return s.String()
  1085. }
  1086. // Validate inspects the fields of the type to determine if they are valid.
  1087. func (s *CreateWorkspacesInput) Validate() error {
  1088. invalidParams := request.ErrInvalidParams{Context: "CreateWorkspacesInput"}
  1089. if s.Workspaces == nil {
  1090. invalidParams.Add(request.NewErrParamRequired("Workspaces"))
  1091. }
  1092. if s.Workspaces != nil && len(s.Workspaces) < 1 {
  1093. invalidParams.Add(request.NewErrParamMinLen("Workspaces", 1))
  1094. }
  1095. if s.Workspaces != nil {
  1096. for i, v := range s.Workspaces {
  1097. if v == nil {
  1098. continue
  1099. }
  1100. if err := v.Validate(); err != nil {
  1101. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Workspaces", i), err.(request.ErrInvalidParams))
  1102. }
  1103. }
  1104. }
  1105. if invalidParams.Len() > 0 {
  1106. return invalidParams
  1107. }
  1108. return nil
  1109. }
  1110. // Contains the result of the CreateWorkspaces operation.
  1111. type CreateWorkspacesOutput struct {
  1112. _ struct{} `type:"structure"`
  1113. // An array of structures that represent the WorkSpaces that could not be created.
  1114. FailedRequests []*FailedCreateWorkspaceRequest `type:"list"`
  1115. // An array of structures that represent the WorkSpaces that were created.
  1116. //
  1117. // Because this operation is asynchronous, the identifier in WorkspaceId is
  1118. // not immediately available. If you immediately call DescribeWorkspaces with
  1119. // this identifier, no information will be returned.
  1120. PendingRequests []*Workspace `type:"list"`
  1121. }
  1122. // String returns the string representation
  1123. func (s CreateWorkspacesOutput) String() string {
  1124. return awsutil.Prettify(s)
  1125. }
  1126. // GoString returns the string representation
  1127. func (s CreateWorkspacesOutput) GoString() string {
  1128. return s.String()
  1129. }
  1130. // Contains default WorkSpace creation information.
  1131. type DefaultWorkspaceCreationProperties struct {
  1132. _ struct{} `type:"structure"`
  1133. // The identifier of any custom security groups that are applied to the WorkSpaces
  1134. // when they are created.
  1135. CustomSecurityGroupId *string `type:"string"`
  1136. // The organizational unit (OU) in the directory that the WorkSpace machine
  1137. // accounts are placed in.
  1138. DefaultOu *string `type:"string"`
  1139. // A public IP address will be attached to all WorkSpaces that are created or
  1140. // rebuilt.
  1141. EnableInternetAccess *bool `type:"boolean"`
  1142. // Specifies if the directory is enabled for Amazon WorkDocs.
  1143. EnableWorkDocs *bool `type:"boolean"`
  1144. // The WorkSpace user is an administrator on the WorkSpace.
  1145. UserEnabledAsLocalAdministrator *bool `type:"boolean"`
  1146. }
  1147. // String returns the string representation
  1148. func (s DefaultWorkspaceCreationProperties) String() string {
  1149. return awsutil.Prettify(s)
  1150. }
  1151. // GoString returns the string representation
  1152. func (s DefaultWorkspaceCreationProperties) GoString() string {
  1153. return s.String()
  1154. }
  1155. // The request of the DeleteTags operation.
  1156. type DeleteTagsInput struct {
  1157. _ struct{} `type:"structure"`
  1158. // The resource ID of the request.
  1159. //
  1160. // ResourceId is a required field
  1161. ResourceId *string `min:"1" type:"string" required:"true"`
  1162. // The tag keys of the request.
  1163. //
  1164. // TagKeys is a required field
  1165. TagKeys []*string `type:"list" required:"true"`
  1166. }
  1167. // String returns the string representation
  1168. func (s DeleteTagsInput) String() string {
  1169. return awsutil.Prettify(s)
  1170. }
  1171. // GoString returns the string representation
  1172. func (s DeleteTagsInput) GoString() string {
  1173. return s.String()
  1174. }
  1175. // Validate inspects the fields of the type to determine if they are valid.
  1176. func (s *DeleteTagsInput) Validate() error {
  1177. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  1178. if s.ResourceId == nil {
  1179. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1180. }
  1181. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  1182. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  1183. }
  1184. if s.TagKeys == nil {
  1185. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  1186. }
  1187. if invalidParams.Len() > 0 {
  1188. return invalidParams
  1189. }
  1190. return nil
  1191. }
  1192. // The result of the DeleteTags operation.
  1193. type DeleteTagsOutput struct {
  1194. _ struct{} `type:"structure"`
  1195. }
  1196. // String returns the string representation
  1197. func (s DeleteTagsOutput) String() string {
  1198. return awsutil.Prettify(s)
  1199. }
  1200. // GoString returns the string representation
  1201. func (s DeleteTagsOutput) GoString() string {
  1202. return s.String()
  1203. }
  1204. // The request of the DescribeTags operation.
  1205. type DescribeTagsInput struct {
  1206. _ struct{} `type:"structure"`
  1207. // The resource ID of the request.
  1208. //
  1209. // ResourceId is a required field
  1210. ResourceId *string `min:"1" type:"string" required:"true"`
  1211. }
  1212. // String returns the string representation
  1213. func (s DescribeTagsInput) String() string {
  1214. return awsutil.Prettify(s)
  1215. }
  1216. // GoString returns the string representation
  1217. func (s DescribeTagsInput) GoString() string {
  1218. return s.String()
  1219. }
  1220. // Validate inspects the fields of the type to determine if they are valid.
  1221. func (s *DescribeTagsInput) Validate() error {
  1222. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  1223. if s.ResourceId == nil {
  1224. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1225. }
  1226. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  1227. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  1228. }
  1229. if invalidParams.Len() > 0 {
  1230. return invalidParams
  1231. }
  1232. return nil
  1233. }
  1234. // The result of the DescribeTags operation.
  1235. type DescribeTagsOutput struct {
  1236. _ struct{} `type:"structure"`
  1237. // The list of tags.
  1238. TagList []*Tag `type:"list"`
  1239. }
  1240. // String returns the string representation
  1241. func (s DescribeTagsOutput) String() string {
  1242. return awsutil.Prettify(s)
  1243. }
  1244. // GoString returns the string representation
  1245. func (s DescribeTagsOutput) GoString() string {
  1246. return s.String()
  1247. }
  1248. // Contains the inputs for the DescribeWorkspaceBundles operation.
  1249. type DescribeWorkspaceBundlesInput struct {
  1250. _ struct{} `type:"structure"`
  1251. // An array of strings that contains the identifiers of the bundles to retrieve.
  1252. // This parameter cannot be combined with any other filter parameter.
  1253. BundleIds []*string `min:"1" type:"list"`
  1254. // The NextToken value from a previous call to this operation. Pass null if
  1255. // this is the first call.
  1256. NextToken *string `min:"1" type:"string"`
  1257. // The owner of the bundles to retrieve. This parameter cannot be combined with
  1258. // any other filter parameter.
  1259. //
  1260. // This contains one of the following values:
  1261. //
  1262. // * null- Retrieves the bundles that belong to the account making the call.
  1263. //
  1264. // * AMAZON- Retrieves the bundles that are provided by AWS.
  1265. Owner *string `type:"string"`
  1266. }
  1267. // String returns the string representation
  1268. func (s DescribeWorkspaceBundlesInput) String() string {
  1269. return awsutil.Prettify(s)
  1270. }
  1271. // GoString returns the string representation
  1272. func (s DescribeWorkspaceBundlesInput) GoString() string {
  1273. return s.String()
  1274. }
  1275. // Validate inspects the fields of the type to determine if they are valid.
  1276. func (s *DescribeWorkspaceBundlesInput) Validate() error {
  1277. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceBundlesInput"}
  1278. if s.BundleIds != nil && len(s.BundleIds) < 1 {
  1279. invalidParams.Add(request.NewErrParamMinLen("BundleIds", 1))
  1280. }
  1281. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1282. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1283. }
  1284. if invalidParams.Len() > 0 {
  1285. return invalidParams
  1286. }
  1287. return nil
  1288. }
  1289. // Contains the results of the DescribeWorkspaceBundles operation.
  1290. type DescribeWorkspaceBundlesOutput struct {
  1291. _ struct{} `type:"structure"`
  1292. // An array of structures that contain information about the bundles.
  1293. Bundles []*WorkspaceBundle `type:"list"`
  1294. // If not null, more results are available. Pass this value for the NextToken
  1295. // parameter in a subsequent call to this operation to retrieve the next set
  1296. // of items. This token is valid for one day and must be used within that time
  1297. // frame.
  1298. NextToken *string `min:"1" type:"string"`
  1299. }
  1300. // String returns the string representation
  1301. func (s DescribeWorkspaceBundlesOutput) String() string {
  1302. return awsutil.Prettify(s)
  1303. }
  1304. // GoString returns the string representation
  1305. func (s DescribeWorkspaceBundlesOutput) GoString() string {
  1306. return s.String()
  1307. }
  1308. // Contains the inputs for the DescribeWorkspaceDirectories operation.
  1309. type DescribeWorkspaceDirectoriesInput struct {
  1310. _ struct{} `type:"structure"`
  1311. // An array of strings that contains the directory identifiers to retrieve information
  1312. // for. If this member is null, all directories are retrieved.
  1313. DirectoryIds []*string `min:"1" type:"list"`
  1314. // The NextToken value from a previous call to this operation. Pass null if
  1315. // this is the first call.
  1316. NextToken *string `min:"1" type:"string"`
  1317. }
  1318. // String returns the string representation
  1319. func (s DescribeWorkspaceDirectoriesInput) String() string {
  1320. return awsutil.Prettify(s)
  1321. }
  1322. // GoString returns the string representation
  1323. func (s DescribeWorkspaceDirectoriesInput) GoString() string {
  1324. return s.String()
  1325. }
  1326. // Validate inspects the fields of the type to determine if they are valid.
  1327. func (s *DescribeWorkspaceDirectoriesInput) Validate() error {
  1328. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceDirectoriesInput"}
  1329. if s.DirectoryIds != nil && len(s.DirectoryIds) < 1 {
  1330. invalidParams.Add(request.NewErrParamMinLen("DirectoryIds", 1))
  1331. }
  1332. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1333. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1334. }
  1335. if invalidParams.Len() > 0 {
  1336. return invalidParams
  1337. }
  1338. return nil
  1339. }
  1340. // Contains the results of the DescribeWorkspaceDirectories operation.
  1341. type DescribeWorkspaceDirectoriesOutput struct {
  1342. _ struct{} `type:"structure"`
  1343. // An array of structures that contain information about the directories.
  1344. Directories []*WorkspaceDirectory `type:"list"`
  1345. // If not null, more results are available. Pass this value for the NextToken
  1346. // parameter in a subsequent call to this operation to retrieve the next set
  1347. // of items. This token is valid for one day and must be used within that time
  1348. // frame.
  1349. NextToken *string `min:"1" type:"string"`
  1350. }
  1351. // String returns the string representation
  1352. func (s DescribeWorkspaceDirectoriesOutput) String() string {
  1353. return awsutil.Prettify(s)
  1354. }
  1355. // GoString returns the string representation
  1356. func (s DescribeWorkspaceDirectoriesOutput) GoString() string {
  1357. return s.String()
  1358. }
  1359. type DescribeWorkspacesConnectionStatusInput struct {
  1360. _ struct{} `type:"structure"`
  1361. // The next token of the request.
  1362. NextToken *string `min:"1" type:"string"`
  1363. // An array of strings that contain the identifiers of the WorkSpaces.
  1364. WorkspaceIds []*string `min:"1" type:"list"`
  1365. }
  1366. // String returns the string representation
  1367. func (s DescribeWorkspacesConnectionStatusInput) String() string {
  1368. return awsutil.Prettify(s)
  1369. }
  1370. // GoString returns the string representation
  1371. func (s DescribeWorkspacesConnectionStatusInput) GoString() string {
  1372. return s.String()
  1373. }
  1374. // Validate inspects the fields of the type to determine if they are valid.
  1375. func (s *DescribeWorkspacesConnectionStatusInput) Validate() error {
  1376. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesConnectionStatusInput"}
  1377. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1378. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1379. }
  1380. if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 {
  1381. invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1))
  1382. }
  1383. if invalidParams.Len() > 0 {
  1384. return invalidParams
  1385. }
  1386. return nil
  1387. }
  1388. type DescribeWorkspacesConnectionStatusOutput struct {
  1389. _ struct{} `type:"structure"`
  1390. // The next token of the result.
  1391. NextToken *string `min:"1" type:"string"`
  1392. // The connection status of the WorkSpace.
  1393. WorkspacesConnectionStatus []*WorkspaceConnectionStatus `type:"list"`
  1394. }
  1395. // String returns the string representation
  1396. func (s DescribeWorkspacesConnectionStatusOutput) String() string {
  1397. return awsutil.Prettify(s)
  1398. }
  1399. // GoString returns the string representation
  1400. func (s DescribeWorkspacesConnectionStatusOutput) GoString() string {
  1401. return s.String()
  1402. }
  1403. // Contains the inputs for the DescribeWorkspaces operation.
  1404. type DescribeWorkspacesInput struct {
  1405. _ struct{} `type:"structure"`
  1406. // The identifier of a bundle to obtain the WorkSpaces for. All WorkSpaces that
  1407. // are created from this bundle will be retrieved. This parameter cannot be
  1408. // combined with any other filter parameter.
  1409. BundleId *string `type:"string"`
  1410. // Specifies the directory identifier to which to limit the WorkSpaces. Optionally,
  1411. // you can specify a specific directory user with the UserName parameter. This
  1412. // parameter cannot be combined with any other filter parameter.
  1413. DirectoryId *string `type:"string"`
  1414. // The maximum number of items to return.
  1415. Limit *int64 `min:"1" type:"integer"`
  1416. // The NextToken value from a previous call to this operation. Pass null if
  1417. // this is the first call.
  1418. NextToken *string `min:"1" type:"string"`
  1419. // Used with the DirectoryId parameter to specify the directory user for whom
  1420. // to obtain the WorkSpace.
  1421. UserName *string `min:"1" type:"string"`
  1422. // An array of strings that contain the identifiers of the WorkSpaces for which
  1423. // to retrieve information. This parameter cannot be combined with any other
  1424. // filter parameter.
  1425. //
  1426. // Because the CreateWorkspaces operation is asynchronous, the identifier it
  1427. // returns is not immediately available. If you immediately call DescribeWorkspaces
  1428. // with this identifier, no information is returned.
  1429. WorkspaceIds []*string `min:"1" type:"list"`
  1430. }
  1431. // String returns the string representation
  1432. func (s DescribeWorkspacesInput) String() string {
  1433. return awsutil.Prettify(s)
  1434. }
  1435. // GoString returns the string representation
  1436. func (s DescribeWorkspacesInput) GoString() string {
  1437. return s.String()
  1438. }
  1439. // Validate inspects the fields of the type to determine if they are valid.
  1440. func (s *DescribeWorkspacesInput) Validate() error {
  1441. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesInput"}
  1442. if s.Limit != nil && *s.Limit < 1 {
  1443. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  1444. }
  1445. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1446. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1447. }
  1448. if s.UserName != nil && len(*s.UserName) < 1 {
  1449. invalidParams.Add(request.NewErrParamMinLen("UserName", 1))
  1450. }
  1451. if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 {
  1452. invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1))
  1453. }
  1454. if invalidParams.Len() > 0 {
  1455. return invalidParams
  1456. }
  1457. return nil
  1458. }
  1459. // Contains the results for the DescribeWorkspaces operation.
  1460. type DescribeWorkspacesOutput struct {
  1461. _ struct{} `type:"structure"`
  1462. // If not null, more results are available. Pass this value for the NextToken
  1463. // parameter in a subsequent call to this operation to retrieve the next set
  1464. // of items. This token is valid for one day and must be used within that time
  1465. // frame.
  1466. NextToken *string `min:"1" type:"string"`
  1467. // An array of structures that contain the information about the WorkSpaces.
  1468. //
  1469. // Because the CreateWorkspaces operation is asynchronous, some of this information
  1470. // may be incomplete for a newly-created WorkSpace.
  1471. Workspaces []*Workspace `type:"list"`
  1472. }
  1473. // String returns the string representation
  1474. func (s DescribeWorkspacesOutput) String() string {
  1475. return awsutil.Prettify(s)
  1476. }
  1477. // GoString returns the string representation
  1478. func (s DescribeWorkspacesOutput) GoString() string {
  1479. return s.String()
  1480. }
  1481. // Contains information about a WorkSpace that could not be created.
  1482. type FailedCreateWorkspaceRequest struct {
  1483. _ struct{} `type:"structure"`
  1484. // The error code.
  1485. ErrorCode *string `type:"string"`
  1486. // The textual error message.
  1487. ErrorMessage *string `type:"string"`
  1488. // A FailedCreateWorkspaceRequest$WorkspaceRequest object that contains the
  1489. // information about the WorkSpace that could not be created.
  1490. WorkspaceRequest *WorkspaceRequest `type:"structure"`
  1491. }
  1492. // String returns the string representation
  1493. func (s FailedCreateWorkspaceRequest) String() string {
  1494. return awsutil.Prettify(s)
  1495. }
  1496. // GoString returns the string representation
  1497. func (s FailedCreateWorkspaceRequest) GoString() string {
  1498. return s.String()
  1499. }
  1500. // Contains information about a WorkSpace that could not be rebooted (RebootWorkspaces),
  1501. // rebuilt (RebuildWorkspaces), terminated (TerminateWorkspaces), started (StartWorkspaces),
  1502. // or stopped (StopWorkspaces).
  1503. type FailedWorkspaceChangeRequest struct {
  1504. _ struct{} `type:"structure"`
  1505. // The error code.
  1506. ErrorCode *string `type:"string"`
  1507. // The textual error message.
  1508. ErrorMessage *string `type:"string"`
  1509. // The identifier of the WorkSpace.
  1510. WorkspaceId *string `type:"string"`
  1511. }
  1512. // String returns the string representation
  1513. func (s FailedWorkspaceChangeRequest) String() string {
  1514. return awsutil.Prettify(s)
  1515. }
  1516. // GoString returns the string representation
  1517. func (s FailedWorkspaceChangeRequest) GoString() string {
  1518. return s.String()
  1519. }
  1520. type ModifyWorkspacePropertiesInput struct {
  1521. _ struct{} `type:"structure"`
  1522. // The ID of the WorkSpace.
  1523. //
  1524. // WorkspaceId is a required field
  1525. WorkspaceId *string `type:"string" required:"true"`
  1526. // The WorkSpace properties of the request.
  1527. //
  1528. // WorkspaceProperties is a required field
  1529. WorkspaceProperties *WorkspaceProperties `type:"structure" required:"true"`
  1530. }
  1531. // String returns the string representation
  1532. func (s ModifyWorkspacePropertiesInput) String() string {
  1533. return awsutil.Prettify(s)
  1534. }
  1535. // GoString returns the string representation
  1536. func (s ModifyWorkspacePropertiesInput) GoString() string {
  1537. return s.String()
  1538. }
  1539. // Validate inspects the fields of the type to determine if they are valid.
  1540. func (s *ModifyWorkspacePropertiesInput) Validate() error {
  1541. invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspacePropertiesInput"}
  1542. if s.WorkspaceId == nil {
  1543. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  1544. }
  1545. if s.WorkspaceProperties == nil {
  1546. invalidParams.Add(request.NewErrParamRequired("WorkspaceProperties"))
  1547. }
  1548. if invalidParams.Len() > 0 {
  1549. return invalidParams
  1550. }
  1551. return nil
  1552. }
  1553. type ModifyWorkspacePropertiesOutput struct {
  1554. _ struct{} `type:"structure"`
  1555. }
  1556. // String returns the string representation
  1557. func (s ModifyWorkspacePropertiesOutput) String() string {
  1558. return awsutil.Prettify(s)
  1559. }
  1560. // GoString returns the string representation
  1561. func (s ModifyWorkspacePropertiesOutput) GoString() string {
  1562. return s.String()
  1563. }
  1564. // Contains information used with the RebootWorkspaces operation to reboot a
  1565. // WorkSpace.
  1566. type RebootRequest struct {
  1567. _ struct{} `type:"structure"`
  1568. // The identifier of the WorkSpace to reboot.
  1569. //
  1570. // WorkspaceId is a required field
  1571. WorkspaceId *string `type:"string" required:"true"`
  1572. }
  1573. // String returns the string representation
  1574. func (s RebootRequest) String() string {
  1575. return awsutil.Prettify(s)
  1576. }
  1577. // GoString returns the string representation
  1578. func (s RebootRequest) GoString() string {
  1579. return s.String()
  1580. }
  1581. // Validate inspects the fields of the type to determine if they are valid.
  1582. func (s *RebootRequest) Validate() error {
  1583. invalidParams := request.ErrInvalidParams{Context: "RebootRequest"}
  1584. if s.WorkspaceId == nil {
  1585. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  1586. }
  1587. if invalidParams.Len() > 0 {
  1588. return invalidParams
  1589. }
  1590. return nil
  1591. }
  1592. // Contains the inputs for the RebootWorkspaces operation.
  1593. type RebootWorkspacesInput struct {
  1594. _ struct{} `type:"structure"`
  1595. // An array of structures that specify the WorkSpaces to reboot.
  1596. //
  1597. // RebootWorkspaceRequests is a required field
  1598. RebootWorkspaceRequests []*RebootRequest `min:"1" type:"list" required:"true"`
  1599. }
  1600. // String returns the string representation
  1601. func (s RebootWorkspacesInput) String() string {
  1602. return awsutil.Prettify(s)
  1603. }
  1604. // GoString returns the string representation
  1605. func (s RebootWorkspacesInput) GoString() string {
  1606. return s.String()
  1607. }
  1608. // Validate inspects the fields of the type to determine if they are valid.
  1609. func (s *RebootWorkspacesInput) Validate() error {
  1610. invalidParams := request.ErrInvalidParams{Context: "RebootWorkspacesInput"}
  1611. if s.RebootWorkspaceRequests == nil {
  1612. invalidParams.Add(request.NewErrParamRequired("RebootWorkspaceRequests"))
  1613. }
  1614. if s.RebootWorkspaceRequests != nil && len(s.RebootWorkspaceRequests) < 1 {
  1615. invalidParams.Add(request.NewErrParamMinLen("RebootWorkspaceRequests", 1))
  1616. }
  1617. if s.RebootWorkspaceRequests != nil {
  1618. for i, v := range s.RebootWorkspaceRequests {
  1619. if v == nil {
  1620. continue
  1621. }
  1622. if err := v.Validate(); err != nil {
  1623. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebootWorkspaceRequests", i), err.(request.ErrInvalidParams))
  1624. }
  1625. }
  1626. }
  1627. if invalidParams.Len() > 0 {
  1628. return invalidParams
  1629. }
  1630. return nil
  1631. }
  1632. // Contains the results of the RebootWorkspaces operation.
  1633. type RebootWorkspacesOutput struct {
  1634. _ struct{} `type:"structure"`
  1635. // An array of structures representing any WorkSpaces that could not be rebooted.
  1636. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1637. }
  1638. // String returns the string representation
  1639. func (s RebootWorkspacesOutput) String() string {
  1640. return awsutil.Prettify(s)
  1641. }
  1642. // GoString returns the string representation
  1643. func (s RebootWorkspacesOutput) GoString() string {
  1644. return s.String()
  1645. }
  1646. // Contains information used with the RebuildWorkspaces operation to rebuild
  1647. // a WorkSpace.
  1648. type RebuildRequest struct {
  1649. _ struct{} `type:"structure"`
  1650. // The identifier of the WorkSpace to rebuild.
  1651. //
  1652. // WorkspaceId is a required field
  1653. WorkspaceId *string `type:"string" required:"true"`
  1654. }
  1655. // String returns the string representation
  1656. func (s RebuildRequest) String() string {
  1657. return awsutil.Prettify(s)
  1658. }
  1659. // GoString returns the string representation
  1660. func (s RebuildRequest) GoString() string {
  1661. return s.String()
  1662. }
  1663. // Validate inspects the fields of the type to determine if they are valid.
  1664. func (s *RebuildRequest) Validate() error {
  1665. invalidParams := request.ErrInvalidParams{Context: "RebuildRequest"}
  1666. if s.WorkspaceId == nil {
  1667. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  1668. }
  1669. if invalidParams.Len() > 0 {
  1670. return invalidParams
  1671. }
  1672. return nil
  1673. }
  1674. // Contains the inputs for the RebuildWorkspaces operation.
  1675. type RebuildWorkspacesInput struct {
  1676. _ struct{} `type:"structure"`
  1677. // An array of structures that specify the WorkSpaces to rebuild.
  1678. //
  1679. // RebuildWorkspaceRequests is a required field
  1680. RebuildWorkspaceRequests []*RebuildRequest `min:"1" type:"list" required:"true"`
  1681. }
  1682. // String returns the string representation
  1683. func (s RebuildWorkspacesInput) String() string {
  1684. return awsutil.Prettify(s)
  1685. }
  1686. // GoString returns the string representation
  1687. func (s RebuildWorkspacesInput) GoString() string {
  1688. return s.String()
  1689. }
  1690. // Validate inspects the fields of the type to determine if they are valid.
  1691. func (s *RebuildWorkspacesInput) Validate() error {
  1692. invalidParams := request.ErrInvalidParams{Context: "RebuildWorkspacesInput"}
  1693. if s.RebuildWorkspaceRequests == nil {
  1694. invalidParams.Add(request.NewErrParamRequired("RebuildWorkspaceRequests"))
  1695. }
  1696. if s.RebuildWorkspaceRequests != nil && len(s.RebuildWorkspaceRequests) < 1 {
  1697. invalidParams.Add(request.NewErrParamMinLen("RebuildWorkspaceRequests", 1))
  1698. }
  1699. if s.RebuildWorkspaceRequests != nil {
  1700. for i, v := range s.RebuildWorkspaceRequests {
  1701. if v == nil {
  1702. continue
  1703. }
  1704. if err := v.Validate(); err != nil {
  1705. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebuildWorkspaceRequests", i), err.(request.ErrInvalidParams))
  1706. }
  1707. }
  1708. }
  1709. if invalidParams.Len() > 0 {
  1710. return invalidParams
  1711. }
  1712. return nil
  1713. }
  1714. // Contains the results of the RebuildWorkspaces operation.
  1715. type RebuildWorkspacesOutput struct {
  1716. _ struct{} `type:"structure"`
  1717. // An array of structures representing any WorkSpaces that could not be rebuilt.
  1718. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1719. }
  1720. // String returns the string representation
  1721. func (s RebuildWorkspacesOutput) String() string {
  1722. return awsutil.Prettify(s)
  1723. }
  1724. // GoString returns the string representation
  1725. func (s RebuildWorkspacesOutput) GoString() string {
  1726. return s.String()
  1727. }
  1728. // Describes the start request.
  1729. type StartRequest struct {
  1730. _ struct{} `type:"structure"`
  1731. // The ID of the WorkSpace.
  1732. WorkspaceId *string `type:"string"`
  1733. }
  1734. // String returns the string representation
  1735. func (s StartRequest) String() string {
  1736. return awsutil.Prettify(s)
  1737. }
  1738. // GoString returns the string representation
  1739. func (s StartRequest) GoString() string {
  1740. return s.String()
  1741. }
  1742. type StartWorkspacesInput struct {
  1743. _ struct{} `type:"structure"`
  1744. // The requests.
  1745. //
  1746. // StartWorkspaceRequests is a required field
  1747. StartWorkspaceRequests []*StartRequest `min:"1" type:"list" required:"true"`
  1748. }
  1749. // String returns the string representation
  1750. func (s StartWorkspacesInput) String() string {
  1751. return awsutil.Prettify(s)
  1752. }
  1753. // GoString returns the string representation
  1754. func (s StartWorkspacesInput) GoString() string {
  1755. return s.String()
  1756. }
  1757. // Validate inspects the fields of the type to determine if they are valid.
  1758. func (s *StartWorkspacesInput) Validate() error {
  1759. invalidParams := request.ErrInvalidParams{Context: "StartWorkspacesInput"}
  1760. if s.StartWorkspaceRequests == nil {
  1761. invalidParams.Add(request.NewErrParamRequired("StartWorkspaceRequests"))
  1762. }
  1763. if s.StartWorkspaceRequests != nil && len(s.StartWorkspaceRequests) < 1 {
  1764. invalidParams.Add(request.NewErrParamMinLen("StartWorkspaceRequests", 1))
  1765. }
  1766. if invalidParams.Len() > 0 {
  1767. return invalidParams
  1768. }
  1769. return nil
  1770. }
  1771. type StartWorkspacesOutput struct {
  1772. _ struct{} `type:"structure"`
  1773. // The failed requests.
  1774. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1775. }
  1776. // String returns the string representation
  1777. func (s StartWorkspacesOutput) String() string {
  1778. return awsutil.Prettify(s)
  1779. }
  1780. // GoString returns the string representation
  1781. func (s StartWorkspacesOutput) GoString() string {
  1782. return s.String()
  1783. }
  1784. // Describes the stop request.
  1785. type StopRequest struct {
  1786. _ struct{} `type:"structure"`
  1787. // The ID of the WorkSpace.
  1788. WorkspaceId *string `type:"string"`
  1789. }
  1790. // String returns the string representation
  1791. func (s StopRequest) String() string {
  1792. return awsutil.Prettify(s)
  1793. }
  1794. // GoString returns the string representation
  1795. func (s StopRequest) GoString() string {
  1796. return s.String()
  1797. }
  1798. type StopWorkspacesInput struct {
  1799. _ struct{} `type:"structure"`
  1800. // The requests.
  1801. //
  1802. // StopWorkspaceRequests is a required field
  1803. StopWorkspaceRequests []*StopRequest `min:"1" type:"list" required:"true"`
  1804. }
  1805. // String returns the string representation
  1806. func (s StopWorkspacesInput) String() string {
  1807. return awsutil.Prettify(s)
  1808. }
  1809. // GoString returns the string representation
  1810. func (s StopWorkspacesInput) GoString() string {
  1811. return s.String()
  1812. }
  1813. // Validate inspects the fields of the type to determine if they are valid.
  1814. func (s *StopWorkspacesInput) Validate() error {
  1815. invalidParams := request.ErrInvalidParams{Context: "StopWorkspacesInput"}
  1816. if s.StopWorkspaceRequests == nil {
  1817. invalidParams.Add(request.NewErrParamRequired("StopWorkspaceRequests"))
  1818. }
  1819. if s.StopWorkspaceRequests != nil && len(s.StopWorkspaceRequests) < 1 {
  1820. invalidParams.Add(request.NewErrParamMinLen("StopWorkspaceRequests", 1))
  1821. }
  1822. if invalidParams.Len() > 0 {
  1823. return invalidParams
  1824. }
  1825. return nil
  1826. }
  1827. type StopWorkspacesOutput struct {
  1828. _ struct{} `type:"structure"`
  1829. // The failed requests.
  1830. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1831. }
  1832. // String returns the string representation
  1833. func (s StopWorkspacesOutput) String() string {
  1834. return awsutil.Prettify(s)
  1835. }
  1836. // GoString returns the string representation
  1837. func (s StopWorkspacesOutput) GoString() string {
  1838. return s.String()
  1839. }
  1840. // Describes the tag of the WorkSpace.
  1841. type Tag struct {
  1842. _ struct{} `type:"structure"`
  1843. // The key of the tag.
  1844. //
  1845. // Key is a required field
  1846. Key *string `min:"1" type:"string" required:"true"`
  1847. // The value of the tag.
  1848. Value *string `type:"string"`
  1849. }
  1850. // String returns the string representation
  1851. func (s Tag) String() string {
  1852. return awsutil.Prettify(s)
  1853. }
  1854. // GoString returns the string representation
  1855. func (s Tag) GoString() string {
  1856. return s.String()
  1857. }
  1858. // Validate inspects the fields of the type to determine if they are valid.
  1859. func (s *Tag) Validate() error {
  1860. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  1861. if s.Key == nil {
  1862. invalidParams.Add(request.NewErrParamRequired("Key"))
  1863. }
  1864. if s.Key != nil && len(*s.Key) < 1 {
  1865. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  1866. }
  1867. if invalidParams.Len() > 0 {
  1868. return invalidParams
  1869. }
  1870. return nil
  1871. }
  1872. // Contains information used with the TerminateWorkspaces operation to terminate
  1873. // a WorkSpace.
  1874. type TerminateRequest struct {
  1875. _ struct{} `type:"structure"`
  1876. // The identifier of the WorkSpace to terminate.
  1877. //
  1878. // WorkspaceId is a required field
  1879. WorkspaceId *string `type:"string" required:"true"`
  1880. }
  1881. // String returns the string representation
  1882. func (s TerminateRequest) String() string {
  1883. return awsutil.Prettify(s)
  1884. }
  1885. // GoString returns the string representation
  1886. func (s TerminateRequest) GoString() string {
  1887. return s.String()
  1888. }
  1889. // Validate inspects the fields of the type to determine if they are valid.
  1890. func (s *TerminateRequest) Validate() error {
  1891. invalidParams := request.ErrInvalidParams{Context: "TerminateRequest"}
  1892. if s.WorkspaceId == nil {
  1893. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  1894. }
  1895. if invalidParams.Len() > 0 {
  1896. return invalidParams
  1897. }
  1898. return nil
  1899. }
  1900. // Contains the inputs for the TerminateWorkspaces operation.
  1901. type TerminateWorkspacesInput struct {
  1902. _ struct{} `type:"structure"`
  1903. // An array of structures that specify the WorkSpaces to terminate.
  1904. //
  1905. // TerminateWorkspaceRequests is a required field
  1906. TerminateWorkspaceRequests []*TerminateRequest `min:"1" type:"list" required:"true"`
  1907. }
  1908. // String returns the string representation
  1909. func (s TerminateWorkspacesInput) String() string {
  1910. return awsutil.Prettify(s)
  1911. }
  1912. // GoString returns the string representation
  1913. func (s TerminateWorkspacesInput) GoString() string {
  1914. return s.String()
  1915. }
  1916. // Validate inspects the fields of the type to determine if they are valid.
  1917. func (s *TerminateWorkspacesInput) Validate() error {
  1918. invalidParams := request.ErrInvalidParams{Context: "TerminateWorkspacesInput"}
  1919. if s.TerminateWorkspaceRequests == nil {
  1920. invalidParams.Add(request.NewErrParamRequired("TerminateWorkspaceRequests"))
  1921. }
  1922. if s.TerminateWorkspaceRequests != nil && len(s.TerminateWorkspaceRequests) < 1 {
  1923. invalidParams.Add(request.NewErrParamMinLen("TerminateWorkspaceRequests", 1))
  1924. }
  1925. if s.TerminateWorkspaceRequests != nil {
  1926. for i, v := range s.TerminateWorkspaceRequests {
  1927. if v == nil {
  1928. continue
  1929. }
  1930. if err := v.Validate(); err != nil {
  1931. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TerminateWorkspaceRequests", i), err.(request.ErrInvalidParams))
  1932. }
  1933. }
  1934. }
  1935. if invalidParams.Len() > 0 {
  1936. return invalidParams
  1937. }
  1938. return nil
  1939. }
  1940. // Contains the results of the TerminateWorkspaces operation.
  1941. type TerminateWorkspacesOutput struct {
  1942. _ struct{} `type:"structure"`
  1943. // An array of structures representing any WorkSpaces that could not be terminated.
  1944. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1945. }
  1946. // String returns the string representation
  1947. func (s TerminateWorkspacesOutput) String() string {
  1948. return awsutil.Prettify(s)
  1949. }
  1950. // GoString returns the string representation
  1951. func (s TerminateWorkspacesOutput) GoString() string {
  1952. return s.String()
  1953. }
  1954. // Contains information about the user storage for a WorkSpace bundle.
  1955. type UserStorage struct {
  1956. _ struct{} `type:"structure"`
  1957. // The amount of user storage for the bundle.
  1958. Capacity *string `min:"1" type:"string"`
  1959. }
  1960. // String returns the string representation
  1961. func (s UserStorage) String() string {
  1962. return awsutil.Prettify(s)
  1963. }
  1964. // GoString returns the string representation
  1965. func (s UserStorage) GoString() string {
  1966. return s.String()
  1967. }
  1968. // Contains information about a WorkSpace.
  1969. type Workspace struct {
  1970. _ struct{} `type:"structure"`
  1971. // The identifier of the bundle that the WorkSpace was created from.
  1972. BundleId *string `type:"string"`
  1973. // The name of the WorkSpace as seen by the operating system.
  1974. ComputerName *string `type:"string"`
  1975. // The identifier of the AWS Directory Service directory that the WorkSpace
  1976. // belongs to.
  1977. DirectoryId *string `type:"string"`
  1978. // If the WorkSpace could not be created, this contains the error code.
  1979. ErrorCode *string `type:"string"`
  1980. // If the WorkSpace could not be created, this contains a textual error message
  1981. // that describes the failure.
  1982. ErrorMessage *string `type:"string"`
  1983. // The IP address of the WorkSpace.
  1984. IpAddress *string `type:"string"`
  1985. // Specifies whether the data stored on the root volume, or C: drive, is encrypted.
  1986. RootVolumeEncryptionEnabled *bool `type:"boolean"`
  1987. // The operational state of the WorkSpace.
  1988. State *string `type:"string" enum:"WorkspaceState"`
  1989. // The identifier of the subnet that the WorkSpace is in.
  1990. SubnetId *string `type:"string"`
  1991. // The user that the WorkSpace is assigned to.
  1992. UserName *string `min:"1" type:"string"`
  1993. // Specifies whether the data stored on the user volume, or D: drive, is encrypted.
  1994. UserVolumeEncryptionEnabled *bool `type:"boolean"`
  1995. // The KMS key used to encrypt data stored on your WorkSpace.
  1996. VolumeEncryptionKey *string `type:"string"`
  1997. // The identifier of the WorkSpace.
  1998. WorkspaceId *string `type:"string"`
  1999. // Describes the properties of a WorkSpace.
  2000. WorkspaceProperties *WorkspaceProperties `type:"structure"`
  2001. }
  2002. // String returns the string representation
  2003. func (s Workspace) String() string {
  2004. return awsutil.Prettify(s)
  2005. }
  2006. // GoString returns the string representation
  2007. func (s Workspace) GoString() string {
  2008. return s.String()
  2009. }
  2010. // Contains information about a WorkSpace bundle.
  2011. type WorkspaceBundle struct {
  2012. _ struct{} `type:"structure"`
  2013. // The bundle identifier.
  2014. BundleId *string `type:"string"`
  2015. // A ComputeType object that specifies the compute type for the bundle.
  2016. ComputeType *ComputeType `type:"structure"`
  2017. // The bundle description.
  2018. Description *string `type:"string"`
  2019. // The name of the bundle.
  2020. Name *string `min:"1" type:"string"`
  2021. // The owner of the bundle. This contains the owner's account identifier, or
  2022. // AMAZON if the bundle is provided by AWS.
  2023. Owner *string `type:"string"`
  2024. // A UserStorage object that specifies the amount of user storage that the bundle
  2025. // contains.
  2026. UserStorage *UserStorage `type:"structure"`
  2027. }
  2028. // String returns the string representation
  2029. func (s WorkspaceBundle) String() string {
  2030. return awsutil.Prettify(s)
  2031. }
  2032. // GoString returns the string representation
  2033. func (s WorkspaceBundle) GoString() string {
  2034. return s.String()
  2035. }
  2036. // Describes the connection status of a WorkSpace.
  2037. type WorkspaceConnectionStatus struct {
  2038. _ struct{} `type:"structure"`
  2039. // The connection state of the WorkSpace. Returns UNKOWN if the WorkSpace is
  2040. // in a Stopped state.
  2041. ConnectionState *string `type:"string" enum:"ConnectionState"`
  2042. // The timestamp of the connection state check.
  2043. ConnectionStateCheckTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  2044. // The timestamp of the last known user connection.
  2045. LastKnownUserConnectionTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  2046. // The ID of the WorkSpace.
  2047. WorkspaceId *string `type:"string"`
  2048. }
  2049. // String returns the string representation
  2050. func (s WorkspaceConnectionStatus) String() string {
  2051. return awsutil.Prettify(s)
  2052. }
  2053. // GoString returns the string representation
  2054. func (s WorkspaceConnectionStatus) GoString() string {
  2055. return s.String()
  2056. }
  2057. // Contains information about an AWS Directory Service directory for use with
  2058. // Amazon WorkSpaces.
  2059. type WorkspaceDirectory struct {
  2060. _ struct{} `type:"structure"`
  2061. // The directory alias.
  2062. Alias *string `type:"string"`
  2063. // The user name for the service account.
  2064. CustomerUserName *string `min:"1" type:"string"`
  2065. // The directory identifier.
  2066. DirectoryId *string `type:"string"`
  2067. // The name of the directory.
  2068. DirectoryName *string `type:"string"`
  2069. // The directory type.
  2070. DirectoryType *string `type:"string" enum:"WorkspaceDirectoryType"`
  2071. // An array of strings that contains the IP addresses of the DNS servers for
  2072. // the directory.
  2073. DnsIpAddresses []*string `type:"list"`
  2074. // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces
  2075. // to make calls to other services, such as Amazon EC2, on your behalf.
  2076. IamRoleId *string `type:"string"`
  2077. // The registration code for the directory. This is the code that users enter
  2078. // in their Amazon WorkSpaces client application to connect to the directory.
  2079. RegistrationCode *string `min:"1" type:"string"`
  2080. // The state of the directory's registration with Amazon WorkSpaces
  2081. State *string `type:"string" enum:"WorkspaceDirectoryState"`
  2082. // An array of strings that contains the identifiers of the subnets used with
  2083. // the directory.
  2084. SubnetIds []*string `type:"list"`
  2085. // A structure that specifies the default creation properties for all WorkSpaces
  2086. // in the directory.
  2087. WorkspaceCreationProperties *DefaultWorkspaceCreationProperties `type:"structure"`
  2088. // The identifier of the security group that is assigned to new WorkSpaces.
  2089. WorkspaceSecurityGroupId *string `type:"string"`
  2090. }
  2091. // String returns the string representation
  2092. func (s WorkspaceDirectory) String() string {
  2093. return awsutil.Prettify(s)
  2094. }
  2095. // GoString returns the string representation
  2096. func (s WorkspaceDirectory) GoString() string {
  2097. return s.String()
  2098. }
  2099. // Describes the properties of a WorkSpace.
  2100. type WorkspaceProperties struct {
  2101. _ struct{} `type:"structure"`
  2102. // The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly.
  2103. // AutoStop WorkSpaces are billed by the hour and stopped when no longer being
  2104. // used in order to save on costs.
  2105. RunningMode *string `type:"string" enum:"RunningMode"`
  2106. // The time after a user logs off when WorkSpaces are automatically stopped.
  2107. // Configured in 60 minute intervals.
  2108. RunningModeAutoStopTimeoutInMinutes *int64 `type:"integer"`
  2109. }
  2110. // String returns the string representation
  2111. func (s WorkspaceProperties) String() string {
  2112. return awsutil.Prettify(s)
  2113. }
  2114. // GoString returns the string representation
  2115. func (s WorkspaceProperties) GoString() string {
  2116. return s.String()
  2117. }
  2118. // Contains information about a WorkSpace creation request.
  2119. type WorkspaceRequest struct {
  2120. _ struct{} `type:"structure"`
  2121. // The identifier of the bundle to create the WorkSpace from. You can use the
  2122. // DescribeWorkspaceBundles operation to obtain a list of the bundles that are
  2123. // available.
  2124. //
  2125. // BundleId is a required field
  2126. BundleId *string `type:"string" required:"true"`
  2127. // The identifier of the AWS Directory Service directory to create the WorkSpace
  2128. // in. You can use the DescribeWorkspaceDirectories operation to obtain a list
  2129. // of the directories that are available.
  2130. //
  2131. // DirectoryId is a required field
  2132. DirectoryId *string `type:"string" required:"true"`
  2133. // Specifies whether the data stored on the root volume, or C: drive, is encrypted.
  2134. RootVolumeEncryptionEnabled *bool `type:"boolean"`
  2135. // The tags of the WorkSpace request.
  2136. Tags []*Tag `type:"list"`
  2137. // The username that the WorkSpace is assigned to. This username must exist
  2138. // in the AWS Directory Service directory specified by the DirectoryId member.
  2139. //
  2140. // UserName is a required field
  2141. UserName *string `min:"1" type:"string" required:"true"`
  2142. // Specifies whether the data stored on the user volume, or D: drive, is encrypted.
  2143. UserVolumeEncryptionEnabled *bool `type:"boolean"`
  2144. // The KMS key used to encrypt data stored on your WorkSpace.
  2145. VolumeEncryptionKey *string `type:"string"`
  2146. // Describes the properties of a WorkSpace.
  2147. WorkspaceProperties *WorkspaceProperties `type:"structure"`
  2148. }
  2149. // String returns the string representation
  2150. func (s WorkspaceRequest) String() string {
  2151. return awsutil.Prettify(s)
  2152. }
  2153. // GoString returns the string representation
  2154. func (s WorkspaceRequest) GoString() string {
  2155. return s.String()
  2156. }
  2157. // Validate inspects the fields of the type to determine if they are valid.
  2158. func (s *WorkspaceRequest) Validate() error {
  2159. invalidParams := request.ErrInvalidParams{Context: "WorkspaceRequest"}
  2160. if s.BundleId == nil {
  2161. invalidParams.Add(request.NewErrParamRequired("BundleId"))
  2162. }
  2163. if s.DirectoryId == nil {
  2164. invalidParams.Add(request.NewErrParamRequired("DirectoryId"))
  2165. }
  2166. if s.UserName == nil {
  2167. invalidParams.Add(request.NewErrParamRequired("UserName"))
  2168. }
  2169. if s.UserName != nil && len(*s.UserName) < 1 {
  2170. invalidParams.Add(request.NewErrParamMinLen("UserName", 1))
  2171. }
  2172. if s.Tags != nil {
  2173. for i, v := range s.Tags {
  2174. if v == nil {
  2175. continue
  2176. }
  2177. if err := v.Validate(); err != nil {
  2178. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2179. }
  2180. }
  2181. }
  2182. if invalidParams.Len() > 0 {
  2183. return invalidParams
  2184. }
  2185. return nil
  2186. }
  2187. const (
  2188. // ComputeValue is a Compute enum value
  2189. ComputeValue = "VALUE"
  2190. // ComputeStandard is a Compute enum value
  2191. ComputeStandard = "STANDARD"
  2192. // ComputePerformance is a Compute enum value
  2193. ComputePerformance = "PERFORMANCE"
  2194. )
  2195. const (
  2196. // ConnectionStateConnected is a ConnectionState enum value
  2197. ConnectionStateConnected = "CONNECTED"
  2198. // ConnectionStateDisconnected is a ConnectionState enum value
  2199. ConnectionStateDisconnected = "DISCONNECTED"
  2200. // ConnectionStateUnknown is a ConnectionState enum value
  2201. ConnectionStateUnknown = "UNKNOWN"
  2202. )
  2203. const (
  2204. // RunningModeAutoStop is a RunningMode enum value
  2205. RunningModeAutoStop = "AUTO_STOP"
  2206. // RunningModeAlwaysOn is a RunningMode enum value
  2207. RunningModeAlwaysOn = "ALWAYS_ON"
  2208. )
  2209. const (
  2210. // WorkspaceDirectoryStateRegistering is a WorkspaceDirectoryState enum value
  2211. WorkspaceDirectoryStateRegistering = "REGISTERING"
  2212. // WorkspaceDirectoryStateRegistered is a WorkspaceDirectoryState enum value
  2213. WorkspaceDirectoryStateRegistered = "REGISTERED"
  2214. // WorkspaceDirectoryStateDeregistering is a WorkspaceDirectoryState enum value
  2215. WorkspaceDirectoryStateDeregistering = "DEREGISTERING"
  2216. // WorkspaceDirectoryStateDeregistered is a WorkspaceDirectoryState enum value
  2217. WorkspaceDirectoryStateDeregistered = "DEREGISTERED"
  2218. // WorkspaceDirectoryStateError is a WorkspaceDirectoryState enum value
  2219. WorkspaceDirectoryStateError = "ERROR"
  2220. )
  2221. const (
  2222. // WorkspaceDirectoryTypeSimpleAd is a WorkspaceDirectoryType enum value
  2223. WorkspaceDirectoryTypeSimpleAd = "SIMPLE_AD"
  2224. // WorkspaceDirectoryTypeAdConnector is a WorkspaceDirectoryType enum value
  2225. WorkspaceDirectoryTypeAdConnector = "AD_CONNECTOR"
  2226. )
  2227. const (
  2228. // WorkspaceStatePending is a WorkspaceState enum value
  2229. WorkspaceStatePending = "PENDING"
  2230. // WorkspaceStateAvailable is a WorkspaceState enum value
  2231. WorkspaceStateAvailable = "AVAILABLE"
  2232. // WorkspaceStateImpaired is a WorkspaceState enum value
  2233. WorkspaceStateImpaired = "IMPAIRED"
  2234. // WorkspaceStateUnhealthy is a WorkspaceState enum value
  2235. WorkspaceStateUnhealthy = "UNHEALTHY"
  2236. // WorkspaceStateRebooting is a WorkspaceState enum value
  2237. WorkspaceStateRebooting = "REBOOTING"
  2238. // WorkspaceStateStarting is a WorkspaceState enum value
  2239. WorkspaceStateStarting = "STARTING"
  2240. // WorkspaceStateRebuilding is a WorkspaceState enum value
  2241. WorkspaceStateRebuilding = "REBUILDING"
  2242. // WorkspaceStateMaintenance is a WorkspaceState enum value
  2243. WorkspaceStateMaintenance = "MAINTENANCE"
  2244. // WorkspaceStateTerminating is a WorkspaceState enum value
  2245. WorkspaceStateTerminating = "TERMINATING"
  2246. // WorkspaceStateTerminated is a WorkspaceState enum value
  2247. WorkspaceStateTerminated = "TERMINATED"
  2248. // WorkspaceStateSuspended is a WorkspaceState enum value
  2249. WorkspaceStateSuspended = "SUSPENDED"
  2250. // WorkspaceStateStopping is a WorkspaceState enum value
  2251. WorkspaceStateStopping = "STOPPING"
  2252. // WorkspaceStateStopped is a WorkspaceState enum value
  2253. WorkspaceStateStopped = "STOPPED"
  2254. // WorkspaceStateError is a WorkspaceState enum value
  2255. WorkspaceStateError = "ERROR"
  2256. )