api.go 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818
  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. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. )
  9. const opCreateTags = "CreateTags"
  10. // CreateTagsRequest generates a "aws/request.Request" representing the
  11. // client's request for the CreateTags operation. The "output" return
  12. // value can be used to capture response data after the request's "Send" method
  13. // is called.
  14. //
  15. // Creating a request object using this method should be used when you want to inject
  16. // custom logic into the request's lifecycle using a custom handler, or if you want to
  17. // access properties on the request object before or after sending the request. If
  18. // you just want the service response, call the CreateTags method directly
  19. // instead.
  20. //
  21. // Note: You must call the "Send" method on the returned request object in order
  22. // to execute the request.
  23. //
  24. // // Example sending a request using the CreateTagsRequest method.
  25. // req, resp := client.CreateTagsRequest(params)
  26. //
  27. // err := req.Send()
  28. // if err == nil { // resp is now filled
  29. // fmt.Println(resp)
  30. // }
  31. //
  32. func (c *WorkSpaces) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
  33. op := &request.Operation{
  34. Name: opCreateTags,
  35. HTTPMethod: "POST",
  36. HTTPPath: "/",
  37. }
  38. if input == nil {
  39. input = &CreateTagsInput{}
  40. }
  41. req = c.newRequest(op, input, output)
  42. output = &CreateTagsOutput{}
  43. req.Data = output
  44. return
  45. }
  46. // Creates tags for a WorkSpace.
  47. func (c *WorkSpaces) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
  48. req, out := c.CreateTagsRequest(input)
  49. err := req.Send()
  50. return out, err
  51. }
  52. const opCreateWorkspaces = "CreateWorkspaces"
  53. // CreateWorkspacesRequest generates a "aws/request.Request" representing the
  54. // client's request for the CreateWorkspaces operation. The "output" return
  55. // value can be used to capture response data after the request's "Send" method
  56. // is called.
  57. //
  58. // Creating a request object using this method should be used when you want to inject
  59. // custom logic into the request's lifecycle using a custom handler, or if you want to
  60. // access properties on the request object before or after sending the request. If
  61. // you just want the service response, call the CreateWorkspaces method directly
  62. // instead.
  63. //
  64. // Note: You must call the "Send" method on the returned request object in order
  65. // to execute the request.
  66. //
  67. // // Example sending a request using the CreateWorkspacesRequest method.
  68. // req, resp := client.CreateWorkspacesRequest(params)
  69. //
  70. // err := req.Send()
  71. // if err == nil { // resp is now filled
  72. // fmt.Println(resp)
  73. // }
  74. //
  75. func (c *WorkSpaces) CreateWorkspacesRequest(input *CreateWorkspacesInput) (req *request.Request, output *CreateWorkspacesOutput) {
  76. op := &request.Operation{
  77. Name: opCreateWorkspaces,
  78. HTTPMethod: "POST",
  79. HTTPPath: "/",
  80. }
  81. if input == nil {
  82. input = &CreateWorkspacesInput{}
  83. }
  84. req = c.newRequest(op, input, output)
  85. output = &CreateWorkspacesOutput{}
  86. req.Data = output
  87. return
  88. }
  89. // Creates one or more WorkSpaces.
  90. //
  91. // This operation is asynchronous and returns before the WorkSpaces are created.
  92. func (c *WorkSpaces) CreateWorkspaces(input *CreateWorkspacesInput) (*CreateWorkspacesOutput, error) {
  93. req, out := c.CreateWorkspacesRequest(input)
  94. err := req.Send()
  95. return out, err
  96. }
  97. const opDeleteTags = "DeleteTags"
  98. // DeleteTagsRequest generates a "aws/request.Request" representing the
  99. // client's request for the DeleteTags operation. The "output" return
  100. // value can be used to capture response data after the request's "Send" method
  101. // is called.
  102. //
  103. // Creating a request object using this method should be used when you want to inject
  104. // custom logic into the request's lifecycle using a custom handler, or if you want to
  105. // access properties on the request object before or after sending the request. If
  106. // you just want the service response, call the DeleteTags method directly
  107. // instead.
  108. //
  109. // Note: You must call the "Send" method on the returned request object in order
  110. // to execute the request.
  111. //
  112. // // Example sending a request using the DeleteTagsRequest method.
  113. // req, resp := client.DeleteTagsRequest(params)
  114. //
  115. // err := req.Send()
  116. // if err == nil { // resp is now filled
  117. // fmt.Println(resp)
  118. // }
  119. //
  120. func (c *WorkSpaces) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  121. op := &request.Operation{
  122. Name: opDeleteTags,
  123. HTTPMethod: "POST",
  124. HTTPPath: "/",
  125. }
  126. if input == nil {
  127. input = &DeleteTagsInput{}
  128. }
  129. req = c.newRequest(op, input, output)
  130. output = &DeleteTagsOutput{}
  131. req.Data = output
  132. return
  133. }
  134. // Deletes tags from a WorkSpace.
  135. func (c *WorkSpaces) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  136. req, out := c.DeleteTagsRequest(input)
  137. err := req.Send()
  138. return out, err
  139. }
  140. const opDescribeTags = "DescribeTags"
  141. // DescribeTagsRequest generates a "aws/request.Request" representing the
  142. // client's request for the DescribeTags operation. The "output" return
  143. // value can be used to capture response data after the request's "Send" method
  144. // is called.
  145. //
  146. // Creating a request object using this method should be used when you want to inject
  147. // custom logic into the request's lifecycle using a custom handler, or if you want to
  148. // access properties on the request object before or after sending the request. If
  149. // you just want the service response, call the DescribeTags method directly
  150. // instead.
  151. //
  152. // Note: You must call the "Send" method on the returned request object in order
  153. // to execute the request.
  154. //
  155. // // Example sending a request using the DescribeTagsRequest method.
  156. // req, resp := client.DescribeTagsRequest(params)
  157. //
  158. // err := req.Send()
  159. // if err == nil { // resp is now filled
  160. // fmt.Println(resp)
  161. // }
  162. //
  163. func (c *WorkSpaces) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  164. op := &request.Operation{
  165. Name: opDescribeTags,
  166. HTTPMethod: "POST",
  167. HTTPPath: "/",
  168. }
  169. if input == nil {
  170. input = &DescribeTagsInput{}
  171. }
  172. req = c.newRequest(op, input, output)
  173. output = &DescribeTagsOutput{}
  174. req.Data = output
  175. return
  176. }
  177. // Describes tags for a WorkSpace.
  178. func (c *WorkSpaces) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  179. req, out := c.DescribeTagsRequest(input)
  180. err := req.Send()
  181. return out, err
  182. }
  183. const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles"
  184. // DescribeWorkspaceBundlesRequest generates a "aws/request.Request" representing the
  185. // client's request for the DescribeWorkspaceBundles operation. The "output" return
  186. // value can be used to capture response data after the request's "Send" method
  187. // is called.
  188. //
  189. // Creating a request object using this method should be used when you want to inject
  190. // custom logic into the request's lifecycle using a custom handler, or if you want to
  191. // access properties on the request object before or after sending the request. If
  192. // you just want the service response, call the DescribeWorkspaceBundles method directly
  193. // instead.
  194. //
  195. // Note: You must call the "Send" method on the returned request object in order
  196. // to execute the request.
  197. //
  198. // // Example sending a request using the DescribeWorkspaceBundlesRequest method.
  199. // req, resp := client.DescribeWorkspaceBundlesRequest(params)
  200. //
  201. // err := req.Send()
  202. // if err == nil { // resp is now filled
  203. // fmt.Println(resp)
  204. // }
  205. //
  206. func (c *WorkSpaces) DescribeWorkspaceBundlesRequest(input *DescribeWorkspaceBundlesInput) (req *request.Request, output *DescribeWorkspaceBundlesOutput) {
  207. op := &request.Operation{
  208. Name: opDescribeWorkspaceBundles,
  209. HTTPMethod: "POST",
  210. HTTPPath: "/",
  211. Paginator: &request.Paginator{
  212. InputTokens: []string{"NextToken"},
  213. OutputTokens: []string{"NextToken"},
  214. LimitToken: "",
  215. TruncationToken: "",
  216. },
  217. }
  218. if input == nil {
  219. input = &DescribeWorkspaceBundlesInput{}
  220. }
  221. req = c.newRequest(op, input, output)
  222. output = &DescribeWorkspaceBundlesOutput{}
  223. req.Data = output
  224. return
  225. }
  226. // Obtains information about the WorkSpace bundles that are available to your
  227. // account in the specified region.
  228. //
  229. // You can filter the results with either the BundleIds parameter, or the Owner
  230. // parameter, but not both.
  231. //
  232. // This operation supports pagination with the use of the NextToken request
  233. // and response parameters. If more results are available, the NextToken response
  234. // member contains a token that you pass in the next call to this operation
  235. // to retrieve the next set of items.
  236. func (c *WorkSpaces) DescribeWorkspaceBundles(input *DescribeWorkspaceBundlesInput) (*DescribeWorkspaceBundlesOutput, error) {
  237. req, out := c.DescribeWorkspaceBundlesRequest(input)
  238. err := req.Send()
  239. return out, err
  240. }
  241. // DescribeWorkspaceBundlesPages iterates over the pages of a DescribeWorkspaceBundles operation,
  242. // calling the "fn" function with the response data for each page. To stop
  243. // iterating, return false from the fn function.
  244. //
  245. // See DescribeWorkspaceBundles method for more information on how to use this operation.
  246. //
  247. // Note: This operation can generate multiple requests to a service.
  248. //
  249. // // Example iterating over at most 3 pages of a DescribeWorkspaceBundles operation.
  250. // pageNum := 0
  251. // err := client.DescribeWorkspaceBundlesPages(params,
  252. // func(page *DescribeWorkspaceBundlesOutput, lastPage bool) bool {
  253. // pageNum++
  254. // fmt.Println(page)
  255. // return pageNum <= 3
  256. // })
  257. //
  258. func (c *WorkSpaces) DescribeWorkspaceBundlesPages(input *DescribeWorkspaceBundlesInput, fn func(p *DescribeWorkspaceBundlesOutput, lastPage bool) (shouldContinue bool)) error {
  259. page, _ := c.DescribeWorkspaceBundlesRequest(input)
  260. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  261. return page.EachPage(func(p interface{}, lastPage bool) bool {
  262. return fn(p.(*DescribeWorkspaceBundlesOutput), lastPage)
  263. })
  264. }
  265. const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories"
  266. // DescribeWorkspaceDirectoriesRequest generates a "aws/request.Request" representing the
  267. // client's request for the DescribeWorkspaceDirectories operation. The "output" return
  268. // value can be used to capture response data after the request's "Send" method
  269. // is called.
  270. //
  271. // Creating a request object using this method should be used when you want to inject
  272. // custom logic into the request's lifecycle using a custom handler, or if you want to
  273. // access properties on the request object before or after sending the request. If
  274. // you just want the service response, call the DescribeWorkspaceDirectories method directly
  275. // instead.
  276. //
  277. // Note: You must call the "Send" method on the returned request object in order
  278. // to execute the request.
  279. //
  280. // // Example sending a request using the DescribeWorkspaceDirectoriesRequest method.
  281. // req, resp := client.DescribeWorkspaceDirectoriesRequest(params)
  282. //
  283. // err := req.Send()
  284. // if err == nil { // resp is now filled
  285. // fmt.Println(resp)
  286. // }
  287. //
  288. func (c *WorkSpaces) DescribeWorkspaceDirectoriesRequest(input *DescribeWorkspaceDirectoriesInput) (req *request.Request, output *DescribeWorkspaceDirectoriesOutput) {
  289. op := &request.Operation{
  290. Name: opDescribeWorkspaceDirectories,
  291. HTTPMethod: "POST",
  292. HTTPPath: "/",
  293. Paginator: &request.Paginator{
  294. InputTokens: []string{"NextToken"},
  295. OutputTokens: []string{"NextToken"},
  296. LimitToken: "",
  297. TruncationToken: "",
  298. },
  299. }
  300. if input == nil {
  301. input = &DescribeWorkspaceDirectoriesInput{}
  302. }
  303. req = c.newRequest(op, input, output)
  304. output = &DescribeWorkspaceDirectoriesOutput{}
  305. req.Data = output
  306. return
  307. }
  308. // Retrieves information about the AWS Directory Service directories in the
  309. // region that are registered with Amazon WorkSpaces and are available to your
  310. // account.
  311. //
  312. // This operation supports pagination with the use of the NextToken request
  313. // and response parameters. If more results are available, the NextToken response
  314. // member contains a token that you pass in the next call to this operation
  315. // to retrieve the next set of items.
  316. func (c *WorkSpaces) DescribeWorkspaceDirectories(input *DescribeWorkspaceDirectoriesInput) (*DescribeWorkspaceDirectoriesOutput, error) {
  317. req, out := c.DescribeWorkspaceDirectoriesRequest(input)
  318. err := req.Send()
  319. return out, err
  320. }
  321. // DescribeWorkspaceDirectoriesPages iterates over the pages of a DescribeWorkspaceDirectories operation,
  322. // calling the "fn" function with the response data for each page. To stop
  323. // iterating, return false from the fn function.
  324. //
  325. // See DescribeWorkspaceDirectories method for more information on how to use this operation.
  326. //
  327. // Note: This operation can generate multiple requests to a service.
  328. //
  329. // // Example iterating over at most 3 pages of a DescribeWorkspaceDirectories operation.
  330. // pageNum := 0
  331. // err := client.DescribeWorkspaceDirectoriesPages(params,
  332. // func(page *DescribeWorkspaceDirectoriesOutput, lastPage bool) bool {
  333. // pageNum++
  334. // fmt.Println(page)
  335. // return pageNum <= 3
  336. // })
  337. //
  338. func (c *WorkSpaces) DescribeWorkspaceDirectoriesPages(input *DescribeWorkspaceDirectoriesInput, fn func(p *DescribeWorkspaceDirectoriesOutput, lastPage bool) (shouldContinue bool)) error {
  339. page, _ := c.DescribeWorkspaceDirectoriesRequest(input)
  340. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  341. return page.EachPage(func(p interface{}, lastPage bool) bool {
  342. return fn(p.(*DescribeWorkspaceDirectoriesOutput), lastPage)
  343. })
  344. }
  345. const opDescribeWorkspaces = "DescribeWorkspaces"
  346. // DescribeWorkspacesRequest generates a "aws/request.Request" representing the
  347. // client's request for the DescribeWorkspaces operation. The "output" return
  348. // value can be used to capture response data after the request's "Send" method
  349. // is called.
  350. //
  351. // Creating a request object using this method should be used when you want to inject
  352. // custom logic into the request's lifecycle using a custom handler, or if you want to
  353. // access properties on the request object before or after sending the request. If
  354. // you just want the service response, call the DescribeWorkspaces method directly
  355. // instead.
  356. //
  357. // Note: You must call the "Send" method on the returned request object in order
  358. // to execute the request.
  359. //
  360. // // Example sending a request using the DescribeWorkspacesRequest method.
  361. // req, resp := client.DescribeWorkspacesRequest(params)
  362. //
  363. // err := req.Send()
  364. // if err == nil { // resp is now filled
  365. // fmt.Println(resp)
  366. // }
  367. //
  368. func (c *WorkSpaces) DescribeWorkspacesRequest(input *DescribeWorkspacesInput) (req *request.Request, output *DescribeWorkspacesOutput) {
  369. op := &request.Operation{
  370. Name: opDescribeWorkspaces,
  371. HTTPMethod: "POST",
  372. HTTPPath: "/",
  373. Paginator: &request.Paginator{
  374. InputTokens: []string{"NextToken"},
  375. OutputTokens: []string{"NextToken"},
  376. LimitToken: "Limit",
  377. TruncationToken: "",
  378. },
  379. }
  380. if input == nil {
  381. input = &DescribeWorkspacesInput{}
  382. }
  383. req = c.newRequest(op, input, output)
  384. output = &DescribeWorkspacesOutput{}
  385. req.Data = output
  386. return
  387. }
  388. // Obtains information about the specified WorkSpaces.
  389. //
  390. // Only one of the filter parameters, such as BundleId, DirectoryId, or WorkspaceIds,
  391. // can be specified at a time.
  392. //
  393. // This operation supports pagination with the use of the NextToken request
  394. // and response parameters. If more results are available, the NextToken response
  395. // member contains a token that you pass in the next call to this operation
  396. // to retrieve the next set of items.
  397. func (c *WorkSpaces) DescribeWorkspaces(input *DescribeWorkspacesInput) (*DescribeWorkspacesOutput, error) {
  398. req, out := c.DescribeWorkspacesRequest(input)
  399. err := req.Send()
  400. return out, err
  401. }
  402. // DescribeWorkspacesPages iterates over the pages of a DescribeWorkspaces operation,
  403. // calling the "fn" function with the response data for each page. To stop
  404. // iterating, return false from the fn function.
  405. //
  406. // See DescribeWorkspaces method for more information on how to use this operation.
  407. //
  408. // Note: This operation can generate multiple requests to a service.
  409. //
  410. // // Example iterating over at most 3 pages of a DescribeWorkspaces operation.
  411. // pageNum := 0
  412. // err := client.DescribeWorkspacesPages(params,
  413. // func(page *DescribeWorkspacesOutput, lastPage bool) bool {
  414. // pageNum++
  415. // fmt.Println(page)
  416. // return pageNum <= 3
  417. // })
  418. //
  419. func (c *WorkSpaces) DescribeWorkspacesPages(input *DescribeWorkspacesInput, fn func(p *DescribeWorkspacesOutput, lastPage bool) (shouldContinue bool)) error {
  420. page, _ := c.DescribeWorkspacesRequest(input)
  421. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  422. return page.EachPage(func(p interface{}, lastPage bool) bool {
  423. return fn(p.(*DescribeWorkspacesOutput), lastPage)
  424. })
  425. }
  426. const opRebootWorkspaces = "RebootWorkspaces"
  427. // RebootWorkspacesRequest generates a "aws/request.Request" representing the
  428. // client's request for the RebootWorkspaces operation. The "output" return
  429. // value can be used to capture response data after the request's "Send" method
  430. // is called.
  431. //
  432. // Creating a request object using this method should be used when you want to inject
  433. // custom logic into the request's lifecycle using a custom handler, or if you want to
  434. // access properties on the request object before or after sending the request. If
  435. // you just want the service response, call the RebootWorkspaces method directly
  436. // instead.
  437. //
  438. // Note: You must call the "Send" method on the returned request object in order
  439. // to execute the request.
  440. //
  441. // // Example sending a request using the RebootWorkspacesRequest method.
  442. // req, resp := client.RebootWorkspacesRequest(params)
  443. //
  444. // err := req.Send()
  445. // if err == nil { // resp is now filled
  446. // fmt.Println(resp)
  447. // }
  448. //
  449. func (c *WorkSpaces) RebootWorkspacesRequest(input *RebootWorkspacesInput) (req *request.Request, output *RebootWorkspacesOutput) {
  450. op := &request.Operation{
  451. Name: opRebootWorkspaces,
  452. HTTPMethod: "POST",
  453. HTTPPath: "/",
  454. }
  455. if input == nil {
  456. input = &RebootWorkspacesInput{}
  457. }
  458. req = c.newRequest(op, input, output)
  459. output = &RebootWorkspacesOutput{}
  460. req.Data = output
  461. return
  462. }
  463. // Reboots the specified WorkSpaces.
  464. //
  465. // To be able to reboot a WorkSpace, the WorkSpace must have a State of AVAILABLE,
  466. // IMPAIRED, or INOPERABLE.
  467. //
  468. // This operation is asynchronous and will return before the WorkSpaces have
  469. // rebooted.
  470. func (c *WorkSpaces) RebootWorkspaces(input *RebootWorkspacesInput) (*RebootWorkspacesOutput, error) {
  471. req, out := c.RebootWorkspacesRequest(input)
  472. err := req.Send()
  473. return out, err
  474. }
  475. const opRebuildWorkspaces = "RebuildWorkspaces"
  476. // RebuildWorkspacesRequest generates a "aws/request.Request" representing the
  477. // client's request for the RebuildWorkspaces operation. The "output" return
  478. // value can be used to capture response data after the request's "Send" method
  479. // is called.
  480. //
  481. // Creating a request object using this method should be used when you want to inject
  482. // custom logic into the request's lifecycle using a custom handler, or if you want to
  483. // access properties on the request object before or after sending the request. If
  484. // you just want the service response, call the RebuildWorkspaces method directly
  485. // instead.
  486. //
  487. // Note: You must call the "Send" method on the returned request object in order
  488. // to execute the request.
  489. //
  490. // // Example sending a request using the RebuildWorkspacesRequest method.
  491. // req, resp := client.RebuildWorkspacesRequest(params)
  492. //
  493. // err := req.Send()
  494. // if err == nil { // resp is now filled
  495. // fmt.Println(resp)
  496. // }
  497. //
  498. func (c *WorkSpaces) RebuildWorkspacesRequest(input *RebuildWorkspacesInput) (req *request.Request, output *RebuildWorkspacesOutput) {
  499. op := &request.Operation{
  500. Name: opRebuildWorkspaces,
  501. HTTPMethod: "POST",
  502. HTTPPath: "/",
  503. }
  504. if input == nil {
  505. input = &RebuildWorkspacesInput{}
  506. }
  507. req = c.newRequest(op, input, output)
  508. output = &RebuildWorkspacesOutput{}
  509. req.Data = output
  510. return
  511. }
  512. // Rebuilds the specified WorkSpaces.
  513. //
  514. // Rebuilding a WorkSpace is a potentially destructive action that can result
  515. // in the loss of data. Rebuilding a WorkSpace causes the following to occur:
  516. //
  517. // The system is restored to the image of the bundle that the WorkSpace is
  518. // created from. Any applications that have been installed, or system settings
  519. // that have been made since the WorkSpace was created will be lost. The data
  520. // drive (D drive) is re-created from the last automatic snapshot taken of the
  521. // data drive. The current contents of the data drive are overwritten. Automatic
  522. // snapshots of the data drive are taken every 12 hours, so the snapshot can
  523. // be as much as 12 hours old. To be able to rebuild a WorkSpace, the WorkSpace
  524. // must have a State of AVAILABLE or ERROR.
  525. //
  526. // This operation is asynchronous and will return before the WorkSpaces have
  527. // been completely rebuilt.
  528. func (c *WorkSpaces) RebuildWorkspaces(input *RebuildWorkspacesInput) (*RebuildWorkspacesOutput, error) {
  529. req, out := c.RebuildWorkspacesRequest(input)
  530. err := req.Send()
  531. return out, err
  532. }
  533. const opTerminateWorkspaces = "TerminateWorkspaces"
  534. // TerminateWorkspacesRequest generates a "aws/request.Request" representing the
  535. // client's request for the TerminateWorkspaces operation. The "output" return
  536. // value can be used to capture response data after the request's "Send" method
  537. // is called.
  538. //
  539. // Creating a request object using this method should be used when you want to inject
  540. // custom logic into the request's lifecycle using a custom handler, or if you want to
  541. // access properties on the request object before or after sending the request. If
  542. // you just want the service response, call the TerminateWorkspaces method directly
  543. // instead.
  544. //
  545. // Note: You must call the "Send" method on the returned request object in order
  546. // to execute the request.
  547. //
  548. // // Example sending a request using the TerminateWorkspacesRequest method.
  549. // req, resp := client.TerminateWorkspacesRequest(params)
  550. //
  551. // err := req.Send()
  552. // if err == nil { // resp is now filled
  553. // fmt.Println(resp)
  554. // }
  555. //
  556. func (c *WorkSpaces) TerminateWorkspacesRequest(input *TerminateWorkspacesInput) (req *request.Request, output *TerminateWorkspacesOutput) {
  557. op := &request.Operation{
  558. Name: opTerminateWorkspaces,
  559. HTTPMethod: "POST",
  560. HTTPPath: "/",
  561. }
  562. if input == nil {
  563. input = &TerminateWorkspacesInput{}
  564. }
  565. req = c.newRequest(op, input, output)
  566. output = &TerminateWorkspacesOutput{}
  567. req.Data = output
  568. return
  569. }
  570. // Terminates the specified WorkSpaces.
  571. //
  572. // Terminating a WorkSpace is a permanent action and cannot be undone. The
  573. // user's data is not maintained and will be destroyed. If you need to archive
  574. // any user data, contact Amazon Web Services before terminating the WorkSpace.
  575. //
  576. // You can terminate a WorkSpace that is in any state except SUSPENDED.
  577. //
  578. // This operation is asynchronous and will return before the WorkSpaces have
  579. // been completely terminated.
  580. func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) {
  581. req, out := c.TerminateWorkspacesRequest(input)
  582. err := req.Send()
  583. return out, err
  584. }
  585. // Contains information about the compute type of a WorkSpace bundle.
  586. type ComputeType struct {
  587. _ struct{} `type:"structure"`
  588. // The name of the compute type for the bundle.
  589. Name *string `type:"string" enum:"Compute"`
  590. }
  591. // String returns the string representation
  592. func (s ComputeType) String() string {
  593. return awsutil.Prettify(s)
  594. }
  595. // GoString returns the string representation
  596. func (s ComputeType) GoString() string {
  597. return s.String()
  598. }
  599. // The request of the create tags action.
  600. type CreateTagsInput struct {
  601. _ struct{} `type:"structure"`
  602. // The resource ID of the request.
  603. ResourceId *string `min:"1" type:"string" required:"true"`
  604. // The tags of the request.
  605. Tags []*Tag `type:"list" required:"true"`
  606. }
  607. // String returns the string representation
  608. func (s CreateTagsInput) String() string {
  609. return awsutil.Prettify(s)
  610. }
  611. // GoString returns the string representation
  612. func (s CreateTagsInput) GoString() string {
  613. return s.String()
  614. }
  615. // Validate inspects the fields of the type to determine if they are valid.
  616. func (s *CreateTagsInput) Validate() error {
  617. invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"}
  618. if s.ResourceId == nil {
  619. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  620. }
  621. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  622. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  623. }
  624. if s.Tags == nil {
  625. invalidParams.Add(request.NewErrParamRequired("Tags"))
  626. }
  627. if s.Tags != nil {
  628. for i, v := range s.Tags {
  629. if v == nil {
  630. continue
  631. }
  632. if err := v.Validate(); err != nil {
  633. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  634. }
  635. }
  636. }
  637. if invalidParams.Len() > 0 {
  638. return invalidParams
  639. }
  640. return nil
  641. }
  642. // The result of the create tags action.
  643. type CreateTagsOutput struct {
  644. _ struct{} `type:"structure"`
  645. }
  646. // String returns the string representation
  647. func (s CreateTagsOutput) String() string {
  648. return awsutil.Prettify(s)
  649. }
  650. // GoString returns the string representation
  651. func (s CreateTagsOutput) GoString() string {
  652. return s.String()
  653. }
  654. // Contains the inputs for the CreateWorkspaces operation.
  655. type CreateWorkspacesInput struct {
  656. _ struct{} `type:"structure"`
  657. // An array of structures that specify the WorkSpaces to create.
  658. Workspaces []*WorkspaceRequest `min:"1" type:"list" required:"true"`
  659. }
  660. // String returns the string representation
  661. func (s CreateWorkspacesInput) String() string {
  662. return awsutil.Prettify(s)
  663. }
  664. // GoString returns the string representation
  665. func (s CreateWorkspacesInput) GoString() string {
  666. return s.String()
  667. }
  668. // Validate inspects the fields of the type to determine if they are valid.
  669. func (s *CreateWorkspacesInput) Validate() error {
  670. invalidParams := request.ErrInvalidParams{Context: "CreateWorkspacesInput"}
  671. if s.Workspaces == nil {
  672. invalidParams.Add(request.NewErrParamRequired("Workspaces"))
  673. }
  674. if s.Workspaces != nil && len(s.Workspaces) < 1 {
  675. invalidParams.Add(request.NewErrParamMinLen("Workspaces", 1))
  676. }
  677. if s.Workspaces != nil {
  678. for i, v := range s.Workspaces {
  679. if v == nil {
  680. continue
  681. }
  682. if err := v.Validate(); err != nil {
  683. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Workspaces", i), err.(request.ErrInvalidParams))
  684. }
  685. }
  686. }
  687. if invalidParams.Len() > 0 {
  688. return invalidParams
  689. }
  690. return nil
  691. }
  692. // Contains the result of the CreateWorkspaces operation.
  693. type CreateWorkspacesOutput struct {
  694. _ struct{} `type:"structure"`
  695. // An array of structures that represent the WorkSpaces that could not be created.
  696. FailedRequests []*FailedCreateWorkspaceRequest `type:"list"`
  697. // An array of structures that represent the WorkSpaces that were created.
  698. //
  699. // Because this operation is asynchronous, the identifier in WorkspaceId is
  700. // not immediately available. If you immediately call DescribeWorkspaces with
  701. // this identifier, no information will be returned.
  702. PendingRequests []*Workspace `type:"list"`
  703. }
  704. // String returns the string representation
  705. func (s CreateWorkspacesOutput) String() string {
  706. return awsutil.Prettify(s)
  707. }
  708. // GoString returns the string representation
  709. func (s CreateWorkspacesOutput) GoString() string {
  710. return s.String()
  711. }
  712. // Contains default WorkSpace creation information.
  713. type DefaultWorkspaceCreationProperties struct {
  714. _ struct{} `type:"structure"`
  715. // The identifier of any custom security groups that are applied to the WorkSpaces
  716. // when they are created.
  717. CustomSecurityGroupId *string `type:"string"`
  718. // The organizational unit (OU) in the directory that the WorkSpace machine
  719. // accounts are placed in.
  720. DefaultOu *string `type:"string"`
  721. // A public IP address will be attached to all WorkSpaces that are created or
  722. // rebuilt.
  723. EnableInternetAccess *bool `type:"boolean"`
  724. // Specifies if the directory is enabled for Amazon WorkDocs.
  725. EnableWorkDocs *bool `type:"boolean"`
  726. // The WorkSpace user is an administrator on the WorkSpace.
  727. UserEnabledAsLocalAdministrator *bool `type:"boolean"`
  728. }
  729. // String returns the string representation
  730. func (s DefaultWorkspaceCreationProperties) String() string {
  731. return awsutil.Prettify(s)
  732. }
  733. // GoString returns the string representation
  734. func (s DefaultWorkspaceCreationProperties) GoString() string {
  735. return s.String()
  736. }
  737. // The request of the delete tags action.
  738. type DeleteTagsInput struct {
  739. _ struct{} `type:"structure"`
  740. // The resource ID of the request.
  741. ResourceId *string `min:"1" type:"string" required:"true"`
  742. // The tag keys of the request.
  743. TagKeys []*string `type:"list" required:"true"`
  744. }
  745. // String returns the string representation
  746. func (s DeleteTagsInput) String() string {
  747. return awsutil.Prettify(s)
  748. }
  749. // GoString returns the string representation
  750. func (s DeleteTagsInput) GoString() string {
  751. return s.String()
  752. }
  753. // Validate inspects the fields of the type to determine if they are valid.
  754. func (s *DeleteTagsInput) Validate() error {
  755. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  756. if s.ResourceId == nil {
  757. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  758. }
  759. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  760. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  761. }
  762. if s.TagKeys == nil {
  763. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  764. }
  765. if invalidParams.Len() > 0 {
  766. return invalidParams
  767. }
  768. return nil
  769. }
  770. // The result of the delete tags action.
  771. type DeleteTagsOutput struct {
  772. _ struct{} `type:"structure"`
  773. }
  774. // String returns the string representation
  775. func (s DeleteTagsOutput) String() string {
  776. return awsutil.Prettify(s)
  777. }
  778. // GoString returns the string representation
  779. func (s DeleteTagsOutput) GoString() string {
  780. return s.String()
  781. }
  782. // The request of the describe tags action.
  783. type DescribeTagsInput struct {
  784. _ struct{} `type:"structure"`
  785. // The resource ID of the request.
  786. ResourceId *string `min:"1" type:"string" required:"true"`
  787. }
  788. // String returns the string representation
  789. func (s DescribeTagsInput) String() string {
  790. return awsutil.Prettify(s)
  791. }
  792. // GoString returns the string representation
  793. func (s DescribeTagsInput) GoString() string {
  794. return s.String()
  795. }
  796. // Validate inspects the fields of the type to determine if they are valid.
  797. func (s *DescribeTagsInput) Validate() error {
  798. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  799. if s.ResourceId == nil {
  800. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  801. }
  802. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  803. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  804. }
  805. if invalidParams.Len() > 0 {
  806. return invalidParams
  807. }
  808. return nil
  809. }
  810. // The result of the describe tags action.
  811. type DescribeTagsOutput struct {
  812. _ struct{} `type:"structure"`
  813. // The list of tags.
  814. TagList []*Tag `type:"list"`
  815. }
  816. // String returns the string representation
  817. func (s DescribeTagsOutput) String() string {
  818. return awsutil.Prettify(s)
  819. }
  820. // GoString returns the string representation
  821. func (s DescribeTagsOutput) GoString() string {
  822. return s.String()
  823. }
  824. // Contains the inputs for the DescribeWorkspaceBundles operation.
  825. type DescribeWorkspaceBundlesInput struct {
  826. _ struct{} `type:"structure"`
  827. // An array of strings that contains the identifiers of the bundles to retrieve.
  828. // This parameter cannot be combined with any other filter parameter.
  829. BundleIds []*string `min:"1" type:"list"`
  830. // The NextToken value from a previous call to this operation. Pass null if
  831. // this is the first call.
  832. NextToken *string `min:"1" type:"string"`
  833. // The owner of the bundles to retrieve. This parameter cannot be combined with
  834. // any other filter parameter.
  835. //
  836. // This contains one of the following values:
  837. //
  838. // null - Retrieves the bundles that belong to the account making the call.
  839. // AMAZON - Retrieves the bundles that are provided by AWS.
  840. Owner *string `type:"string"`
  841. }
  842. // String returns the string representation
  843. func (s DescribeWorkspaceBundlesInput) String() string {
  844. return awsutil.Prettify(s)
  845. }
  846. // GoString returns the string representation
  847. func (s DescribeWorkspaceBundlesInput) GoString() string {
  848. return s.String()
  849. }
  850. // Validate inspects the fields of the type to determine if they are valid.
  851. func (s *DescribeWorkspaceBundlesInput) Validate() error {
  852. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceBundlesInput"}
  853. if s.BundleIds != nil && len(s.BundleIds) < 1 {
  854. invalidParams.Add(request.NewErrParamMinLen("BundleIds", 1))
  855. }
  856. if s.NextToken != nil && len(*s.NextToken) < 1 {
  857. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  858. }
  859. if invalidParams.Len() > 0 {
  860. return invalidParams
  861. }
  862. return nil
  863. }
  864. // Contains the results of the DescribeWorkspaceBundles operation.
  865. type DescribeWorkspaceBundlesOutput struct {
  866. _ struct{} `type:"structure"`
  867. // An array of structures that contain information about the bundles.
  868. Bundles []*WorkspaceBundle `type:"list"`
  869. // If not null, more results are available. Pass this value for the NextToken
  870. // parameter in a subsequent call to this operation to retrieve the next set
  871. // of items. This token is valid for one day and must be used within that timeframe.
  872. NextToken *string `min:"1" type:"string"`
  873. }
  874. // String returns the string representation
  875. func (s DescribeWorkspaceBundlesOutput) String() string {
  876. return awsutil.Prettify(s)
  877. }
  878. // GoString returns the string representation
  879. func (s DescribeWorkspaceBundlesOutput) GoString() string {
  880. return s.String()
  881. }
  882. // Contains the inputs for the DescribeWorkspaceDirectories operation.
  883. type DescribeWorkspaceDirectoriesInput struct {
  884. _ struct{} `type:"structure"`
  885. // An array of strings that contains the directory identifiers to retrieve information
  886. // for. If this member is null, all directories are retrieved.
  887. DirectoryIds []*string `min:"1" type:"list"`
  888. // The NextToken value from a previous call to this operation. Pass null if
  889. // this is the first call.
  890. NextToken *string `min:"1" type:"string"`
  891. }
  892. // String returns the string representation
  893. func (s DescribeWorkspaceDirectoriesInput) String() string {
  894. return awsutil.Prettify(s)
  895. }
  896. // GoString returns the string representation
  897. func (s DescribeWorkspaceDirectoriesInput) GoString() string {
  898. return s.String()
  899. }
  900. // Validate inspects the fields of the type to determine if they are valid.
  901. func (s *DescribeWorkspaceDirectoriesInput) Validate() error {
  902. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceDirectoriesInput"}
  903. if s.DirectoryIds != nil && len(s.DirectoryIds) < 1 {
  904. invalidParams.Add(request.NewErrParamMinLen("DirectoryIds", 1))
  905. }
  906. if s.NextToken != nil && len(*s.NextToken) < 1 {
  907. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  908. }
  909. if invalidParams.Len() > 0 {
  910. return invalidParams
  911. }
  912. return nil
  913. }
  914. // Contains the results of the DescribeWorkspaceDirectories operation.
  915. type DescribeWorkspaceDirectoriesOutput struct {
  916. _ struct{} `type:"structure"`
  917. // An array of structures that contain information about the directories.
  918. Directories []*WorkspaceDirectory `type:"list"`
  919. // If not null, more results are available. Pass this value for the NextToken
  920. // parameter in a subsequent call to this operation to retrieve the next set
  921. // of items. This token is valid for one day and must be used within that timeframe.
  922. NextToken *string `min:"1" type:"string"`
  923. }
  924. // String returns the string representation
  925. func (s DescribeWorkspaceDirectoriesOutput) String() string {
  926. return awsutil.Prettify(s)
  927. }
  928. // GoString returns the string representation
  929. func (s DescribeWorkspaceDirectoriesOutput) GoString() string {
  930. return s.String()
  931. }
  932. // Contains the inputs for the DescribeWorkspaces operation.
  933. type DescribeWorkspacesInput struct {
  934. _ struct{} `type:"structure"`
  935. // The identifier of a bundle to obtain the WorkSpaces for. All WorkSpaces that
  936. // are created from this bundle will be retrieved. This parameter cannot be
  937. // combined with any other filter parameter.
  938. BundleId *string `type:"string"`
  939. // Specifies the directory identifier to which to limit the WorkSpaces. Optionally,
  940. // you can specify a specific directory user with the UserName parameter. This
  941. // parameter cannot be combined with any other filter parameter.
  942. DirectoryId *string `type:"string"`
  943. // The maximum number of items to return.
  944. Limit *int64 `min:"1" type:"integer"`
  945. // The NextToken value from a previous call to this operation. Pass null if
  946. // this is the first call.
  947. NextToken *string `min:"1" type:"string"`
  948. // Used with the DirectoryId parameter to specify the directory user for which
  949. // to obtain the WorkSpace.
  950. UserName *string `min:"1" type:"string"`
  951. // An array of strings that contain the identifiers of the WorkSpaces for which
  952. // to retrieve information. This parameter cannot be combined with any other
  953. // filter parameter.
  954. //
  955. // Because the CreateWorkspaces operation is asynchronous, the identifier returned
  956. // by CreateWorkspaces is not immediately available. If you immediately call
  957. // DescribeWorkspaces with this identifier, no information will be returned.
  958. WorkspaceIds []*string `min:"1" type:"list"`
  959. }
  960. // String returns the string representation
  961. func (s DescribeWorkspacesInput) String() string {
  962. return awsutil.Prettify(s)
  963. }
  964. // GoString returns the string representation
  965. func (s DescribeWorkspacesInput) GoString() string {
  966. return s.String()
  967. }
  968. // Validate inspects the fields of the type to determine if they are valid.
  969. func (s *DescribeWorkspacesInput) Validate() error {
  970. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesInput"}
  971. if s.Limit != nil && *s.Limit < 1 {
  972. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  973. }
  974. if s.NextToken != nil && len(*s.NextToken) < 1 {
  975. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  976. }
  977. if s.UserName != nil && len(*s.UserName) < 1 {
  978. invalidParams.Add(request.NewErrParamMinLen("UserName", 1))
  979. }
  980. if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 {
  981. invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1))
  982. }
  983. if invalidParams.Len() > 0 {
  984. return invalidParams
  985. }
  986. return nil
  987. }
  988. // Contains the results for the DescribeWorkspaces operation.
  989. type DescribeWorkspacesOutput struct {
  990. _ struct{} `type:"structure"`
  991. // If not null, more results are available. Pass this value for the NextToken
  992. // parameter in a subsequent call to this operation to retrieve the next set
  993. // of items. This token is valid for one day and must be used within that timeframe.
  994. NextToken *string `min:"1" type:"string"`
  995. // An array of structures that contain the information about the WorkSpaces.
  996. //
  997. // Because the CreateWorkspaces operation is asynchronous, some of this information
  998. // may be incomplete for a newly-created WorkSpace.
  999. Workspaces []*Workspace `type:"list"`
  1000. }
  1001. // String returns the string representation
  1002. func (s DescribeWorkspacesOutput) String() string {
  1003. return awsutil.Prettify(s)
  1004. }
  1005. // GoString returns the string representation
  1006. func (s DescribeWorkspacesOutput) GoString() string {
  1007. return s.String()
  1008. }
  1009. // Contains information about a WorkSpace that could not be created.
  1010. type FailedCreateWorkspaceRequest struct {
  1011. _ struct{} `type:"structure"`
  1012. // The error code.
  1013. ErrorCode *string `type:"string"`
  1014. // The textual error message.
  1015. ErrorMessage *string `type:"string"`
  1016. // A WorkspaceRequest object that contains the information about the WorkSpace
  1017. // that could not be created.
  1018. WorkspaceRequest *WorkspaceRequest `type:"structure"`
  1019. }
  1020. // String returns the string representation
  1021. func (s FailedCreateWorkspaceRequest) String() string {
  1022. return awsutil.Prettify(s)
  1023. }
  1024. // GoString returns the string representation
  1025. func (s FailedCreateWorkspaceRequest) GoString() string {
  1026. return s.String()
  1027. }
  1028. // Contains information about a WorkSpace that could not be rebooted (RebootWorkspaces),
  1029. // rebuilt (RebuildWorkspaces), or terminated (TerminateWorkspaces).
  1030. type FailedWorkspaceChangeRequest struct {
  1031. _ struct{} `type:"structure"`
  1032. // The error code.
  1033. ErrorCode *string `type:"string"`
  1034. // The textual error message.
  1035. ErrorMessage *string `type:"string"`
  1036. // The identifier of the WorkSpace.
  1037. WorkspaceId *string `type:"string"`
  1038. }
  1039. // String returns the string representation
  1040. func (s FailedWorkspaceChangeRequest) String() string {
  1041. return awsutil.Prettify(s)
  1042. }
  1043. // GoString returns the string representation
  1044. func (s FailedWorkspaceChangeRequest) GoString() string {
  1045. return s.String()
  1046. }
  1047. // Contains information used with the RebootWorkspaces operation to reboot a
  1048. // WorkSpace.
  1049. type RebootRequest struct {
  1050. _ struct{} `type:"structure"`
  1051. // The identifier of the WorkSpace to reboot.
  1052. WorkspaceId *string `type:"string" required:"true"`
  1053. }
  1054. // String returns the string representation
  1055. func (s RebootRequest) String() string {
  1056. return awsutil.Prettify(s)
  1057. }
  1058. // GoString returns the string representation
  1059. func (s RebootRequest) GoString() string {
  1060. return s.String()
  1061. }
  1062. // Validate inspects the fields of the type to determine if they are valid.
  1063. func (s *RebootRequest) Validate() error {
  1064. invalidParams := request.ErrInvalidParams{Context: "RebootRequest"}
  1065. if s.WorkspaceId == nil {
  1066. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  1067. }
  1068. if invalidParams.Len() > 0 {
  1069. return invalidParams
  1070. }
  1071. return nil
  1072. }
  1073. // Contains the inputs for the RebootWorkspaces operation.
  1074. type RebootWorkspacesInput struct {
  1075. _ struct{} `type:"structure"`
  1076. // An array of structures that specify the WorkSpaces to reboot.
  1077. RebootWorkspaceRequests []*RebootRequest `min:"1" type:"list" required:"true"`
  1078. }
  1079. // String returns the string representation
  1080. func (s RebootWorkspacesInput) String() string {
  1081. return awsutil.Prettify(s)
  1082. }
  1083. // GoString returns the string representation
  1084. func (s RebootWorkspacesInput) GoString() string {
  1085. return s.String()
  1086. }
  1087. // Validate inspects the fields of the type to determine if they are valid.
  1088. func (s *RebootWorkspacesInput) Validate() error {
  1089. invalidParams := request.ErrInvalidParams{Context: "RebootWorkspacesInput"}
  1090. if s.RebootWorkspaceRequests == nil {
  1091. invalidParams.Add(request.NewErrParamRequired("RebootWorkspaceRequests"))
  1092. }
  1093. if s.RebootWorkspaceRequests != nil && len(s.RebootWorkspaceRequests) < 1 {
  1094. invalidParams.Add(request.NewErrParamMinLen("RebootWorkspaceRequests", 1))
  1095. }
  1096. if s.RebootWorkspaceRequests != nil {
  1097. for i, v := range s.RebootWorkspaceRequests {
  1098. if v == nil {
  1099. continue
  1100. }
  1101. if err := v.Validate(); err != nil {
  1102. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebootWorkspaceRequests", i), err.(request.ErrInvalidParams))
  1103. }
  1104. }
  1105. }
  1106. if invalidParams.Len() > 0 {
  1107. return invalidParams
  1108. }
  1109. return nil
  1110. }
  1111. // Contains the results of the RebootWorkspaces operation.
  1112. type RebootWorkspacesOutput struct {
  1113. _ struct{} `type:"structure"`
  1114. // An array of structures that represent any WorkSpaces that could not be rebooted.
  1115. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1116. }
  1117. // String returns the string representation
  1118. func (s RebootWorkspacesOutput) String() string {
  1119. return awsutil.Prettify(s)
  1120. }
  1121. // GoString returns the string representation
  1122. func (s RebootWorkspacesOutput) GoString() string {
  1123. return s.String()
  1124. }
  1125. // Contains information used with the RebuildWorkspaces operation to rebuild
  1126. // a WorkSpace.
  1127. type RebuildRequest struct {
  1128. _ struct{} `type:"structure"`
  1129. // The identifier of the WorkSpace to rebuild.
  1130. WorkspaceId *string `type:"string" required:"true"`
  1131. }
  1132. // String returns the string representation
  1133. func (s RebuildRequest) String() string {
  1134. return awsutil.Prettify(s)
  1135. }
  1136. // GoString returns the string representation
  1137. func (s RebuildRequest) GoString() string {
  1138. return s.String()
  1139. }
  1140. // Validate inspects the fields of the type to determine if they are valid.
  1141. func (s *RebuildRequest) Validate() error {
  1142. invalidParams := request.ErrInvalidParams{Context: "RebuildRequest"}
  1143. if s.WorkspaceId == nil {
  1144. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  1145. }
  1146. if invalidParams.Len() > 0 {
  1147. return invalidParams
  1148. }
  1149. return nil
  1150. }
  1151. // Contains the inputs for the RebuildWorkspaces operation.
  1152. type RebuildWorkspacesInput struct {
  1153. _ struct{} `type:"structure"`
  1154. // An array of structures that specify the WorkSpaces to rebuild.
  1155. RebuildWorkspaceRequests []*RebuildRequest `min:"1" type:"list" required:"true"`
  1156. }
  1157. // String returns the string representation
  1158. func (s RebuildWorkspacesInput) String() string {
  1159. return awsutil.Prettify(s)
  1160. }
  1161. // GoString returns the string representation
  1162. func (s RebuildWorkspacesInput) GoString() string {
  1163. return s.String()
  1164. }
  1165. // Validate inspects the fields of the type to determine if they are valid.
  1166. func (s *RebuildWorkspacesInput) Validate() error {
  1167. invalidParams := request.ErrInvalidParams{Context: "RebuildWorkspacesInput"}
  1168. if s.RebuildWorkspaceRequests == nil {
  1169. invalidParams.Add(request.NewErrParamRequired("RebuildWorkspaceRequests"))
  1170. }
  1171. if s.RebuildWorkspaceRequests != nil && len(s.RebuildWorkspaceRequests) < 1 {
  1172. invalidParams.Add(request.NewErrParamMinLen("RebuildWorkspaceRequests", 1))
  1173. }
  1174. if s.RebuildWorkspaceRequests != nil {
  1175. for i, v := range s.RebuildWorkspaceRequests {
  1176. if v == nil {
  1177. continue
  1178. }
  1179. if err := v.Validate(); err != nil {
  1180. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebuildWorkspaceRequests", i), err.(request.ErrInvalidParams))
  1181. }
  1182. }
  1183. }
  1184. if invalidParams.Len() > 0 {
  1185. return invalidParams
  1186. }
  1187. return nil
  1188. }
  1189. // Contains the results of the RebuildWorkspaces operation.
  1190. type RebuildWorkspacesOutput struct {
  1191. _ struct{} `type:"structure"`
  1192. // An array of structures that represent any WorkSpaces that could not be rebuilt.
  1193. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1194. }
  1195. // String returns the string representation
  1196. func (s RebuildWorkspacesOutput) String() string {
  1197. return awsutil.Prettify(s)
  1198. }
  1199. // GoString returns the string representation
  1200. func (s RebuildWorkspacesOutput) GoString() string {
  1201. return s.String()
  1202. }
  1203. // Describes the tag of the WorkSpace.
  1204. type Tag struct {
  1205. _ struct{} `type:"structure"`
  1206. // The key of the tag.
  1207. Key *string `min:"1" type:"string" required:"true"`
  1208. // The value of the tag.
  1209. Value *string `type:"string"`
  1210. }
  1211. // String returns the string representation
  1212. func (s Tag) String() string {
  1213. return awsutil.Prettify(s)
  1214. }
  1215. // GoString returns the string representation
  1216. func (s Tag) GoString() string {
  1217. return s.String()
  1218. }
  1219. // Validate inspects the fields of the type to determine if they are valid.
  1220. func (s *Tag) Validate() error {
  1221. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  1222. if s.Key == nil {
  1223. invalidParams.Add(request.NewErrParamRequired("Key"))
  1224. }
  1225. if s.Key != nil && len(*s.Key) < 1 {
  1226. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  1227. }
  1228. if invalidParams.Len() > 0 {
  1229. return invalidParams
  1230. }
  1231. return nil
  1232. }
  1233. // Contains information used with the TerminateWorkspaces operation to terminate
  1234. // a WorkSpace.
  1235. type TerminateRequest struct {
  1236. _ struct{} `type:"structure"`
  1237. // The identifier of the WorkSpace to terminate.
  1238. WorkspaceId *string `type:"string" required:"true"`
  1239. }
  1240. // String returns the string representation
  1241. func (s TerminateRequest) String() string {
  1242. return awsutil.Prettify(s)
  1243. }
  1244. // GoString returns the string representation
  1245. func (s TerminateRequest) GoString() string {
  1246. return s.String()
  1247. }
  1248. // Validate inspects the fields of the type to determine if they are valid.
  1249. func (s *TerminateRequest) Validate() error {
  1250. invalidParams := request.ErrInvalidParams{Context: "TerminateRequest"}
  1251. if s.WorkspaceId == nil {
  1252. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  1253. }
  1254. if invalidParams.Len() > 0 {
  1255. return invalidParams
  1256. }
  1257. return nil
  1258. }
  1259. // Contains the inputs for the TerminateWorkspaces operation.
  1260. type TerminateWorkspacesInput struct {
  1261. _ struct{} `type:"structure"`
  1262. // An array of structures that specify the WorkSpaces to terminate.
  1263. TerminateWorkspaceRequests []*TerminateRequest `min:"1" type:"list" required:"true"`
  1264. }
  1265. // String returns the string representation
  1266. func (s TerminateWorkspacesInput) String() string {
  1267. return awsutil.Prettify(s)
  1268. }
  1269. // GoString returns the string representation
  1270. func (s TerminateWorkspacesInput) GoString() string {
  1271. return s.String()
  1272. }
  1273. // Validate inspects the fields of the type to determine if they are valid.
  1274. func (s *TerminateWorkspacesInput) Validate() error {
  1275. invalidParams := request.ErrInvalidParams{Context: "TerminateWorkspacesInput"}
  1276. if s.TerminateWorkspaceRequests == nil {
  1277. invalidParams.Add(request.NewErrParamRequired("TerminateWorkspaceRequests"))
  1278. }
  1279. if s.TerminateWorkspaceRequests != nil && len(s.TerminateWorkspaceRequests) < 1 {
  1280. invalidParams.Add(request.NewErrParamMinLen("TerminateWorkspaceRequests", 1))
  1281. }
  1282. if s.TerminateWorkspaceRequests != nil {
  1283. for i, v := range s.TerminateWorkspaceRequests {
  1284. if v == nil {
  1285. continue
  1286. }
  1287. if err := v.Validate(); err != nil {
  1288. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TerminateWorkspaceRequests", i), err.(request.ErrInvalidParams))
  1289. }
  1290. }
  1291. }
  1292. if invalidParams.Len() > 0 {
  1293. return invalidParams
  1294. }
  1295. return nil
  1296. }
  1297. // Contains the results of the TerminateWorkspaces operation.
  1298. type TerminateWorkspacesOutput struct {
  1299. _ struct{} `type:"structure"`
  1300. // An array of structures that represent any WorkSpaces that could not be terminated.
  1301. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  1302. }
  1303. // String returns the string representation
  1304. func (s TerminateWorkspacesOutput) String() string {
  1305. return awsutil.Prettify(s)
  1306. }
  1307. // GoString returns the string representation
  1308. func (s TerminateWorkspacesOutput) GoString() string {
  1309. return s.String()
  1310. }
  1311. // Contains information about the user storage for a WorkSpace bundle.
  1312. type UserStorage struct {
  1313. _ struct{} `type:"structure"`
  1314. // The amount of user storage for the bundle.
  1315. Capacity *string `min:"1" type:"string"`
  1316. }
  1317. // String returns the string representation
  1318. func (s UserStorage) String() string {
  1319. return awsutil.Prettify(s)
  1320. }
  1321. // GoString returns the string representation
  1322. func (s UserStorage) GoString() string {
  1323. return s.String()
  1324. }
  1325. // Contains information about a WorkSpace.
  1326. type Workspace struct {
  1327. _ struct{} `type:"structure"`
  1328. // The identifier of the bundle that the WorkSpace was created from.
  1329. BundleId *string `type:"string"`
  1330. // The name of the WorkSpace as seen by the operating system.
  1331. ComputerName *string `type:"string"`
  1332. // The identifier of the AWS Directory Service directory that the WorkSpace
  1333. // belongs to.
  1334. DirectoryId *string `type:"string"`
  1335. // If the WorkSpace could not be created, this contains the error code.
  1336. ErrorCode *string `type:"string"`
  1337. // If the WorkSpace could not be created, this contains a textual error message
  1338. // that describes the failure.
  1339. ErrorMessage *string `type:"string"`
  1340. // The IP address of the WorkSpace.
  1341. IpAddress *string `type:"string"`
  1342. // Specifies whether the data stored on the root volume, or C: drive, is encrypted.
  1343. RootVolumeEncryptionEnabled *bool `type:"boolean"`
  1344. // The operational state of the WorkSpace.
  1345. State *string `type:"string" enum:"WorkspaceState"`
  1346. // The identifier of the subnet that the WorkSpace is in.
  1347. SubnetId *string `type:"string"`
  1348. // The user that the WorkSpace is assigned to.
  1349. UserName *string `min:"1" type:"string"`
  1350. // Specifies whether the data stored on the user volume, or D: drive, is encrypted.
  1351. UserVolumeEncryptionEnabled *bool `type:"boolean"`
  1352. // The KMS key used to encrypt data stored on your WorkSpace.
  1353. VolumeEncryptionKey *string `type:"string"`
  1354. // The identifier of the WorkSpace.
  1355. WorkspaceId *string `type:"string"`
  1356. }
  1357. // String returns the string representation
  1358. func (s Workspace) String() string {
  1359. return awsutil.Prettify(s)
  1360. }
  1361. // GoString returns the string representation
  1362. func (s Workspace) GoString() string {
  1363. return s.String()
  1364. }
  1365. // Contains information about a WorkSpace bundle.
  1366. type WorkspaceBundle struct {
  1367. _ struct{} `type:"structure"`
  1368. // The bundle identifier.
  1369. BundleId *string `type:"string"`
  1370. // A ComputeType object that specifies the compute type for the bundle.
  1371. ComputeType *ComputeType `type:"structure"`
  1372. // The bundle description.
  1373. Description *string `type:"string"`
  1374. // The name of the bundle.
  1375. Name *string `min:"1" type:"string"`
  1376. // The owner of the bundle. This contains the owner's account identifier, or
  1377. // AMAZON if the bundle is provided by AWS.
  1378. Owner *string `type:"string"`
  1379. // A UserStorage object that specifies the amount of user storage that the bundle
  1380. // contains.
  1381. UserStorage *UserStorage `type:"structure"`
  1382. }
  1383. // String returns the string representation
  1384. func (s WorkspaceBundle) String() string {
  1385. return awsutil.Prettify(s)
  1386. }
  1387. // GoString returns the string representation
  1388. func (s WorkspaceBundle) GoString() string {
  1389. return s.String()
  1390. }
  1391. // Contains information about an AWS Directory Service directory for use with
  1392. // Amazon WorkSpaces.
  1393. type WorkspaceDirectory struct {
  1394. _ struct{} `type:"structure"`
  1395. // The directory alias.
  1396. Alias *string `type:"string"`
  1397. // The user name for the service account.
  1398. CustomerUserName *string `min:"1" type:"string"`
  1399. // The directory identifier.
  1400. DirectoryId *string `type:"string"`
  1401. // The name of the directory.
  1402. DirectoryName *string `type:"string"`
  1403. // The directory type.
  1404. DirectoryType *string `type:"string" enum:"WorkspaceDirectoryType"`
  1405. // An array of strings that contains the IP addresses of the DNS servers for
  1406. // the directory.
  1407. DnsIpAddresses []*string `type:"list"`
  1408. // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces
  1409. // to make calls to other services, such as Amazon EC2, on your behalf.
  1410. IamRoleId *string `type:"string"`
  1411. // The registration code for the directory. This is the code that users enter
  1412. // in their Amazon WorkSpaces client application to connect to the directory.
  1413. RegistrationCode *string `min:"1" type:"string"`
  1414. // The state of the directory's registration with Amazon WorkSpaces
  1415. State *string `type:"string" enum:"WorkspaceDirectoryState"`
  1416. // An array of strings that contains the identifiers of the subnets used with
  1417. // the directory.
  1418. SubnetIds []*string `type:"list"`
  1419. // A structure that specifies the default creation properties for all WorkSpaces
  1420. // in the directory.
  1421. WorkspaceCreationProperties *DefaultWorkspaceCreationProperties `type:"structure"`
  1422. // The identifier of the security group that is assigned to new WorkSpaces.
  1423. WorkspaceSecurityGroupId *string `type:"string"`
  1424. }
  1425. // String returns the string representation
  1426. func (s WorkspaceDirectory) String() string {
  1427. return awsutil.Prettify(s)
  1428. }
  1429. // GoString returns the string representation
  1430. func (s WorkspaceDirectory) GoString() string {
  1431. return s.String()
  1432. }
  1433. // Contains information about a WorkSpace creation request.
  1434. type WorkspaceRequest struct {
  1435. _ struct{} `type:"structure"`
  1436. // The identifier of the bundle to create the WorkSpace from. You can use the
  1437. // DescribeWorkspaceBundles operation to obtain a list of the bundles that are
  1438. // available.
  1439. BundleId *string `type:"string" required:"true"`
  1440. // The identifier of the AWS Directory Service directory to create the WorkSpace
  1441. // in. You can use the DescribeWorkspaceDirectories operation to obtain a list
  1442. // of the directories that are available.
  1443. DirectoryId *string `type:"string" required:"true"`
  1444. // Specifies whether the data stored on the root volume, or C: drive, is encrypted.
  1445. RootVolumeEncryptionEnabled *bool `type:"boolean"`
  1446. // The tags of the WorkSpace request.
  1447. Tags []*Tag `type:"list"`
  1448. // The username that the WorkSpace is assigned to. This username must exist
  1449. // in the AWS Directory Service directory specified by the DirectoryId member.
  1450. UserName *string `min:"1" type:"string" required:"true"`
  1451. // Specifies whether the data stored on the user volume, or D: drive, is encrypted.
  1452. UserVolumeEncryptionEnabled *bool `type:"boolean"`
  1453. // The KMS key used to encrypt data stored on your WorkSpace.
  1454. VolumeEncryptionKey *string `type:"string"`
  1455. }
  1456. // String returns the string representation
  1457. func (s WorkspaceRequest) String() string {
  1458. return awsutil.Prettify(s)
  1459. }
  1460. // GoString returns the string representation
  1461. func (s WorkspaceRequest) GoString() string {
  1462. return s.String()
  1463. }
  1464. // Validate inspects the fields of the type to determine if they are valid.
  1465. func (s *WorkspaceRequest) Validate() error {
  1466. invalidParams := request.ErrInvalidParams{Context: "WorkspaceRequest"}
  1467. if s.BundleId == nil {
  1468. invalidParams.Add(request.NewErrParamRequired("BundleId"))
  1469. }
  1470. if s.DirectoryId == nil {
  1471. invalidParams.Add(request.NewErrParamRequired("DirectoryId"))
  1472. }
  1473. if s.UserName == nil {
  1474. invalidParams.Add(request.NewErrParamRequired("UserName"))
  1475. }
  1476. if s.UserName != nil && len(*s.UserName) < 1 {
  1477. invalidParams.Add(request.NewErrParamMinLen("UserName", 1))
  1478. }
  1479. if s.Tags != nil {
  1480. for i, v := range s.Tags {
  1481. if v == nil {
  1482. continue
  1483. }
  1484. if err := v.Validate(); err != nil {
  1485. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  1486. }
  1487. }
  1488. }
  1489. if invalidParams.Len() > 0 {
  1490. return invalidParams
  1491. }
  1492. return nil
  1493. }
  1494. const (
  1495. // @enum Compute
  1496. ComputeValue = "VALUE"
  1497. // @enum Compute
  1498. ComputeStandard = "STANDARD"
  1499. // @enum Compute
  1500. ComputePerformance = "PERFORMANCE"
  1501. )
  1502. const (
  1503. // @enum WorkspaceDirectoryState
  1504. WorkspaceDirectoryStateRegistering = "REGISTERING"
  1505. // @enum WorkspaceDirectoryState
  1506. WorkspaceDirectoryStateRegistered = "REGISTERED"
  1507. // @enum WorkspaceDirectoryState
  1508. WorkspaceDirectoryStateDeregistering = "DEREGISTERING"
  1509. // @enum WorkspaceDirectoryState
  1510. WorkspaceDirectoryStateDeregistered = "DEREGISTERED"
  1511. // @enum WorkspaceDirectoryState
  1512. WorkspaceDirectoryStateError = "ERROR"
  1513. )
  1514. const (
  1515. // @enum WorkspaceDirectoryType
  1516. WorkspaceDirectoryTypeSimpleAd = "SIMPLE_AD"
  1517. // @enum WorkspaceDirectoryType
  1518. WorkspaceDirectoryTypeAdConnector = "AD_CONNECTOR"
  1519. )
  1520. const (
  1521. // @enum WorkspaceState
  1522. WorkspaceStatePending = "PENDING"
  1523. // @enum WorkspaceState
  1524. WorkspaceStateAvailable = "AVAILABLE"
  1525. // @enum WorkspaceState
  1526. WorkspaceStateImpaired = "IMPAIRED"
  1527. // @enum WorkspaceState
  1528. WorkspaceStateUnhealthy = "UNHEALTHY"
  1529. // @enum WorkspaceState
  1530. WorkspaceStateRebooting = "REBOOTING"
  1531. // @enum WorkspaceState
  1532. WorkspaceStateRebuilding = "REBUILDING"
  1533. // @enum WorkspaceState
  1534. WorkspaceStateTerminating = "TERMINATING"
  1535. // @enum WorkspaceState
  1536. WorkspaceStateTerminated = "TERMINATED"
  1537. // @enum WorkspaceState
  1538. WorkspaceStateSuspended = "SUSPENDED"
  1539. // @enum WorkspaceState
  1540. WorkspaceStateError = "ERROR"
  1541. )