api.go 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package efs provides a client for Amazon Elastic File System.
  3. package efs
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  11. )
  12. const opCreateFileSystem = "CreateFileSystem"
  13. // CreateFileSystemRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateFileSystem operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CreateFileSystem method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CreateFileSystemRequest method.
  28. // req, resp := client.CreateFileSystemRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) {
  36. op := &request.Operation{
  37. Name: opCreateFileSystem,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/2015-02-01/file-systems",
  40. }
  41. if input == nil {
  42. input = &CreateFileSystemInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &FileSystemDescription{}
  46. req.Data = output
  47. return
  48. }
  49. // Creates a new, empty file system. The operation requires a creation token
  50. // in the request that Amazon EFS uses to ensure idempotent creation (calling
  51. // the operation with same creation token has no effect). If a file system does
  52. // not currently exist that is owned by the caller's AWS account with the specified
  53. // creation token, this operation does the following:
  54. //
  55. // Creates a new, empty file system. The file system will have an Amazon
  56. // EFS assigned ID, and an initial lifecycle state creating.
  57. //
  58. // Returns with the description of the created file system.
  59. //
  60. // Otherwise, this operation returns a FileSystemAlreadyExists error with
  61. // the ID of the existing file system.
  62. //
  63. // For basic use cases, you can use a randomly generated UUID for the creation
  64. // token.
  65. //
  66. // The idempotent operation allows you to retry a CreateFileSystem call without
  67. // risk of creating an extra file system. This can happen when an initial call
  68. // fails in a way that leaves it uncertain whether or not a file system was
  69. // actually created. An example might be that a transport level timeout occurred
  70. // or your connection was reset. As long as you use the same creation token,
  71. // if the initial call had succeeded in creating a file system, the client can
  72. // learn of its existence from the FileSystemAlreadyExists error.
  73. //
  74. // The CreateFileSystem call returns while the file system's lifecycle state
  75. // is still creating. You can check the file system creation status by calling
  76. // the DescribeFileSystems operation, which among other things returns the file
  77. // system state.
  78. //
  79. // This operation also takes an optional PerformanceMode parameter that you
  80. // choose for your file system. We recommend generalPurpose performance mode
  81. // for most file systems. File systems using the maxIO performance mode can
  82. // scale to higher levels of aggregate throughput and operations per second
  83. // with a tradeoff of slightly higher latencies for most file operations. The
  84. // performance mode can't be changed after the file system has been created.
  85. // For more information, see Amazon EFS: Performance Modes (http://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html).
  86. //
  87. // After the file system is fully created, Amazon EFS sets its lifecycle state
  88. // to available, at which point you can create one or more mount targets for
  89. // the file system in your VPC. For more information, see CreateMountTarget.
  90. // You mount your Amazon EFS file system on an EC2 instances in your VPC via
  91. // the mount target. For more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html).
  92. //
  93. // This operation requires permissions for the elasticfilesystem:CreateFileSystem
  94. // action.
  95. func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) {
  96. req, out := c.CreateFileSystemRequest(input)
  97. err := req.Send()
  98. return out, err
  99. }
  100. const opCreateMountTarget = "CreateMountTarget"
  101. // CreateMountTargetRequest generates a "aws/request.Request" representing the
  102. // client's request for the CreateMountTarget operation. The "output" return
  103. // value can be used to capture response data after the request's "Send" method
  104. // is called.
  105. //
  106. // Creating a request object using this method should be used when you want to inject
  107. // custom logic into the request's lifecycle using a custom handler, or if you want to
  108. // access properties on the request object before or after sending the request. If
  109. // you just want the service response, call the CreateMountTarget method directly
  110. // instead.
  111. //
  112. // Note: You must call the "Send" method on the returned request object in order
  113. // to execute the request.
  114. //
  115. // // Example sending a request using the CreateMountTargetRequest method.
  116. // req, resp := client.CreateMountTargetRequest(params)
  117. //
  118. // err := req.Send()
  119. // if err == nil { // resp is now filled
  120. // fmt.Println(resp)
  121. // }
  122. //
  123. func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *request.Request, output *MountTargetDescription) {
  124. op := &request.Operation{
  125. Name: opCreateMountTarget,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/2015-02-01/mount-targets",
  128. }
  129. if input == nil {
  130. input = &CreateMountTargetInput{}
  131. }
  132. req = c.newRequest(op, input, output)
  133. output = &MountTargetDescription{}
  134. req.Data = output
  135. return
  136. }
  137. // Creates a mount target for a file system. You can then mount the file system
  138. // on EC2 instances via the mount target.
  139. //
  140. // You can create one mount target in each Availability Zone in your VPC. All
  141. // EC2 instances in a VPC within a given Availability Zone share a single mount
  142. // target for a given file system. If you have multiple subnets in an Availability
  143. // Zone, you create a mount target in one of the subnets. EC2 instances do not
  144. // need to be in the same subnet as the mount target in order to access their
  145. // file system. For more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html).
  146. //
  147. // In the request, you also specify a file system ID for which you are creating
  148. // the mount target and the file system's lifecycle state must be available.
  149. // For more information, see DescribeFileSystems.
  150. //
  151. // In the request, you also provide a subnet ID, which determines the following:
  152. //
  153. // VPC in which Amazon EFS creates the mount target
  154. //
  155. // Availability Zone in which Amazon EFS creates the mount target
  156. //
  157. // IP address range from which Amazon EFS selects the IP address of the mount
  158. // target (if you don't specify an IP address in the request)
  159. //
  160. // After creating the mount target, Amazon EFS returns a response that includes,
  161. // a MountTargetId and an IpAddress. You use this IP address when mounting the
  162. // file system in an EC2 instance. You can also use the mount target's DNS name
  163. // when mounting the file system. The EC2 instance on which you mount the file
  164. // system via the mount target can resolve the mount target's DNS name to its
  165. // IP address. For more information, see How it Works: Implementation Overview
  166. // (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation).
  167. //
  168. // Note that you can create mount targets for a file system in only one VPC,
  169. // and there can be only one mount target per Availability Zone. That is, if
  170. // the file system already has one or more mount targets created for it, the
  171. // subnet specified in the request to add another mount target must meet the
  172. // following requirements:
  173. //
  174. // Must belong to the same VPC as the subnets of the existing mount targets
  175. //
  176. // Must not be in the same Availability Zone as any of the subnets of the
  177. // existing mount targets
  178. //
  179. // If the request satisfies the requirements, Amazon EFS does the following:
  180. //
  181. // Creates a new mount target in the specified subnet.
  182. //
  183. // Also creates a new network interface in the subnet as follows:
  184. //
  185. // If the request provides an IpAddress, Amazon EFS assigns that IP address
  186. // to the network interface. Otherwise, Amazon EFS assigns a free address in
  187. // the subnet (in the same way that the Amazon EC2 CreateNetworkInterface call
  188. // does when a request does not specify a primary private IP address).
  189. //
  190. // If the request provides SecurityGroups, this network interface is associated
  191. // with those security groups. Otherwise, it belongs to the default security
  192. // group for the subnet's VPC.
  193. //
  194. // Assigns the description Mount target fsmt-id for file system fs-id where
  195. // fsmt-id is the mount target ID, and fs-id is the FileSystemId.
  196. //
  197. // Sets the requesterManaged property of the network interface to true, and
  198. // the requesterId value to EFS.
  199. //
  200. // Each Amazon EFS mount target has one corresponding requestor-managed EC2
  201. // network interface. After the network interface is created, Amazon EFS sets
  202. // the NetworkInterfaceId field in the mount target's description to the network
  203. // interface ID, and the IpAddress field to its address. If network interface
  204. // creation fails, the entire CreateMountTarget operation fails.
  205. //
  206. // The CreateMountTarget call returns only after creating the network interface,
  207. // but while the mount target state is still creating. You can check the mount
  208. // target creation status by calling the DescribeFileSystems operation, which
  209. // among other things returns the mount target state.
  210. //
  211. // We recommend you create a mount target in each of the Availability Zones.
  212. // There are cost considerations for using a file system in an Availability
  213. // Zone through a mount target created in another Availability Zone. For more
  214. // information, see Amazon EFS (http://aws.amazon.com/efs/). In addition, by
  215. // always using a mount target local to the instance's Availability Zone, you
  216. // eliminate a partial failure scenario. If the Availability Zone in which your
  217. // mount target is created goes down, then you won't be able to access your
  218. // file system through that mount target.
  219. //
  220. // This operation requires permissions for the following action on the file
  221. // system:
  222. //
  223. // elasticfilesystem:CreateMountTarget
  224. //
  225. // This operation also requires permissions for the following Amazon EC2
  226. // actions:
  227. //
  228. // ec2:DescribeSubnets
  229. //
  230. // ec2:DescribeNetworkInterfaces
  231. //
  232. // ec2:CreateNetworkInterface
  233. func (c *EFS) CreateMountTarget(input *CreateMountTargetInput) (*MountTargetDescription, error) {
  234. req, out := c.CreateMountTargetRequest(input)
  235. err := req.Send()
  236. return out, err
  237. }
  238. const opCreateTags = "CreateTags"
  239. // CreateTagsRequest generates a "aws/request.Request" representing the
  240. // client's request for the CreateTags operation. The "output" return
  241. // value can be used to capture response data after the request's "Send" method
  242. // is called.
  243. //
  244. // Creating a request object using this method should be used when you want to inject
  245. // custom logic into the request's lifecycle using a custom handler, or if you want to
  246. // access properties on the request object before or after sending the request. If
  247. // you just want the service response, call the CreateTags method directly
  248. // instead.
  249. //
  250. // Note: You must call the "Send" method on the returned request object in order
  251. // to execute the request.
  252. //
  253. // // Example sending a request using the CreateTagsRequest method.
  254. // req, resp := client.CreateTagsRequest(params)
  255. //
  256. // err := req.Send()
  257. // if err == nil { // resp is now filled
  258. // fmt.Println(resp)
  259. // }
  260. //
  261. func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
  262. op := &request.Operation{
  263. Name: opCreateTags,
  264. HTTPMethod: "POST",
  265. HTTPPath: "/2015-02-01/create-tags/{FileSystemId}",
  266. }
  267. if input == nil {
  268. input = &CreateTagsInput{}
  269. }
  270. req = c.newRequest(op, input, output)
  271. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  272. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  273. output = &CreateTagsOutput{}
  274. req.Data = output
  275. return
  276. }
  277. // Creates or overwrites tags associated with a file system. Each tag is a key-value
  278. // pair. If a tag key specified in the request already exists on the file system,
  279. // this operation overwrites its value with the value provided in the request.
  280. // If you add the Name tag to your file system, Amazon EFS returns it in the
  281. // response to the DescribeFileSystems operation.
  282. //
  283. // This operation requires permission for the elasticfilesystem:CreateTags
  284. // action.
  285. func (c *EFS) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
  286. req, out := c.CreateTagsRequest(input)
  287. err := req.Send()
  288. return out, err
  289. }
  290. const opDeleteFileSystem = "DeleteFileSystem"
  291. // DeleteFileSystemRequest generates a "aws/request.Request" representing the
  292. // client's request for the DeleteFileSystem operation. The "output" return
  293. // value can be used to capture response data after the request's "Send" method
  294. // is called.
  295. //
  296. // Creating a request object using this method should be used when you want to inject
  297. // custom logic into the request's lifecycle using a custom handler, or if you want to
  298. // access properties on the request object before or after sending the request. If
  299. // you just want the service response, call the DeleteFileSystem method directly
  300. // instead.
  301. //
  302. // Note: You must call the "Send" method on the returned request object in order
  303. // to execute the request.
  304. //
  305. // // Example sending a request using the DeleteFileSystemRequest method.
  306. // req, resp := client.DeleteFileSystemRequest(params)
  307. //
  308. // err := req.Send()
  309. // if err == nil { // resp is now filled
  310. // fmt.Println(resp)
  311. // }
  312. //
  313. func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) {
  314. op := &request.Operation{
  315. Name: opDeleteFileSystem,
  316. HTTPMethod: "DELETE",
  317. HTTPPath: "/2015-02-01/file-systems/{FileSystemId}",
  318. }
  319. if input == nil {
  320. input = &DeleteFileSystemInput{}
  321. }
  322. req = c.newRequest(op, input, output)
  323. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  324. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  325. output = &DeleteFileSystemOutput{}
  326. req.Data = output
  327. return
  328. }
  329. // Deletes a file system, permanently severing access to its contents. Upon
  330. // return, the file system no longer exists and you can't access any contents
  331. // of the deleted file system.
  332. //
  333. // You can't delete a file system that is in use. That is, if the file system
  334. // has any mount targets, you must first delete them. For more information,
  335. // see DescribeMountTargets and DeleteMountTarget.
  336. //
  337. // The DeleteFileSystem call returns while the file system state is still
  338. // deleting. You can check the file system deletion status by calling the DescribeFileSystems
  339. // operation, which returns a list of file systems in your account. If you pass
  340. // file system ID or creation token for the deleted file system, the DescribeFileSystems
  341. // returns a 404 FileSystemNotFound error.
  342. //
  343. // This operation requires permissions for the elasticfilesystem:DeleteFileSystem
  344. // action.
  345. func (c *EFS) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) {
  346. req, out := c.DeleteFileSystemRequest(input)
  347. err := req.Send()
  348. return out, err
  349. }
  350. const opDeleteMountTarget = "DeleteMountTarget"
  351. // DeleteMountTargetRequest generates a "aws/request.Request" representing the
  352. // client's request for the DeleteMountTarget operation. The "output" return
  353. // value can be used to capture response data after the request's "Send" method
  354. // is called.
  355. //
  356. // Creating a request object using this method should be used when you want to inject
  357. // custom logic into the request's lifecycle using a custom handler, or if you want to
  358. // access properties on the request object before or after sending the request. If
  359. // you just want the service response, call the DeleteMountTarget method directly
  360. // instead.
  361. //
  362. // Note: You must call the "Send" method on the returned request object in order
  363. // to execute the request.
  364. //
  365. // // Example sending a request using the DeleteMountTargetRequest method.
  366. // req, resp := client.DeleteMountTargetRequest(params)
  367. //
  368. // err := req.Send()
  369. // if err == nil { // resp is now filled
  370. // fmt.Println(resp)
  371. // }
  372. //
  373. func (c *EFS) DeleteMountTargetRequest(input *DeleteMountTargetInput) (req *request.Request, output *DeleteMountTargetOutput) {
  374. op := &request.Operation{
  375. Name: opDeleteMountTarget,
  376. HTTPMethod: "DELETE",
  377. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}",
  378. }
  379. if input == nil {
  380. input = &DeleteMountTargetInput{}
  381. }
  382. req = c.newRequest(op, input, output)
  383. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  384. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  385. output = &DeleteMountTargetOutput{}
  386. req.Data = output
  387. return
  388. }
  389. // Deletes the specified mount target.
  390. //
  391. // This operation forcibly breaks any mounts of the file system via the mount
  392. // target that is being deleted, which might disrupt instances or applications
  393. // using those mounts. To avoid applications getting cut off abruptly, you might
  394. // consider unmounting any mounts of the mount target, if feasible. The operation
  395. // also deletes the associated network interface. Uncommitted writes may be
  396. // lost, but breaking a mount target using this operation does not corrupt the
  397. // file system itself. The file system you created remains. You can mount an
  398. // EC2 instance in your VPC via another mount target.
  399. //
  400. // This operation requires permissions for the following action on the file
  401. // system:
  402. //
  403. // elasticfilesystem:DeleteMountTarget
  404. //
  405. // The DeleteMountTarget call returns while the mount target state is still
  406. // deleting. You can check the mount target deletion by calling the DescribeMountTargets
  407. // operation, which returns a list of mount target descriptions for the given
  408. // file system.
  409. //
  410. // The operation also requires permissions for the following Amazon EC2 action
  411. // on the mount target's network interface:
  412. //
  413. // ec2:DeleteNetworkInterface
  414. func (c *EFS) DeleteMountTarget(input *DeleteMountTargetInput) (*DeleteMountTargetOutput, error) {
  415. req, out := c.DeleteMountTargetRequest(input)
  416. err := req.Send()
  417. return out, err
  418. }
  419. const opDeleteTags = "DeleteTags"
  420. // DeleteTagsRequest generates a "aws/request.Request" representing the
  421. // client's request for the DeleteTags operation. The "output" return
  422. // value can be used to capture response data after the request's "Send" method
  423. // is called.
  424. //
  425. // Creating a request object using this method should be used when you want to inject
  426. // custom logic into the request's lifecycle using a custom handler, or if you want to
  427. // access properties on the request object before or after sending the request. If
  428. // you just want the service response, call the DeleteTags method directly
  429. // instead.
  430. //
  431. // Note: You must call the "Send" method on the returned request object in order
  432. // to execute the request.
  433. //
  434. // // Example sending a request using the DeleteTagsRequest method.
  435. // req, resp := client.DeleteTagsRequest(params)
  436. //
  437. // err := req.Send()
  438. // if err == nil { // resp is now filled
  439. // fmt.Println(resp)
  440. // }
  441. //
  442. func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  443. op := &request.Operation{
  444. Name: opDeleteTags,
  445. HTTPMethod: "POST",
  446. HTTPPath: "/2015-02-01/delete-tags/{FileSystemId}",
  447. }
  448. if input == nil {
  449. input = &DeleteTagsInput{}
  450. }
  451. req = c.newRequest(op, input, output)
  452. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  453. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  454. output = &DeleteTagsOutput{}
  455. req.Data = output
  456. return
  457. }
  458. // Deletes the specified tags from a file system. If the DeleteTags request
  459. // includes a tag key that does not exist, Amazon EFS ignores it and doesn't
  460. // cause an error. For more information about tags and related restrictions,
  461. // see Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
  462. // in the AWS Billing and Cost Management User Guide.
  463. //
  464. // This operation requires permissions for the elasticfilesystem:DeleteTags
  465. // action.
  466. func (c *EFS) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  467. req, out := c.DeleteTagsRequest(input)
  468. err := req.Send()
  469. return out, err
  470. }
  471. const opDescribeFileSystems = "DescribeFileSystems"
  472. // DescribeFileSystemsRequest generates a "aws/request.Request" representing the
  473. // client's request for the DescribeFileSystems operation. The "output" return
  474. // value can be used to capture response data after the request's "Send" method
  475. // is called.
  476. //
  477. // Creating a request object using this method should be used when you want to inject
  478. // custom logic into the request's lifecycle using a custom handler, or if you want to
  479. // access properties on the request object before or after sending the request. If
  480. // you just want the service response, call the DescribeFileSystems method directly
  481. // instead.
  482. //
  483. // Note: You must call the "Send" method on the returned request object in order
  484. // to execute the request.
  485. //
  486. // // Example sending a request using the DescribeFileSystemsRequest method.
  487. // req, resp := client.DescribeFileSystemsRequest(params)
  488. //
  489. // err := req.Send()
  490. // if err == nil { // resp is now filled
  491. // fmt.Println(resp)
  492. // }
  493. //
  494. func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) {
  495. op := &request.Operation{
  496. Name: opDescribeFileSystems,
  497. HTTPMethod: "GET",
  498. HTTPPath: "/2015-02-01/file-systems",
  499. }
  500. if input == nil {
  501. input = &DescribeFileSystemsInput{}
  502. }
  503. req = c.newRequest(op, input, output)
  504. output = &DescribeFileSystemsOutput{}
  505. req.Data = output
  506. return
  507. }
  508. // Returns the description of a specific Amazon EFS file system if either the
  509. // file system CreationToken or the FileSystemId is provided. Otherwise, it
  510. // returns descriptions of all file systems owned by the caller's AWS account
  511. // in the AWS Region of the endpoint that you're calling.
  512. //
  513. // When retrieving all file system descriptions, you can optionally specify
  514. // the MaxItems parameter to limit the number of descriptions in a response.
  515. // If more file system descriptions remain, Amazon EFS returns a NextMarker,
  516. // an opaque token, in the response. In this case, you should send a subsequent
  517. // request with the Marker request parameter set to the value of NextMarker.
  518. //
  519. // To retrieve a list of your file system descriptions, this operation is used
  520. // in an iterative process, where DescribeFileSystems is called first without
  521. // the Marker and then the operation continues to call it with the Marker parameter
  522. // set to the value of the NextMarker from the previous response until the response
  523. // has no NextMarker.
  524. //
  525. // The implementation may return fewer than MaxItems file system descriptions
  526. // while still including a NextMarker value.
  527. //
  528. // The order of file systems returned in the response of one DescribeFileSystems
  529. // call and the order of file systems returned across the responses of a multi-call
  530. // iteration is unspecified.
  531. //
  532. // This operation requires permissions for the elasticfilesystem:DescribeFileSystems
  533. // action.
  534. func (c *EFS) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) {
  535. req, out := c.DescribeFileSystemsRequest(input)
  536. err := req.Send()
  537. return out, err
  538. }
  539. const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups"
  540. // DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the
  541. // client's request for the DescribeMountTargetSecurityGroups operation. The "output" return
  542. // value can be used to capture response data after the request's "Send" method
  543. // is called.
  544. //
  545. // Creating a request object using this method should be used when you want to inject
  546. // custom logic into the request's lifecycle using a custom handler, or if you want to
  547. // access properties on the request object before or after sending the request. If
  548. // you just want the service response, call the DescribeMountTargetSecurityGroups method directly
  549. // instead.
  550. //
  551. // Note: You must call the "Send" method on the returned request object in order
  552. // to execute the request.
  553. //
  554. // // Example sending a request using the DescribeMountTargetSecurityGroupsRequest method.
  555. // req, resp := client.DescribeMountTargetSecurityGroupsRequest(params)
  556. //
  557. // err := req.Send()
  558. // if err == nil { // resp is now filled
  559. // fmt.Println(resp)
  560. // }
  561. //
  562. func (c *EFS) DescribeMountTargetSecurityGroupsRequest(input *DescribeMountTargetSecurityGroupsInput) (req *request.Request, output *DescribeMountTargetSecurityGroupsOutput) {
  563. op := &request.Operation{
  564. Name: opDescribeMountTargetSecurityGroups,
  565. HTTPMethod: "GET",
  566. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
  567. }
  568. if input == nil {
  569. input = &DescribeMountTargetSecurityGroupsInput{}
  570. }
  571. req = c.newRequest(op, input, output)
  572. output = &DescribeMountTargetSecurityGroupsOutput{}
  573. req.Data = output
  574. return
  575. }
  576. // Returns the security groups currently in effect for a mount target. This
  577. // operation requires that the network interface of the mount target has been
  578. // created and the lifecycle state of the mount target is not deleted.
  579. //
  580. // This operation requires permissions for the following actions:
  581. //
  582. // elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount
  583. // target's file system.
  584. //
  585. // ec2:DescribeNetworkInterfaceAttribute action on the mount target's network
  586. // interface.
  587. func (c *EFS) DescribeMountTargetSecurityGroups(input *DescribeMountTargetSecurityGroupsInput) (*DescribeMountTargetSecurityGroupsOutput, error) {
  588. req, out := c.DescribeMountTargetSecurityGroupsRequest(input)
  589. err := req.Send()
  590. return out, err
  591. }
  592. const opDescribeMountTargets = "DescribeMountTargets"
  593. // DescribeMountTargetsRequest generates a "aws/request.Request" representing the
  594. // client's request for the DescribeMountTargets operation. The "output" return
  595. // value can be used to capture response data after the request's "Send" method
  596. // is called.
  597. //
  598. // Creating a request object using this method should be used when you want to inject
  599. // custom logic into the request's lifecycle using a custom handler, or if you want to
  600. // access properties on the request object before or after sending the request. If
  601. // you just want the service response, call the DescribeMountTargets method directly
  602. // instead.
  603. //
  604. // Note: You must call the "Send" method on the returned request object in order
  605. // to execute the request.
  606. //
  607. // // Example sending a request using the DescribeMountTargetsRequest method.
  608. // req, resp := client.DescribeMountTargetsRequest(params)
  609. //
  610. // err := req.Send()
  611. // if err == nil { // resp is now filled
  612. // fmt.Println(resp)
  613. // }
  614. //
  615. func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req *request.Request, output *DescribeMountTargetsOutput) {
  616. op := &request.Operation{
  617. Name: opDescribeMountTargets,
  618. HTTPMethod: "GET",
  619. HTTPPath: "/2015-02-01/mount-targets",
  620. }
  621. if input == nil {
  622. input = &DescribeMountTargetsInput{}
  623. }
  624. req = c.newRequest(op, input, output)
  625. output = &DescribeMountTargetsOutput{}
  626. req.Data = output
  627. return
  628. }
  629. // Returns the descriptions of all the current mount targets, or a specific
  630. // mount target, for a file system. When requesting all of the current mount
  631. // targets, the order of mount targets returned in the response is unspecified.
  632. //
  633. // This operation requires permissions for the elasticfilesystem:DescribeMountTargets
  634. // action, on either the file system ID that you specify in FileSystemId, or
  635. // on the file system of the mount target that you specify in MountTargetId.
  636. func (c *EFS) DescribeMountTargets(input *DescribeMountTargetsInput) (*DescribeMountTargetsOutput, error) {
  637. req, out := c.DescribeMountTargetsRequest(input)
  638. err := req.Send()
  639. return out, err
  640. }
  641. const opDescribeTags = "DescribeTags"
  642. // DescribeTagsRequest generates a "aws/request.Request" representing the
  643. // client's request for the DescribeTags operation. The "output" return
  644. // value can be used to capture response data after the request's "Send" method
  645. // is called.
  646. //
  647. // Creating a request object using this method should be used when you want to inject
  648. // custom logic into the request's lifecycle using a custom handler, or if you want to
  649. // access properties on the request object before or after sending the request. If
  650. // you just want the service response, call the DescribeTags method directly
  651. // instead.
  652. //
  653. // Note: You must call the "Send" method on the returned request object in order
  654. // to execute the request.
  655. //
  656. // // Example sending a request using the DescribeTagsRequest method.
  657. // req, resp := client.DescribeTagsRequest(params)
  658. //
  659. // err := req.Send()
  660. // if err == nil { // resp is now filled
  661. // fmt.Println(resp)
  662. // }
  663. //
  664. func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  665. op := &request.Operation{
  666. Name: opDescribeTags,
  667. HTTPMethod: "GET",
  668. HTTPPath: "/2015-02-01/tags/{FileSystemId}/",
  669. }
  670. if input == nil {
  671. input = &DescribeTagsInput{}
  672. }
  673. req = c.newRequest(op, input, output)
  674. output = &DescribeTagsOutput{}
  675. req.Data = output
  676. return
  677. }
  678. // Returns the tags associated with a file system. The order of tags returned
  679. // in the response of one DescribeTags call and the order of tags returned across
  680. // the responses of a multi-call iteration (when using pagination) is unspecified.
  681. //
  682. // This operation requires permissions for the elasticfilesystem:DescribeTags
  683. // action.
  684. func (c *EFS) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  685. req, out := c.DescribeTagsRequest(input)
  686. err := req.Send()
  687. return out, err
  688. }
  689. const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups"
  690. // ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the
  691. // client's request for the ModifyMountTargetSecurityGroups operation. The "output" return
  692. // value can be used to capture response data after the request's "Send" method
  693. // is called.
  694. //
  695. // Creating a request object using this method should be used when you want to inject
  696. // custom logic into the request's lifecycle using a custom handler, or if you want to
  697. // access properties on the request object before or after sending the request. If
  698. // you just want the service response, call the ModifyMountTargetSecurityGroups method directly
  699. // instead.
  700. //
  701. // Note: You must call the "Send" method on the returned request object in order
  702. // to execute the request.
  703. //
  704. // // Example sending a request using the ModifyMountTargetSecurityGroupsRequest method.
  705. // req, resp := client.ModifyMountTargetSecurityGroupsRequest(params)
  706. //
  707. // err := req.Send()
  708. // if err == nil { // resp is now filled
  709. // fmt.Println(resp)
  710. // }
  711. //
  712. func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSecurityGroupsInput) (req *request.Request, output *ModifyMountTargetSecurityGroupsOutput) {
  713. op := &request.Operation{
  714. Name: opModifyMountTargetSecurityGroups,
  715. HTTPMethod: "PUT",
  716. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
  717. }
  718. if input == nil {
  719. input = &ModifyMountTargetSecurityGroupsInput{}
  720. }
  721. req = c.newRequest(op, input, output)
  722. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  723. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  724. output = &ModifyMountTargetSecurityGroupsOutput{}
  725. req.Data = output
  726. return
  727. }
  728. // Modifies the set of security groups in effect for a mount target.
  729. //
  730. // When you create a mount target, Amazon EFS also creates a new network interface.
  731. // For more information, see CreateMountTarget. This operation replaces the
  732. // security groups in effect for the network interface associated with a mount
  733. // target, with the SecurityGroups provided in the request. This operation requires
  734. // that the network interface of the mount target has been created and the lifecycle
  735. // state of the mount target is not deleted.
  736. //
  737. // The operation requires permissions for the following actions:
  738. //
  739. // elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount
  740. // target's file system.
  741. //
  742. // ec2:ModifyNetworkInterfaceAttribute action on the mount target's network
  743. // interface.
  744. func (c *EFS) ModifyMountTargetSecurityGroups(input *ModifyMountTargetSecurityGroupsInput) (*ModifyMountTargetSecurityGroupsOutput, error) {
  745. req, out := c.ModifyMountTargetSecurityGroupsRequest(input)
  746. err := req.Send()
  747. return out, err
  748. }
  749. type CreateFileSystemInput struct {
  750. _ struct{} `type:"structure"`
  751. // String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent
  752. // creation.
  753. CreationToken *string `min:"1" type:"string" required:"true"`
  754. // The PerformanceMode of the file system. We recommend generalPurpose performance
  755. // mode for most file systems. File systems using the maxIO performance mode
  756. // can scale to higher levels of aggregate throughput and operations per second
  757. // with a tradeoff of slightly higher latencies for most file operations. This
  758. // can't be changed after the file system has been created.
  759. PerformanceMode *string `type:"string" enum:"PerformanceMode"`
  760. }
  761. // String returns the string representation
  762. func (s CreateFileSystemInput) String() string {
  763. return awsutil.Prettify(s)
  764. }
  765. // GoString returns the string representation
  766. func (s CreateFileSystemInput) GoString() string {
  767. return s.String()
  768. }
  769. // Validate inspects the fields of the type to determine if they are valid.
  770. func (s *CreateFileSystemInput) Validate() error {
  771. invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"}
  772. if s.CreationToken == nil {
  773. invalidParams.Add(request.NewErrParamRequired("CreationToken"))
  774. }
  775. if s.CreationToken != nil && len(*s.CreationToken) < 1 {
  776. invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1))
  777. }
  778. if invalidParams.Len() > 0 {
  779. return invalidParams
  780. }
  781. return nil
  782. }
  783. type CreateMountTargetInput struct {
  784. _ struct{} `type:"structure"`
  785. // ID of the file system for which to create the mount target.
  786. FileSystemId *string `type:"string" required:"true"`
  787. // Valid IPv4 address within the address range of the specified subnet.
  788. IpAddress *string `type:"string"`
  789. // Up to five VPC security group IDs, of the form sg-xxxxxxxx. These must be
  790. // for the same VPC as subnet specified.
  791. SecurityGroups []*string `type:"list"`
  792. // ID of the subnet to add the mount target in.
  793. SubnetId *string `type:"string" required:"true"`
  794. }
  795. // String returns the string representation
  796. func (s CreateMountTargetInput) String() string {
  797. return awsutil.Prettify(s)
  798. }
  799. // GoString returns the string representation
  800. func (s CreateMountTargetInput) GoString() string {
  801. return s.String()
  802. }
  803. // Validate inspects the fields of the type to determine if they are valid.
  804. func (s *CreateMountTargetInput) Validate() error {
  805. invalidParams := request.ErrInvalidParams{Context: "CreateMountTargetInput"}
  806. if s.FileSystemId == nil {
  807. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  808. }
  809. if s.SubnetId == nil {
  810. invalidParams.Add(request.NewErrParamRequired("SubnetId"))
  811. }
  812. if invalidParams.Len() > 0 {
  813. return invalidParams
  814. }
  815. return nil
  816. }
  817. type CreateTagsInput struct {
  818. _ struct{} `type:"structure"`
  819. // ID of the file system whose tags you want to modify (String). This operation
  820. // modifies the tags only, not the file system.
  821. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  822. // Array of Tag objects to add. Each Tag object is a key-value pair.
  823. Tags []*Tag `type:"list" required:"true"`
  824. }
  825. // String returns the string representation
  826. func (s CreateTagsInput) String() string {
  827. return awsutil.Prettify(s)
  828. }
  829. // GoString returns the string representation
  830. func (s CreateTagsInput) GoString() string {
  831. return s.String()
  832. }
  833. // Validate inspects the fields of the type to determine if they are valid.
  834. func (s *CreateTagsInput) Validate() error {
  835. invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"}
  836. if s.FileSystemId == nil {
  837. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  838. }
  839. if s.Tags == nil {
  840. invalidParams.Add(request.NewErrParamRequired("Tags"))
  841. }
  842. if s.Tags != nil {
  843. for i, v := range s.Tags {
  844. if v == nil {
  845. continue
  846. }
  847. if err := v.Validate(); err != nil {
  848. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  849. }
  850. }
  851. }
  852. if invalidParams.Len() > 0 {
  853. return invalidParams
  854. }
  855. return nil
  856. }
  857. type CreateTagsOutput struct {
  858. _ struct{} `type:"structure"`
  859. }
  860. // String returns the string representation
  861. func (s CreateTagsOutput) String() string {
  862. return awsutil.Prettify(s)
  863. }
  864. // GoString returns the string representation
  865. func (s CreateTagsOutput) GoString() string {
  866. return s.String()
  867. }
  868. type DeleteFileSystemInput struct {
  869. _ struct{} `type:"structure"`
  870. // ID of the file system you want to delete.
  871. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  872. }
  873. // String returns the string representation
  874. func (s DeleteFileSystemInput) String() string {
  875. return awsutil.Prettify(s)
  876. }
  877. // GoString returns the string representation
  878. func (s DeleteFileSystemInput) GoString() string {
  879. return s.String()
  880. }
  881. // Validate inspects the fields of the type to determine if they are valid.
  882. func (s *DeleteFileSystemInput) Validate() error {
  883. invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"}
  884. if s.FileSystemId == nil {
  885. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  886. }
  887. if invalidParams.Len() > 0 {
  888. return invalidParams
  889. }
  890. return nil
  891. }
  892. type DeleteFileSystemOutput struct {
  893. _ struct{} `type:"structure"`
  894. }
  895. // String returns the string representation
  896. func (s DeleteFileSystemOutput) String() string {
  897. return awsutil.Prettify(s)
  898. }
  899. // GoString returns the string representation
  900. func (s DeleteFileSystemOutput) GoString() string {
  901. return s.String()
  902. }
  903. type DeleteMountTargetInput struct {
  904. _ struct{} `type:"structure"`
  905. // ID of the mount target to delete (String).
  906. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  907. }
  908. // String returns the string representation
  909. func (s DeleteMountTargetInput) String() string {
  910. return awsutil.Prettify(s)
  911. }
  912. // GoString returns the string representation
  913. func (s DeleteMountTargetInput) GoString() string {
  914. return s.String()
  915. }
  916. // Validate inspects the fields of the type to determine if they are valid.
  917. func (s *DeleteMountTargetInput) Validate() error {
  918. invalidParams := request.ErrInvalidParams{Context: "DeleteMountTargetInput"}
  919. if s.MountTargetId == nil {
  920. invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
  921. }
  922. if invalidParams.Len() > 0 {
  923. return invalidParams
  924. }
  925. return nil
  926. }
  927. type DeleteMountTargetOutput struct {
  928. _ struct{} `type:"structure"`
  929. }
  930. // String returns the string representation
  931. func (s DeleteMountTargetOutput) String() string {
  932. return awsutil.Prettify(s)
  933. }
  934. // GoString returns the string representation
  935. func (s DeleteMountTargetOutput) GoString() string {
  936. return s.String()
  937. }
  938. type DeleteTagsInput struct {
  939. _ struct{} `type:"structure"`
  940. // ID of the file system whose tags you want to delete (String).
  941. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  942. // List of tag keys to delete.
  943. TagKeys []*string `type:"list" required:"true"`
  944. }
  945. // String returns the string representation
  946. func (s DeleteTagsInput) String() string {
  947. return awsutil.Prettify(s)
  948. }
  949. // GoString returns the string representation
  950. func (s DeleteTagsInput) GoString() string {
  951. return s.String()
  952. }
  953. // Validate inspects the fields of the type to determine if they are valid.
  954. func (s *DeleteTagsInput) Validate() error {
  955. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  956. if s.FileSystemId == nil {
  957. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  958. }
  959. if s.TagKeys == nil {
  960. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  961. }
  962. if invalidParams.Len() > 0 {
  963. return invalidParams
  964. }
  965. return nil
  966. }
  967. type DeleteTagsOutput struct {
  968. _ struct{} `type:"structure"`
  969. }
  970. // String returns the string representation
  971. func (s DeleteTagsOutput) String() string {
  972. return awsutil.Prettify(s)
  973. }
  974. // GoString returns the string representation
  975. func (s DeleteTagsOutput) GoString() string {
  976. return s.String()
  977. }
  978. type DescribeFileSystemsInput struct {
  979. _ struct{} `type:"structure"`
  980. // (Optional) Restricts the list to the file system with this creation token
  981. // (String). You specify a creation token when you create an Amazon EFS file
  982. // system.
  983. CreationToken *string `location:"querystring" locationName:"CreationToken" min:"1" type:"string"`
  984. // (Optional) ID of the file system whose description you want to retrieve (String).
  985. FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
  986. // (Optional) Opaque pagination token returned from a previous DescribeFileSystems
  987. // operation (String). If present, specifies to continue the list from where
  988. // the returning call had left off.
  989. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  990. // (Optional) Specifies the maximum number of file systems to return in the
  991. // response (integer). This parameter value must be greater than 0. The number
  992. // of items that Amazon EFS returns is the minimum of the MaxItems parameter
  993. // specified in the request and the service's internal maximum number of items
  994. // per page.
  995. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  996. }
  997. // String returns the string representation
  998. func (s DescribeFileSystemsInput) String() string {
  999. return awsutil.Prettify(s)
  1000. }
  1001. // GoString returns the string representation
  1002. func (s DescribeFileSystemsInput) GoString() string {
  1003. return s.String()
  1004. }
  1005. // Validate inspects the fields of the type to determine if they are valid.
  1006. func (s *DescribeFileSystemsInput) Validate() error {
  1007. invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"}
  1008. if s.CreationToken != nil && len(*s.CreationToken) < 1 {
  1009. invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1))
  1010. }
  1011. if s.MaxItems != nil && *s.MaxItems < 1 {
  1012. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  1013. }
  1014. if invalidParams.Len() > 0 {
  1015. return invalidParams
  1016. }
  1017. return nil
  1018. }
  1019. type DescribeFileSystemsOutput struct {
  1020. _ struct{} `type:"structure"`
  1021. // Array of file system descriptions.
  1022. FileSystems []*FileSystemDescription `type:"list"`
  1023. // Present if provided by caller in the request (String).
  1024. Marker *string `type:"string"`
  1025. // Present if there are more file systems than returned in the response (String).
  1026. // You can use the NextMarker in the subsequent request to fetch the descriptions.
  1027. NextMarker *string `type:"string"`
  1028. }
  1029. // String returns the string representation
  1030. func (s DescribeFileSystemsOutput) String() string {
  1031. return awsutil.Prettify(s)
  1032. }
  1033. // GoString returns the string representation
  1034. func (s DescribeFileSystemsOutput) GoString() string {
  1035. return s.String()
  1036. }
  1037. type DescribeMountTargetSecurityGroupsInput struct {
  1038. _ struct{} `type:"structure"`
  1039. // ID of the mount target whose security groups you want to retrieve.
  1040. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  1041. }
  1042. // String returns the string representation
  1043. func (s DescribeMountTargetSecurityGroupsInput) String() string {
  1044. return awsutil.Prettify(s)
  1045. }
  1046. // GoString returns the string representation
  1047. func (s DescribeMountTargetSecurityGroupsInput) GoString() string {
  1048. return s.String()
  1049. }
  1050. // Validate inspects the fields of the type to determine if they are valid.
  1051. func (s *DescribeMountTargetSecurityGroupsInput) Validate() error {
  1052. invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetSecurityGroupsInput"}
  1053. if s.MountTargetId == nil {
  1054. invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
  1055. }
  1056. if invalidParams.Len() > 0 {
  1057. return invalidParams
  1058. }
  1059. return nil
  1060. }
  1061. type DescribeMountTargetSecurityGroupsOutput struct {
  1062. _ struct{} `type:"structure"`
  1063. // Array of security groups.
  1064. SecurityGroups []*string `type:"list" required:"true"`
  1065. }
  1066. // String returns the string representation
  1067. func (s DescribeMountTargetSecurityGroupsOutput) String() string {
  1068. return awsutil.Prettify(s)
  1069. }
  1070. // GoString returns the string representation
  1071. func (s DescribeMountTargetSecurityGroupsOutput) GoString() string {
  1072. return s.String()
  1073. }
  1074. type DescribeMountTargetsInput struct {
  1075. _ struct{} `type:"structure"`
  1076. // (Optional) ID of the file system whose mount targets you want to list (String).
  1077. // It must be included in your request if MountTargetId is not included.
  1078. FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
  1079. // (Optional) Opaque pagination token returned from a previous DescribeMountTargets
  1080. // operation (String). If present, it specifies to continue the list from where
  1081. // the previous returning call left off.
  1082. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  1083. // (Optional) Maximum number of mount targets to return in the response. It
  1084. // must be an integer with a value greater than zero.
  1085. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  1086. // (Optional) ID of the mount target that you want to have described (String).
  1087. // It must be included in your request if FileSystemId is not included.
  1088. MountTargetId *string `location:"querystring" locationName:"MountTargetId" type:"string"`
  1089. }
  1090. // String returns the string representation
  1091. func (s DescribeMountTargetsInput) String() string {
  1092. return awsutil.Prettify(s)
  1093. }
  1094. // GoString returns the string representation
  1095. func (s DescribeMountTargetsInput) GoString() string {
  1096. return s.String()
  1097. }
  1098. // Validate inspects the fields of the type to determine if they are valid.
  1099. func (s *DescribeMountTargetsInput) Validate() error {
  1100. invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetsInput"}
  1101. if s.MaxItems != nil && *s.MaxItems < 1 {
  1102. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  1103. }
  1104. if invalidParams.Len() > 0 {
  1105. return invalidParams
  1106. }
  1107. return nil
  1108. }
  1109. type DescribeMountTargetsOutput struct {
  1110. _ struct{} `type:"structure"`
  1111. // If the request included the Marker, the response returns that value in this
  1112. // field.
  1113. Marker *string `type:"string"`
  1114. // Returns the file system's mount targets as an array of MountTargetDescription
  1115. // objects.
  1116. MountTargets []*MountTargetDescription `type:"list"`
  1117. // If a value is present, there are more mount targets to return. In a subsequent
  1118. // request, you can provide Marker in your request with this value to retrieve
  1119. // the next set of mount targets.
  1120. NextMarker *string `type:"string"`
  1121. }
  1122. // String returns the string representation
  1123. func (s DescribeMountTargetsOutput) String() string {
  1124. return awsutil.Prettify(s)
  1125. }
  1126. // GoString returns the string representation
  1127. func (s DescribeMountTargetsOutput) GoString() string {
  1128. return s.String()
  1129. }
  1130. type DescribeTagsInput struct {
  1131. _ struct{} `type:"structure"`
  1132. // ID of the file system whose tag set you want to retrieve.
  1133. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  1134. // (Optional) Opaque pagination token returned from a previous DescribeTags
  1135. // operation (String). If present, it specifies to continue the list from where
  1136. // the previous call left off.
  1137. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  1138. // (Optional) Maximum number of file system tags to return in the response.
  1139. // It must be an integer with a value greater than zero.
  1140. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  1141. }
  1142. // String returns the string representation
  1143. func (s DescribeTagsInput) String() string {
  1144. return awsutil.Prettify(s)
  1145. }
  1146. // GoString returns the string representation
  1147. func (s DescribeTagsInput) GoString() string {
  1148. return s.String()
  1149. }
  1150. // Validate inspects the fields of the type to determine if they are valid.
  1151. func (s *DescribeTagsInput) Validate() error {
  1152. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  1153. if s.FileSystemId == nil {
  1154. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  1155. }
  1156. if s.MaxItems != nil && *s.MaxItems < 1 {
  1157. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  1158. }
  1159. if invalidParams.Len() > 0 {
  1160. return invalidParams
  1161. }
  1162. return nil
  1163. }
  1164. type DescribeTagsOutput struct {
  1165. _ struct{} `type:"structure"`
  1166. // If the request included a Marker, the response returns that value in this
  1167. // field.
  1168. Marker *string `type:"string"`
  1169. // If a value is present, there are more tags to return. In a subsequent request,
  1170. // you can provide the value of NextMarker as the value of the Marker parameter
  1171. // in your next request to retrieve the next set of tags.
  1172. NextMarker *string `type:"string"`
  1173. // Returns tags associated with the file system as an array of Tag objects.
  1174. Tags []*Tag `type:"list" required:"true"`
  1175. }
  1176. // String returns the string representation
  1177. func (s DescribeTagsOutput) String() string {
  1178. return awsutil.Prettify(s)
  1179. }
  1180. // GoString returns the string representation
  1181. func (s DescribeTagsOutput) GoString() string {
  1182. return s.String()
  1183. }
  1184. // Description of the file system.
  1185. type FileSystemDescription struct {
  1186. _ struct{} `type:"structure"`
  1187. // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).
  1188. CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  1189. // Opaque string specified in the request.
  1190. CreationToken *string `min:"1" type:"string" required:"true"`
  1191. // ID of the file system, assigned by Amazon EFS.
  1192. FileSystemId *string `type:"string" required:"true"`
  1193. // Lifecycle phase of the file system.
  1194. LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
  1195. // You can add tags to a file system, including a Name tag. For more information,
  1196. // see CreateTags. If the file system has a Name tag, Amazon EFS returns the
  1197. // value in this field.
  1198. Name *string `type:"string"`
  1199. // Current number of mount targets that the file system has. For more information,
  1200. // see CreateMountTarget.
  1201. NumberOfMountTargets *int64 `type:"integer" required:"true"`
  1202. // AWS account that created the file system. If the file system was created
  1203. // by an IAM user, the parent account to which the user belongs is the owner.
  1204. OwnerId *string `type:"string" required:"true"`
  1205. // The PerformanceMode of the file system.
  1206. PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"`
  1207. // Latest known metered size (in bytes) of data stored in the file system, in
  1208. // bytes, in its Value field, and the time at which that size was determined
  1209. // in its Timestamp field. The Timestamp value is the integer number of seconds
  1210. // since 1970-01-01T00:00:00Z. Note that the value does not represent the size
  1211. // of a consistent snapshot of the file system, but it is eventually consistent
  1212. // when there are no writes to the file system. That is, the value will represent
  1213. // actual size only if the file system is not modified for a period longer than
  1214. // a couple of hours. Otherwise, the value is not the exact size the file system
  1215. // was at any instant in time.
  1216. SizeInBytes *FileSystemSize `type:"structure" required:"true"`
  1217. }
  1218. // String returns the string representation
  1219. func (s FileSystemDescription) String() string {
  1220. return awsutil.Prettify(s)
  1221. }
  1222. // GoString returns the string representation
  1223. func (s FileSystemDescription) GoString() string {
  1224. return s.String()
  1225. }
  1226. // Latest known metered size (in bytes) of data stored in the file system, in
  1227. // its Value field, and the time at which that size was determined in its Timestamp
  1228. // field. Note that the value does not represent the size of a consistent snapshot
  1229. // of the file system, but it is eventually consistent when there are no writes
  1230. // to the file system. That is, the value will represent the actual size only
  1231. // if the file system is not modified for a period longer than a couple of hours.
  1232. // Otherwise, the value is not necessarily the exact size the file system was
  1233. // at any instant in time.
  1234. type FileSystemSize struct {
  1235. _ struct{} `type:"structure"`
  1236. // Time at which the size of data, returned in the Value field, was determined.
  1237. // The value is the integer number of seconds since 1970-01-01T00:00:00Z.
  1238. Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  1239. // Latest known metered size (in bytes) of data stored in the file system.
  1240. Value *int64 `type:"long" required:"true"`
  1241. }
  1242. // String returns the string representation
  1243. func (s FileSystemSize) String() string {
  1244. return awsutil.Prettify(s)
  1245. }
  1246. // GoString returns the string representation
  1247. func (s FileSystemSize) GoString() string {
  1248. return s.String()
  1249. }
  1250. type ModifyMountTargetSecurityGroupsInput struct {
  1251. _ struct{} `type:"structure"`
  1252. // ID of the mount target whose security groups you want to modify.
  1253. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  1254. // Array of up to five VPC security group IDs.
  1255. SecurityGroups []*string `type:"list"`
  1256. }
  1257. // String returns the string representation
  1258. func (s ModifyMountTargetSecurityGroupsInput) String() string {
  1259. return awsutil.Prettify(s)
  1260. }
  1261. // GoString returns the string representation
  1262. func (s ModifyMountTargetSecurityGroupsInput) GoString() string {
  1263. return s.String()
  1264. }
  1265. // Validate inspects the fields of the type to determine if they are valid.
  1266. func (s *ModifyMountTargetSecurityGroupsInput) Validate() error {
  1267. invalidParams := request.ErrInvalidParams{Context: "ModifyMountTargetSecurityGroupsInput"}
  1268. if s.MountTargetId == nil {
  1269. invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
  1270. }
  1271. if invalidParams.Len() > 0 {
  1272. return invalidParams
  1273. }
  1274. return nil
  1275. }
  1276. type ModifyMountTargetSecurityGroupsOutput struct {
  1277. _ struct{} `type:"structure"`
  1278. }
  1279. // String returns the string representation
  1280. func (s ModifyMountTargetSecurityGroupsOutput) String() string {
  1281. return awsutil.Prettify(s)
  1282. }
  1283. // GoString returns the string representation
  1284. func (s ModifyMountTargetSecurityGroupsOutput) GoString() string {
  1285. return s.String()
  1286. }
  1287. // Provides a description of a mount target.
  1288. type MountTargetDescription struct {
  1289. _ struct{} `type:"structure"`
  1290. // ID of the file system for which the mount target is intended.
  1291. FileSystemId *string `type:"string" required:"true"`
  1292. // Address at which the file system may be mounted via the mount target.
  1293. IpAddress *string `type:"string"`
  1294. // Lifecycle state of the mount target.
  1295. LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
  1296. // System-assigned mount target ID.
  1297. MountTargetId *string `type:"string" required:"true"`
  1298. // ID of the network interface that Amazon EFS created when it created the mount
  1299. // target.
  1300. NetworkInterfaceId *string `type:"string"`
  1301. // AWS account ID that owns the resource.
  1302. OwnerId *string `type:"string"`
  1303. // ID of the mount target's subnet.
  1304. SubnetId *string `type:"string" required:"true"`
  1305. }
  1306. // String returns the string representation
  1307. func (s MountTargetDescription) String() string {
  1308. return awsutil.Prettify(s)
  1309. }
  1310. // GoString returns the string representation
  1311. func (s MountTargetDescription) GoString() string {
  1312. return s.String()
  1313. }
  1314. // A tag is a key-value pair. Allowed characters: letters, whitespace, and numbers,
  1315. // representable in UTF-8, and the following characters: + - = . _ : /
  1316. type Tag struct {
  1317. _ struct{} `type:"structure"`
  1318. // Tag key (String). The key can't start with aws:.
  1319. Key *string `min:"1" type:"string" required:"true"`
  1320. // Value of the tag key.
  1321. Value *string `type:"string" required:"true"`
  1322. }
  1323. // String returns the string representation
  1324. func (s Tag) String() string {
  1325. return awsutil.Prettify(s)
  1326. }
  1327. // GoString returns the string representation
  1328. func (s Tag) GoString() string {
  1329. return s.String()
  1330. }
  1331. // Validate inspects the fields of the type to determine if they are valid.
  1332. func (s *Tag) Validate() error {
  1333. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  1334. if s.Key == nil {
  1335. invalidParams.Add(request.NewErrParamRequired("Key"))
  1336. }
  1337. if s.Key != nil && len(*s.Key) < 1 {
  1338. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  1339. }
  1340. if s.Value == nil {
  1341. invalidParams.Add(request.NewErrParamRequired("Value"))
  1342. }
  1343. if invalidParams.Len() > 0 {
  1344. return invalidParams
  1345. }
  1346. return nil
  1347. }
  1348. const (
  1349. // @enum LifeCycleState
  1350. LifeCycleStateCreating = "creating"
  1351. // @enum LifeCycleState
  1352. LifeCycleStateAvailable = "available"
  1353. // @enum LifeCycleState
  1354. LifeCycleStateDeleting = "deleting"
  1355. // @enum LifeCycleState
  1356. LifeCycleStateDeleted = "deleted"
  1357. )
  1358. const (
  1359. // @enum PerformanceMode
  1360. PerformanceModeGeneralPurpose = "generalPurpose"
  1361. // @enum PerformanceMode
  1362. PerformanceModeMaxIo = "maxIO"
  1363. )