api.go 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package workspaces provides a client for Amazon WorkSpaces.
  3. package workspaces
  4. import (
  5. "github.com/aws/aws-sdk-go/aws/awsutil"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. )
  8. const opCreateWorkspaces = "CreateWorkspaces"
  9. // CreateWorkspacesRequest generates a request for the CreateWorkspaces operation.
  10. func (c *WorkSpaces) CreateWorkspacesRequest(input *CreateWorkspacesInput) (req *request.Request, output *CreateWorkspacesOutput) {
  11. op := &request.Operation{
  12. Name: opCreateWorkspaces,
  13. HTTPMethod: "POST",
  14. HTTPPath: "/",
  15. }
  16. if input == nil {
  17. input = &CreateWorkspacesInput{}
  18. }
  19. req = c.newRequest(op, input, output)
  20. output = &CreateWorkspacesOutput{}
  21. req.Data = output
  22. return
  23. }
  24. // Creates one or more WorkSpaces.
  25. //
  26. // This operation is asynchronous and returns before the WorkSpaces are created.
  27. func (c *WorkSpaces) CreateWorkspaces(input *CreateWorkspacesInput) (*CreateWorkspacesOutput, error) {
  28. req, out := c.CreateWorkspacesRequest(input)
  29. err := req.Send()
  30. return out, err
  31. }
  32. const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles"
  33. // DescribeWorkspaceBundlesRequest generates a request for the DescribeWorkspaceBundles operation.
  34. func (c *WorkSpaces) DescribeWorkspaceBundlesRequest(input *DescribeWorkspaceBundlesInput) (req *request.Request, output *DescribeWorkspaceBundlesOutput) {
  35. op := &request.Operation{
  36. Name: opDescribeWorkspaceBundles,
  37. HTTPMethod: "POST",
  38. HTTPPath: "/",
  39. Paginator: &request.Paginator{
  40. InputTokens: []string{"NextToken"},
  41. OutputTokens: []string{"NextToken"},
  42. LimitToken: "",
  43. TruncationToken: "",
  44. },
  45. }
  46. if input == nil {
  47. input = &DescribeWorkspaceBundlesInput{}
  48. }
  49. req = c.newRequest(op, input, output)
  50. output = &DescribeWorkspaceBundlesOutput{}
  51. req.Data = output
  52. return
  53. }
  54. // Obtains information about the WorkSpace bundles that are available to your
  55. // account in the specified region.
  56. //
  57. // You can filter the results with either the BundleIds parameter, or the Owner
  58. // parameter, but not both.
  59. //
  60. // This operation supports pagination with the use of the NextToken request
  61. // and response parameters. If more results are available, the NextToken response
  62. // member contains a token that you pass in the next call to this operation
  63. // to retrieve the next set of items.
  64. func (c *WorkSpaces) DescribeWorkspaceBundles(input *DescribeWorkspaceBundlesInput) (*DescribeWorkspaceBundlesOutput, error) {
  65. req, out := c.DescribeWorkspaceBundlesRequest(input)
  66. err := req.Send()
  67. return out, err
  68. }
  69. func (c *WorkSpaces) DescribeWorkspaceBundlesPages(input *DescribeWorkspaceBundlesInput, fn func(p *DescribeWorkspaceBundlesOutput, lastPage bool) (shouldContinue bool)) error {
  70. page, _ := c.DescribeWorkspaceBundlesRequest(input)
  71. return page.EachPage(func(p interface{}, lastPage bool) bool {
  72. return fn(p.(*DescribeWorkspaceBundlesOutput), lastPage)
  73. })
  74. }
  75. const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories"
  76. // DescribeWorkspaceDirectoriesRequest generates a request for the DescribeWorkspaceDirectories operation.
  77. func (c *WorkSpaces) DescribeWorkspaceDirectoriesRequest(input *DescribeWorkspaceDirectoriesInput) (req *request.Request, output *DescribeWorkspaceDirectoriesOutput) {
  78. op := &request.Operation{
  79. Name: opDescribeWorkspaceDirectories,
  80. HTTPMethod: "POST",
  81. HTTPPath: "/",
  82. Paginator: &request.Paginator{
  83. InputTokens: []string{"NextToken"},
  84. OutputTokens: []string{"NextToken"},
  85. LimitToken: "",
  86. TruncationToken: "",
  87. },
  88. }
  89. if input == nil {
  90. input = &DescribeWorkspaceDirectoriesInput{}
  91. }
  92. req = c.newRequest(op, input, output)
  93. output = &DescribeWorkspaceDirectoriesOutput{}
  94. req.Data = output
  95. return
  96. }
  97. // Retrieves information about the AWS Directory Service directories in the
  98. // region that are registered with Amazon WorkSpaces and are available to your
  99. // account.
  100. //
  101. // This operation supports pagination with the use of the NextToken request
  102. // and response parameters. If more results are available, the NextToken response
  103. // member contains a token that you pass in the next call to this operation
  104. // to retrieve the next set of items.
  105. func (c *WorkSpaces) DescribeWorkspaceDirectories(input *DescribeWorkspaceDirectoriesInput) (*DescribeWorkspaceDirectoriesOutput, error) {
  106. req, out := c.DescribeWorkspaceDirectoriesRequest(input)
  107. err := req.Send()
  108. return out, err
  109. }
  110. func (c *WorkSpaces) DescribeWorkspaceDirectoriesPages(input *DescribeWorkspaceDirectoriesInput, fn func(p *DescribeWorkspaceDirectoriesOutput, lastPage bool) (shouldContinue bool)) error {
  111. page, _ := c.DescribeWorkspaceDirectoriesRequest(input)
  112. return page.EachPage(func(p interface{}, lastPage bool) bool {
  113. return fn(p.(*DescribeWorkspaceDirectoriesOutput), lastPage)
  114. })
  115. }
  116. const opDescribeWorkspaces = "DescribeWorkspaces"
  117. // DescribeWorkspacesRequest generates a request for the DescribeWorkspaces operation.
  118. func (c *WorkSpaces) DescribeWorkspacesRequest(input *DescribeWorkspacesInput) (req *request.Request, output *DescribeWorkspacesOutput) {
  119. op := &request.Operation{
  120. Name: opDescribeWorkspaces,
  121. HTTPMethod: "POST",
  122. HTTPPath: "/",
  123. Paginator: &request.Paginator{
  124. InputTokens: []string{"NextToken"},
  125. OutputTokens: []string{"NextToken"},
  126. LimitToken: "Limit",
  127. TruncationToken: "",
  128. },
  129. }
  130. if input == nil {
  131. input = &DescribeWorkspacesInput{}
  132. }
  133. req = c.newRequest(op, input, output)
  134. output = &DescribeWorkspacesOutput{}
  135. req.Data = output
  136. return
  137. }
  138. // Obtains information about the specified WorkSpaces.
  139. //
  140. // Only one of the filter parameters, such as BundleId, DirectoryId, or WorkspaceIds,
  141. // can be specified at a time.
  142. //
  143. // This operation supports pagination with the use of the NextToken request
  144. // and response parameters. If more results are available, the NextToken response
  145. // member contains a token that you pass in the next call to this operation
  146. // to retrieve the next set of items.
  147. func (c *WorkSpaces) DescribeWorkspaces(input *DescribeWorkspacesInput) (*DescribeWorkspacesOutput, error) {
  148. req, out := c.DescribeWorkspacesRequest(input)
  149. err := req.Send()
  150. return out, err
  151. }
  152. func (c *WorkSpaces) DescribeWorkspacesPages(input *DescribeWorkspacesInput, fn func(p *DescribeWorkspacesOutput, lastPage bool) (shouldContinue bool)) error {
  153. page, _ := c.DescribeWorkspacesRequest(input)
  154. return page.EachPage(func(p interface{}, lastPage bool) bool {
  155. return fn(p.(*DescribeWorkspacesOutput), lastPage)
  156. })
  157. }
  158. const opRebootWorkspaces = "RebootWorkspaces"
  159. // RebootWorkspacesRequest generates a request for the RebootWorkspaces operation.
  160. func (c *WorkSpaces) RebootWorkspacesRequest(input *RebootWorkspacesInput) (req *request.Request, output *RebootWorkspacesOutput) {
  161. op := &request.Operation{
  162. Name: opRebootWorkspaces,
  163. HTTPMethod: "POST",
  164. HTTPPath: "/",
  165. }
  166. if input == nil {
  167. input = &RebootWorkspacesInput{}
  168. }
  169. req = c.newRequest(op, input, output)
  170. output = &RebootWorkspacesOutput{}
  171. req.Data = output
  172. return
  173. }
  174. // Reboots the specified WorkSpaces.
  175. //
  176. // To be able to reboot a WorkSpace, the WorkSpace must have a State of AVAILABLE,
  177. // IMPAIRED, or INOPERABLE.
  178. //
  179. // This operation is asynchronous and will return before the WorkSpaces have
  180. // rebooted.
  181. func (c *WorkSpaces) RebootWorkspaces(input *RebootWorkspacesInput) (*RebootWorkspacesOutput, error) {
  182. req, out := c.RebootWorkspacesRequest(input)
  183. err := req.Send()
  184. return out, err
  185. }
  186. const opRebuildWorkspaces = "RebuildWorkspaces"
  187. // RebuildWorkspacesRequest generates a request for the RebuildWorkspaces operation.
  188. func (c *WorkSpaces) RebuildWorkspacesRequest(input *RebuildWorkspacesInput) (req *request.Request, output *RebuildWorkspacesOutput) {
  189. op := &request.Operation{
  190. Name: opRebuildWorkspaces,
  191. HTTPMethod: "POST",
  192. HTTPPath: "/",
  193. }
  194. if input == nil {
  195. input = &RebuildWorkspacesInput{}
  196. }
  197. req = c.newRequest(op, input, output)
  198. output = &RebuildWorkspacesOutput{}
  199. req.Data = output
  200. return
  201. }
  202. // Rebuilds the specified WorkSpaces.
  203. //
  204. // Rebuilding a WorkSpace is a potentially destructive action that can result
  205. // in the loss of data. Rebuilding a WorkSpace causes the following to occur:
  206. //
  207. // The system is restored to the image of the bundle that the WorkSpace is
  208. // created from. Any applications that have been installed, or system settings
  209. // that have been made since the WorkSpace was created will be lost. The data
  210. // drive (D drive) is re-created from the last automatic snapshot taken of the
  211. // data drive. The current contents of the data drive are overwritten. Automatic
  212. // snapshots of the data drive are taken every 12 hours, so the snapshot can
  213. // be as much as 12 hours old. To be able to rebuild a WorkSpace, the WorkSpace
  214. // must have a State of AVAILABLE or ERROR.
  215. //
  216. // This operation is asynchronous and will return before the WorkSpaces have
  217. // been completely rebuilt.
  218. func (c *WorkSpaces) RebuildWorkspaces(input *RebuildWorkspacesInput) (*RebuildWorkspacesOutput, error) {
  219. req, out := c.RebuildWorkspacesRequest(input)
  220. err := req.Send()
  221. return out, err
  222. }
  223. const opTerminateWorkspaces = "TerminateWorkspaces"
  224. // TerminateWorkspacesRequest generates a request for the TerminateWorkspaces operation.
  225. func (c *WorkSpaces) TerminateWorkspacesRequest(input *TerminateWorkspacesInput) (req *request.Request, output *TerminateWorkspacesOutput) {
  226. op := &request.Operation{
  227. Name: opTerminateWorkspaces,
  228. HTTPMethod: "POST",
  229. HTTPPath: "/",
  230. }
  231. if input == nil {
  232. input = &TerminateWorkspacesInput{}
  233. }
  234. req = c.newRequest(op, input, output)
  235. output = &TerminateWorkspacesOutput{}
  236. req.Data = output
  237. return
  238. }
  239. // Terminates the specified WorkSpaces.
  240. //
  241. // Terminating a WorkSpace is a permanent action and cannot be undone. The
  242. // user's data is not maintained and will be destroyed. If you need to archive
  243. // any user data, contact Amazon Web Services before terminating the WorkSpace.
  244. //
  245. // You can terminate a WorkSpace that is in any state except SUSPENDED.
  246. //
  247. // This operation is asynchronous and will return before the WorkSpaces have
  248. // been completely terminated.
  249. func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) {
  250. req, out := c.TerminateWorkspacesRequest(input)
  251. err := req.Send()
  252. return out, err
  253. }
  254. // Contains information about the compute type of a WorkSpace bundle.
  255. type ComputeType struct {
  256. // The name of the compute type for the bundle.
  257. Name *string `type:"string" enum:"Compute"`
  258. metadataComputeType `json:"-" xml:"-"`
  259. }
  260. type metadataComputeType struct {
  261. SDKShapeTraits bool `type:"structure"`
  262. }
  263. // String returns the string representation
  264. func (s ComputeType) String() string {
  265. return awsutil.Prettify(s)
  266. }
  267. // GoString returns the string representation
  268. func (s ComputeType) GoString() string {
  269. return s.String()
  270. }
  271. // Contains the inputs for the CreateWorkspaces operation.
  272. type CreateWorkspacesInput struct {
  273. // An array of structures that specify the WorkSpaces to create.
  274. Workspaces []*WorkspaceRequest `type:"list" required:"true"`
  275. metadataCreateWorkspacesInput `json:"-" xml:"-"`
  276. }
  277. type metadataCreateWorkspacesInput struct {
  278. SDKShapeTraits bool `type:"structure"`
  279. }
  280. // String returns the string representation
  281. func (s CreateWorkspacesInput) String() string {
  282. return awsutil.Prettify(s)
  283. }
  284. // GoString returns the string representation
  285. func (s CreateWorkspacesInput) GoString() string {
  286. return s.String()
  287. }
  288. // Contains the result of the CreateWorkspaces operation.
  289. type CreateWorkspacesOutput struct {
  290. // An array of structures that represent the WorkSpaces that could not be created.
  291. FailedRequests []*FailedCreateWorkspaceRequest `type:"list"`
  292. // An array of structures that represent the WorkSpaces that were created.
  293. //
  294. // Because this operation is asynchronous, the identifier in WorkspaceId is
  295. // not immediately available. If you immediately call DescribeWorkspaces with
  296. // this identifier, no information will be returned.
  297. PendingRequests []*Workspace `type:"list"`
  298. metadataCreateWorkspacesOutput `json:"-" xml:"-"`
  299. }
  300. type metadataCreateWorkspacesOutput struct {
  301. SDKShapeTraits bool `type:"structure"`
  302. }
  303. // String returns the string representation
  304. func (s CreateWorkspacesOutput) String() string {
  305. return awsutil.Prettify(s)
  306. }
  307. // GoString returns the string representation
  308. func (s CreateWorkspacesOutput) GoString() string {
  309. return s.String()
  310. }
  311. // Contains default WorkSpace creation information.
  312. type DefaultWorkspaceCreationProperties struct {
  313. // The identifier of any custom security groups that are applied to the WorkSpaces
  314. // when they are created.
  315. CustomSecurityGroupId *string `type:"string"`
  316. // The organizational unit (OU) in the directory that the WorkSpace machine
  317. // accounts are placed in.
  318. DefaultOu *string `type:"string"`
  319. // A public IP address will be attached to all WorkSpaces that are created or
  320. // rebuilt.
  321. EnableInternetAccess *bool `type:"boolean"`
  322. // Specifies if the directory is enabled for Amazon WorkDocs.
  323. EnableWorkDocs *bool `type:"boolean"`
  324. // The WorkSpace user is an administrator on the WorkSpace.
  325. UserEnabledAsLocalAdministrator *bool `type:"boolean"`
  326. metadataDefaultWorkspaceCreationProperties `json:"-" xml:"-"`
  327. }
  328. type metadataDefaultWorkspaceCreationProperties struct {
  329. SDKShapeTraits bool `type:"structure"`
  330. }
  331. // String returns the string representation
  332. func (s DefaultWorkspaceCreationProperties) String() string {
  333. return awsutil.Prettify(s)
  334. }
  335. // GoString returns the string representation
  336. func (s DefaultWorkspaceCreationProperties) GoString() string {
  337. return s.String()
  338. }
  339. // Contains the inputs for the DescribeWorkspaceBundles operation.
  340. type DescribeWorkspaceBundlesInput struct {
  341. // An array of strings that contains the identifiers of the bundles to retrieve.
  342. // This parameter cannot be combined with any other filter parameter.
  343. BundleIds []*string `type:"list"`
  344. // The NextToken value from a previous call to this operation. Pass null if
  345. // this is the first call.
  346. NextToken *string `type:"string"`
  347. // The owner of the bundles to retrieve. This parameter cannot be combined with
  348. // any other filter parameter.
  349. //
  350. // This contains one of the following values:
  351. //
  352. // null - Retrieves the bundles that belong to the account making the call.
  353. // AMAZON - Retrieves the bundles that are provided by AWS.
  354. Owner *string `type:"string"`
  355. metadataDescribeWorkspaceBundlesInput `json:"-" xml:"-"`
  356. }
  357. type metadataDescribeWorkspaceBundlesInput struct {
  358. SDKShapeTraits bool `type:"structure"`
  359. }
  360. // String returns the string representation
  361. func (s DescribeWorkspaceBundlesInput) String() string {
  362. return awsutil.Prettify(s)
  363. }
  364. // GoString returns the string representation
  365. func (s DescribeWorkspaceBundlesInput) GoString() string {
  366. return s.String()
  367. }
  368. // Contains the results of the DescribeWorkspaceBundles operation.
  369. type DescribeWorkspaceBundlesOutput struct {
  370. // An array of structures that contain information about the bundles.
  371. Bundles []*WorkspaceBundle `type:"list"`
  372. // If not null, more results are available. Pass this value for the NextToken
  373. // parameter in a subsequent call to this operation to retrieve the next set
  374. // of items. This token is valid for one day and must be used within that timeframe.
  375. NextToken *string `type:"string"`
  376. metadataDescribeWorkspaceBundlesOutput `json:"-" xml:"-"`
  377. }
  378. type metadataDescribeWorkspaceBundlesOutput struct {
  379. SDKShapeTraits bool `type:"structure"`
  380. }
  381. // String returns the string representation
  382. func (s DescribeWorkspaceBundlesOutput) String() string {
  383. return awsutil.Prettify(s)
  384. }
  385. // GoString returns the string representation
  386. func (s DescribeWorkspaceBundlesOutput) GoString() string {
  387. return s.String()
  388. }
  389. // Contains the inputs for the DescribeWorkspaceDirectories operation.
  390. type DescribeWorkspaceDirectoriesInput struct {
  391. // An array of strings that contains the directory identifiers to retrieve information
  392. // for. If this member is null, all directories are retrieved.
  393. DirectoryIds []*string `type:"list"`
  394. // The NextToken value from a previous call to this operation. Pass null if
  395. // this is the first call.
  396. NextToken *string `type:"string"`
  397. metadataDescribeWorkspaceDirectoriesInput `json:"-" xml:"-"`
  398. }
  399. type metadataDescribeWorkspaceDirectoriesInput struct {
  400. SDKShapeTraits bool `type:"structure"`
  401. }
  402. // String returns the string representation
  403. func (s DescribeWorkspaceDirectoriesInput) String() string {
  404. return awsutil.Prettify(s)
  405. }
  406. // GoString returns the string representation
  407. func (s DescribeWorkspaceDirectoriesInput) GoString() string {
  408. return s.String()
  409. }
  410. // Contains the results of the DescribeWorkspaceDirectories operation.
  411. type DescribeWorkspaceDirectoriesOutput struct {
  412. // An array of structures that contain information about the directories.
  413. Directories []*WorkspaceDirectory `type:"list"`
  414. // If not null, more results are available. Pass this value for the NextToken
  415. // parameter in a subsequent call to this operation to retrieve the next set
  416. // of items. This token is valid for one day and must be used within that timeframe.
  417. NextToken *string `type:"string"`
  418. metadataDescribeWorkspaceDirectoriesOutput `json:"-" xml:"-"`
  419. }
  420. type metadataDescribeWorkspaceDirectoriesOutput struct {
  421. SDKShapeTraits bool `type:"structure"`
  422. }
  423. // String returns the string representation
  424. func (s DescribeWorkspaceDirectoriesOutput) String() string {
  425. return awsutil.Prettify(s)
  426. }
  427. // GoString returns the string representation
  428. func (s DescribeWorkspaceDirectoriesOutput) GoString() string {
  429. return s.String()
  430. }
  431. // Contains the inputs for the DescribeWorkspaces operation.
  432. type DescribeWorkspacesInput struct {
  433. // The identifier of a bundle to obtain the WorkSpaces for. All WorkSpaces that
  434. // are created from this bundle will be retrieved. This parameter cannot be
  435. // combined with any other filter parameter.
  436. BundleId *string `type:"string"`
  437. // Specifies the directory identifier to which to limit the WorkSpaces. Optionally,
  438. // you can specify a specific directory user with the UserName parameter. This
  439. // parameter cannot be combined with any other filter parameter.
  440. DirectoryId *string `type:"string"`
  441. // The maximum number of items to return.
  442. Limit *int64 `type:"integer"`
  443. // The NextToken value from a previous call to this operation. Pass null if
  444. // this is the first call.
  445. NextToken *string `type:"string"`
  446. // Used with the DirectoryId parameter to specify the directory user for which
  447. // to obtain the WorkSpace.
  448. UserName *string `type:"string"`
  449. // An array of strings that contain the identifiers of the WorkSpaces for which
  450. // to retrieve information. This parameter cannot be combined with any other
  451. // filter parameter.
  452. //
  453. // Because the CreateWorkspaces operation is asynchronous, the identifier returned
  454. // by CreateWorkspaces is not immediately available. If you immediately call
  455. // DescribeWorkspaces with this identifier, no information will be returned.
  456. WorkspaceIds []*string `type:"list"`
  457. metadataDescribeWorkspacesInput `json:"-" xml:"-"`
  458. }
  459. type metadataDescribeWorkspacesInput struct {
  460. SDKShapeTraits bool `type:"structure"`
  461. }
  462. // String returns the string representation
  463. func (s DescribeWorkspacesInput) String() string {
  464. return awsutil.Prettify(s)
  465. }
  466. // GoString returns the string representation
  467. func (s DescribeWorkspacesInput) GoString() string {
  468. return s.String()
  469. }
  470. // Contains the results for the DescribeWorkspaces operation.
  471. type DescribeWorkspacesOutput struct {
  472. // If not null, more results are available. Pass this value for the NextToken
  473. // parameter in a subsequent call to this operation to retrieve the next set
  474. // of items. This token is valid for one day and must be used within that timeframe.
  475. NextToken *string `type:"string"`
  476. // An array of structures that contain the information about the WorkSpaces.
  477. //
  478. // Because the CreateWorkspaces operation is asynchronous, some of this information
  479. // may be incomplete for a newly-created WorkSpace.
  480. Workspaces []*Workspace `type:"list"`
  481. metadataDescribeWorkspacesOutput `json:"-" xml:"-"`
  482. }
  483. type metadataDescribeWorkspacesOutput struct {
  484. SDKShapeTraits bool `type:"structure"`
  485. }
  486. // String returns the string representation
  487. func (s DescribeWorkspacesOutput) String() string {
  488. return awsutil.Prettify(s)
  489. }
  490. // GoString returns the string representation
  491. func (s DescribeWorkspacesOutput) GoString() string {
  492. return s.String()
  493. }
  494. // Contains information about a WorkSpace that could not be created.
  495. type FailedCreateWorkspaceRequest struct {
  496. // The error code.
  497. ErrorCode *string `type:"string"`
  498. // The textual error message.
  499. ErrorMessage *string `type:"string"`
  500. // A WorkspaceRequest object that contains the information about the WorkSpace
  501. // that could not be created.
  502. WorkspaceRequest *WorkspaceRequest `type:"structure"`
  503. metadataFailedCreateWorkspaceRequest `json:"-" xml:"-"`
  504. }
  505. type metadataFailedCreateWorkspaceRequest struct {
  506. SDKShapeTraits bool `type:"structure"`
  507. }
  508. // String returns the string representation
  509. func (s FailedCreateWorkspaceRequest) String() string {
  510. return awsutil.Prettify(s)
  511. }
  512. // GoString returns the string representation
  513. func (s FailedCreateWorkspaceRequest) GoString() string {
  514. return s.String()
  515. }
  516. // Contains information about a WorkSpace that could not be rebooted (RebootWorkspaces),
  517. // rebuilt (RebuildWorkspaces), or terminated (TerminateWorkspaces).
  518. type FailedWorkspaceChangeRequest struct {
  519. // The error code.
  520. ErrorCode *string `type:"string"`
  521. // The textual error message.
  522. ErrorMessage *string `type:"string"`
  523. // The identifier of the WorkSpace.
  524. WorkspaceId *string `type:"string"`
  525. metadataFailedWorkspaceChangeRequest `json:"-" xml:"-"`
  526. }
  527. type metadataFailedWorkspaceChangeRequest struct {
  528. SDKShapeTraits bool `type:"structure"`
  529. }
  530. // String returns the string representation
  531. func (s FailedWorkspaceChangeRequest) String() string {
  532. return awsutil.Prettify(s)
  533. }
  534. // GoString returns the string representation
  535. func (s FailedWorkspaceChangeRequest) GoString() string {
  536. return s.String()
  537. }
  538. // Contains information used with the RebootWorkspaces operation to reboot a
  539. // WorkSpace.
  540. type RebootRequest struct {
  541. // The identifier of the WorkSpace to reboot.
  542. WorkspaceId *string `type:"string" required:"true"`
  543. metadataRebootRequest `json:"-" xml:"-"`
  544. }
  545. type metadataRebootRequest struct {
  546. SDKShapeTraits bool `type:"structure"`
  547. }
  548. // String returns the string representation
  549. func (s RebootRequest) String() string {
  550. return awsutil.Prettify(s)
  551. }
  552. // GoString returns the string representation
  553. func (s RebootRequest) GoString() string {
  554. return s.String()
  555. }
  556. // Contains the inputs for the RebootWorkspaces operation.
  557. type RebootWorkspacesInput struct {
  558. // An array of structures that specify the WorkSpaces to reboot.
  559. RebootWorkspaceRequests []*RebootRequest `type:"list" required:"true"`
  560. metadataRebootWorkspacesInput `json:"-" xml:"-"`
  561. }
  562. type metadataRebootWorkspacesInput struct {
  563. SDKShapeTraits bool `type:"structure"`
  564. }
  565. // String returns the string representation
  566. func (s RebootWorkspacesInput) String() string {
  567. return awsutil.Prettify(s)
  568. }
  569. // GoString returns the string representation
  570. func (s RebootWorkspacesInput) GoString() string {
  571. return s.String()
  572. }
  573. // Contains the results of the RebootWorkspaces operation.
  574. type RebootWorkspacesOutput struct {
  575. // An array of structures that represent any WorkSpaces that could not be rebooted.
  576. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  577. metadataRebootWorkspacesOutput `json:"-" xml:"-"`
  578. }
  579. type metadataRebootWorkspacesOutput struct {
  580. SDKShapeTraits bool `type:"structure"`
  581. }
  582. // String returns the string representation
  583. func (s RebootWorkspacesOutput) String() string {
  584. return awsutil.Prettify(s)
  585. }
  586. // GoString returns the string representation
  587. func (s RebootWorkspacesOutput) GoString() string {
  588. return s.String()
  589. }
  590. // Contains information used with the RebuildWorkspaces operation to rebuild
  591. // a WorkSpace.
  592. type RebuildRequest struct {
  593. // The identifier of the WorkSpace to rebuild.
  594. WorkspaceId *string `type:"string" required:"true"`
  595. metadataRebuildRequest `json:"-" xml:"-"`
  596. }
  597. type metadataRebuildRequest struct {
  598. SDKShapeTraits bool `type:"structure"`
  599. }
  600. // String returns the string representation
  601. func (s RebuildRequest) String() string {
  602. return awsutil.Prettify(s)
  603. }
  604. // GoString returns the string representation
  605. func (s RebuildRequest) GoString() string {
  606. return s.String()
  607. }
  608. // Contains the inputs for the RebuildWorkspaces operation.
  609. type RebuildWorkspacesInput struct {
  610. // An array of structures that specify the WorkSpaces to rebuild.
  611. RebuildWorkspaceRequests []*RebuildRequest `type:"list" required:"true"`
  612. metadataRebuildWorkspacesInput `json:"-" xml:"-"`
  613. }
  614. type metadataRebuildWorkspacesInput struct {
  615. SDKShapeTraits bool `type:"structure"`
  616. }
  617. // String returns the string representation
  618. func (s RebuildWorkspacesInput) String() string {
  619. return awsutil.Prettify(s)
  620. }
  621. // GoString returns the string representation
  622. func (s RebuildWorkspacesInput) GoString() string {
  623. return s.String()
  624. }
  625. // Contains the results of the RebuildWorkspaces operation.
  626. type RebuildWorkspacesOutput struct {
  627. // An array of structures that represent any WorkSpaces that could not be rebuilt.
  628. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  629. metadataRebuildWorkspacesOutput `json:"-" xml:"-"`
  630. }
  631. type metadataRebuildWorkspacesOutput struct {
  632. SDKShapeTraits bool `type:"structure"`
  633. }
  634. // String returns the string representation
  635. func (s RebuildWorkspacesOutput) String() string {
  636. return awsutil.Prettify(s)
  637. }
  638. // GoString returns the string representation
  639. func (s RebuildWorkspacesOutput) GoString() string {
  640. return s.String()
  641. }
  642. // Contains information used with the TerminateWorkspaces operation to terminate
  643. // a WorkSpace.
  644. type TerminateRequest struct {
  645. // The identifier of the WorkSpace to terminate.
  646. WorkspaceId *string `type:"string" required:"true"`
  647. metadataTerminateRequest `json:"-" xml:"-"`
  648. }
  649. type metadataTerminateRequest struct {
  650. SDKShapeTraits bool `type:"structure"`
  651. }
  652. // String returns the string representation
  653. func (s TerminateRequest) String() string {
  654. return awsutil.Prettify(s)
  655. }
  656. // GoString returns the string representation
  657. func (s TerminateRequest) GoString() string {
  658. return s.String()
  659. }
  660. // Contains the inputs for the TerminateWorkspaces operation.
  661. type TerminateWorkspacesInput struct {
  662. // An array of structures that specify the WorkSpaces to terminate.
  663. TerminateWorkspaceRequests []*TerminateRequest `type:"list" required:"true"`
  664. metadataTerminateWorkspacesInput `json:"-" xml:"-"`
  665. }
  666. type metadataTerminateWorkspacesInput struct {
  667. SDKShapeTraits bool `type:"structure"`
  668. }
  669. // String returns the string representation
  670. func (s TerminateWorkspacesInput) String() string {
  671. return awsutil.Prettify(s)
  672. }
  673. // GoString returns the string representation
  674. func (s TerminateWorkspacesInput) GoString() string {
  675. return s.String()
  676. }
  677. // Contains the results of the TerminateWorkspaces operation.
  678. type TerminateWorkspacesOutput struct {
  679. // An array of structures that represent any WorkSpaces that could not be terminated.
  680. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  681. metadataTerminateWorkspacesOutput `json:"-" xml:"-"`
  682. }
  683. type metadataTerminateWorkspacesOutput struct {
  684. SDKShapeTraits bool `type:"structure"`
  685. }
  686. // String returns the string representation
  687. func (s TerminateWorkspacesOutput) String() string {
  688. return awsutil.Prettify(s)
  689. }
  690. // GoString returns the string representation
  691. func (s TerminateWorkspacesOutput) GoString() string {
  692. return s.String()
  693. }
  694. // Contains information about the user storage for a WorkSpace bundle.
  695. type UserStorage struct {
  696. // The amount of user storage for the bundle.
  697. Capacity *string `type:"string"`
  698. metadataUserStorage `json:"-" xml:"-"`
  699. }
  700. type metadataUserStorage struct {
  701. SDKShapeTraits bool `type:"structure"`
  702. }
  703. // String returns the string representation
  704. func (s UserStorage) String() string {
  705. return awsutil.Prettify(s)
  706. }
  707. // GoString returns the string representation
  708. func (s UserStorage) GoString() string {
  709. return s.String()
  710. }
  711. // Contains information about a WorkSpace.
  712. type Workspace struct {
  713. // The identifier of the bundle that the WorkSpace was created from.
  714. BundleId *string `type:"string"`
  715. // The identifier of the AWS Directory Service directory that the WorkSpace
  716. // belongs to.
  717. DirectoryId *string `type:"string"`
  718. // If the WorkSpace could not be created, this contains the error code.
  719. ErrorCode *string `type:"string"`
  720. // If the WorkSpace could not be created, this contains a textual error message
  721. // that describes the failure.
  722. ErrorMessage *string `type:"string"`
  723. // The IP address of the WorkSpace.
  724. IpAddress *string `type:"string"`
  725. // The operational state of the WorkSpace.
  726. State *string `type:"string" enum:"WorkspaceState"`
  727. // The identifier of the subnet that the WorkSpace is in.
  728. SubnetId *string `type:"string"`
  729. // The user that the WorkSpace is assigned to.
  730. UserName *string `type:"string"`
  731. // The identifier of the WorkSpace.
  732. WorkspaceId *string `type:"string"`
  733. metadataWorkspace `json:"-" xml:"-"`
  734. }
  735. type metadataWorkspace struct {
  736. SDKShapeTraits bool `type:"structure"`
  737. }
  738. // String returns the string representation
  739. func (s Workspace) String() string {
  740. return awsutil.Prettify(s)
  741. }
  742. // GoString returns the string representation
  743. func (s Workspace) GoString() string {
  744. return s.String()
  745. }
  746. // Contains information about a WorkSpace bundle.
  747. type WorkspaceBundle struct {
  748. // The bundle identifier.
  749. BundleId *string `type:"string"`
  750. // A ComputeType object that specifies the compute type for the bundle.
  751. ComputeType *ComputeType `type:"structure"`
  752. // The bundle description.
  753. Description *string `type:"string"`
  754. // The name of the bundle.
  755. Name *string `type:"string"`
  756. // The owner of the bundle. This contains the owner's account identifier, or
  757. // AMAZON if the bundle is provided by AWS.
  758. Owner *string `type:"string"`
  759. // A UserStorage object that specifies the amount of user storage that the bundle
  760. // contains.
  761. UserStorage *UserStorage `type:"structure"`
  762. metadataWorkspaceBundle `json:"-" xml:"-"`
  763. }
  764. type metadataWorkspaceBundle struct {
  765. SDKShapeTraits bool `type:"structure"`
  766. }
  767. // String returns the string representation
  768. func (s WorkspaceBundle) String() string {
  769. return awsutil.Prettify(s)
  770. }
  771. // GoString returns the string representation
  772. func (s WorkspaceBundle) GoString() string {
  773. return s.String()
  774. }
  775. // Contains information about an AWS Directory Service directory for use with
  776. // Amazon WorkSpaces.
  777. type WorkspaceDirectory struct {
  778. // The directory alias.
  779. Alias *string `type:"string"`
  780. // The user name for the service account.
  781. CustomerUserName *string `type:"string"`
  782. // The directory identifier.
  783. DirectoryId *string `type:"string"`
  784. // The name of the directory.
  785. DirectoryName *string `type:"string"`
  786. // The directory type.
  787. DirectoryType *string `type:"string" enum:"WorkspaceDirectoryType"`
  788. // An array of strings that contains the IP addresses of the DNS servers for
  789. // the directory.
  790. DnsIpAddresses []*string `type:"list"`
  791. // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces
  792. // to make calls to other services, such as Amazon EC2, on your behalf.
  793. IamRoleId *string `type:"string"`
  794. // The registration code for the directory. This is the code that users enter
  795. // in their Amazon WorkSpaces client application to connect to the directory.
  796. RegistrationCode *string `type:"string"`
  797. // The state of the directory's registration with Amazon WorkSpaces
  798. State *string `type:"string" enum:"WorkspaceDirectoryState"`
  799. // An array of strings that contains the identifiers of the subnets used with
  800. // the directory.
  801. SubnetIds []*string `type:"list"`
  802. // A structure that specifies the default creation properties for all WorkSpaces
  803. // in the directory.
  804. WorkspaceCreationProperties *DefaultWorkspaceCreationProperties `type:"structure"`
  805. // The identifier of the security group that is assigned to new WorkSpaces.
  806. WorkspaceSecurityGroupId *string `type:"string"`
  807. metadataWorkspaceDirectory `json:"-" xml:"-"`
  808. }
  809. type metadataWorkspaceDirectory struct {
  810. SDKShapeTraits bool `type:"structure"`
  811. }
  812. // String returns the string representation
  813. func (s WorkspaceDirectory) String() string {
  814. return awsutil.Prettify(s)
  815. }
  816. // GoString returns the string representation
  817. func (s WorkspaceDirectory) GoString() string {
  818. return s.String()
  819. }
  820. // Contains information about a WorkSpace creation request.
  821. type WorkspaceRequest struct {
  822. // The identifier of the bundle to create the WorkSpace from. You can use the
  823. // DescribeWorkspaceBundles operation to obtain a list of the bundles that are
  824. // available.
  825. BundleId *string `type:"string" required:"true"`
  826. // The identifier of the AWS Directory Service directory to create the WorkSpace
  827. // in. You can use the DescribeWorkspaceDirectories operation to obtain a list
  828. // of the directories that are available.
  829. DirectoryId *string `type:"string" required:"true"`
  830. // The username that the WorkSpace is assigned to. This username must exist
  831. // in the AWS Directory Service directory specified by the DirectoryId member.
  832. UserName *string `type:"string" required:"true"`
  833. metadataWorkspaceRequest `json:"-" xml:"-"`
  834. }
  835. type metadataWorkspaceRequest struct {
  836. SDKShapeTraits bool `type:"structure"`
  837. }
  838. // String returns the string representation
  839. func (s WorkspaceRequest) String() string {
  840. return awsutil.Prettify(s)
  841. }
  842. // GoString returns the string representation
  843. func (s WorkspaceRequest) GoString() string {
  844. return s.String()
  845. }
  846. const (
  847. // @enum Compute
  848. ComputeValue = "VALUE"
  849. // @enum Compute
  850. ComputeStandard = "STANDARD"
  851. // @enum Compute
  852. ComputePerformance = "PERFORMANCE"
  853. )
  854. const (
  855. // @enum WorkspaceDirectoryState
  856. WorkspaceDirectoryStateRegistering = "REGISTERING"
  857. // @enum WorkspaceDirectoryState
  858. WorkspaceDirectoryStateRegistered = "REGISTERED"
  859. // @enum WorkspaceDirectoryState
  860. WorkspaceDirectoryStateDeregistering = "DEREGISTERING"
  861. // @enum WorkspaceDirectoryState
  862. WorkspaceDirectoryStateDeregistered = "DEREGISTERED"
  863. // @enum WorkspaceDirectoryState
  864. WorkspaceDirectoryStateError = "ERROR"
  865. )
  866. const (
  867. // @enum WorkspaceDirectoryType
  868. WorkspaceDirectoryTypeSimpleAd = "SIMPLE_AD"
  869. // @enum WorkspaceDirectoryType
  870. WorkspaceDirectoryTypeAdConnector = "AD_CONNECTOR"
  871. )
  872. const (
  873. // @enum WorkspaceState
  874. WorkspaceStatePending = "PENDING"
  875. // @enum WorkspaceState
  876. WorkspaceStateAvailable = "AVAILABLE"
  877. // @enum WorkspaceState
  878. WorkspaceStateImpaired = "IMPAIRED"
  879. // @enum WorkspaceState
  880. WorkspaceStateUnhealthy = "UNHEALTHY"
  881. // @enum WorkspaceState
  882. WorkspaceStateRebooting = "REBOOTING"
  883. // @enum WorkspaceState
  884. WorkspaceStateRebuilding = "REBUILDING"
  885. // @enum WorkspaceState
  886. WorkspaceStateTerminating = "TERMINATING"
  887. // @enum WorkspaceState
  888. WorkspaceStateTerminated = "TERMINATED"
  889. // @enum WorkspaceState
  890. WorkspaceStateSuspended = "SUSPENDED"
  891. // @enum WorkspaceState
  892. WorkspaceStateError = "ERROR"
  893. )