api.go 69 KB

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