api.go 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172
  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. "time"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. )
  9. const opCreateFileSystem = "CreateFileSystem"
  10. // CreateFileSystemRequest generates a request for the CreateFileSystem operation.
  11. func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) {
  12. op := &request.Operation{
  13. Name: opCreateFileSystem,
  14. HTTPMethod: "POST",
  15. HTTPPath: "/2015-02-01/file-systems",
  16. }
  17. if input == nil {
  18. input = &CreateFileSystemInput{}
  19. }
  20. req = c.newRequest(op, input, output)
  21. output = &FileSystemDescription{}
  22. req.Data = output
  23. return
  24. }
  25. // Creates a new, empty file system. The operation requires a creation token
  26. // in the request that Amazon EFS uses to ensure idempotent creation (calling
  27. // the operation with same creation token has no effect). If a file system does
  28. // not currently exist that is owned by the caller's AWS account with the specified
  29. // creation token, this operation does the following:
  30. //
  31. // Creates a new, empty file system. The file system will have an Amazon EFS
  32. // assigned ID, and an initial lifecycle state "creating". Returns with the
  33. // description of the created file system. Otherwise, this operation returns
  34. // a FileSystemAlreadyExists error with the ID of the existing file system.
  35. //
  36. // For basic use cases, you can use a randomly generated UUID for the creation
  37. // token. The idempotent operation allows you to retry a CreateFileSystem call
  38. // without risk of creating an extra file system. This can happen when an initial
  39. // call fails in a way that leaves it uncertain whether or not a file system
  40. // was actually created. An example might be that a transport level timeout
  41. // occurred or your connection was reset. As long as you use the same creation
  42. // token, if the initial call had succeeded in creating a file system, the client
  43. // can learn of its existence from the FileSystemAlreadyExists error.
  44. //
  45. // The CreateFileSystem call returns while the file system's lifecycle state
  46. // is still "creating". You can check the file system creation status by calling
  47. // the DescribeFileSystems API, which among other things returns the file system
  48. // state. After the file system is fully created, Amazon EFS sets its lifecycle
  49. // state to "available", at which point you can create one or more mount targets
  50. // for the file system (CreateMountTarget) in your VPC. You mount your Amazon
  51. // EFS file system on an EC2 instances in your VPC via the mount target. For
  52. // more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html)
  53. //
  54. // This operation requires permission for the elasticfilesystem:CreateFileSystem
  55. // action.
  56. func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) {
  57. req, out := c.CreateFileSystemRequest(input)
  58. err := req.Send()
  59. return out, err
  60. }
  61. const opCreateMountTarget = "CreateMountTarget"
  62. // CreateMountTargetRequest generates a request for the CreateMountTarget operation.
  63. func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *request.Request, output *MountTargetDescription) {
  64. op := &request.Operation{
  65. Name: opCreateMountTarget,
  66. HTTPMethod: "POST",
  67. HTTPPath: "/2015-02-01/mount-targets",
  68. }
  69. if input == nil {
  70. input = &CreateMountTargetInput{}
  71. }
  72. req = c.newRequest(op, input, output)
  73. output = &MountTargetDescription{}
  74. req.Data = output
  75. return
  76. }
  77. // Creates a mount target for a file system. You can then mount the file system
  78. // on EC2 instances via the mount target.
  79. //
  80. // You can create one mount target in each Availability Zone in your VPC. All
  81. // EC2 instances in a VPC within a given Availability Zone share a single mount
  82. // target for a given file system. If you have multiple subnets in an Availability
  83. // Zone, you create a mount target in one of the subnets. EC2 instances do not
  84. // need to be in the same subnet as the mount target in order to access their
  85. // file system. For more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html).
  86. //
  87. // In the request, you also specify a file system ID for which you are creating
  88. // the mount target and the file system's lifecycle state must be "available"
  89. // (see DescribeFileSystems).
  90. //
  91. // In the request, you also provide a subnet ID, which serves several purposes:
  92. //
  93. // It determines the VPC in which Amazon EFS creates the mount target. It
  94. // determines the Availability Zone in which Amazon EFS creates the mount target.
  95. // It determines the IP address range from which Amazon EFS selects the IP
  96. // address of the mount target if you don't specify an IP address in the request.
  97. // After creating the mount target, Amazon EFS returns a response that includes,
  98. // a MountTargetId and an IpAddress. You use this IP address when mounting the
  99. // file system in an EC2 instance. You can also use the mount target's DNS name
  100. // when mounting the file system. The EC2 instance on which you mount the file
  101. // system via the mount target can resolve the mount target's DNS name to its
  102. // IP address. For more information, see How it Works: Implementation Overview
  103. // (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation)
  104. //
  105. // Note that you can create mount targets for a file system in only one VPC,
  106. // and there can be only one mount target per Availability Zone. That is, if
  107. // the file system already has one or more mount targets created for it, the
  108. // request to add another mount target must meet the following requirements:
  109. //
  110. // The subnet specified in the request must belong to the same VPC as the
  111. // subnets of the existing mount targets.
  112. //
  113. // The subnet specified in the request must not be in the same Availability
  114. // Zone as any of the subnets of the existing mount targets. If the request
  115. // satisfies the requirements, Amazon EFS does the following:
  116. //
  117. // Creates a new mount target in the specified subnet. Also creates a new
  118. // network interface in the subnet as follows: If the request provides an IpAddress,
  119. // Amazon EFS assigns that IP address to the network interface. Otherwise, Amazon
  120. // EFS assigns a free address in the subnet (in the same way that the Amazon
  121. // EC2 CreateNetworkInterface call does when a request does not specify a primary
  122. // private IP address). If the request provides SecurityGroups, this network
  123. // interface is associated with those security groups. Otherwise, it belongs
  124. // to the default security group for the subnet's VPC. Assigns the description
  125. // "Mount target fsmt-id for file system fs-id" where fsmt-id is the mount target
  126. // ID, and fs-id is the FileSystemId. Sets the requesterManaged property of
  127. // the network interface to "true", and the requesterId value to "EFS". Each
  128. // Amazon EFS mount target has one corresponding requestor-managed EC2 network
  129. // interface. After the network interface is created, Amazon EFS sets the NetworkInterfaceId
  130. // field in the mount target's description to the network interface ID, and
  131. // the IpAddress field to its address. If network interface creation fails,
  132. // the entire CreateMountTarget operation fails.
  133. //
  134. // The CreateMountTarget call returns only after creating the network interface,
  135. // but while the mount target state is still "creating". You can check the mount
  136. // target creation status by calling the DescribeFileSystems API, which among
  137. // other things returns the mount target state. We recommend you create a mount
  138. // target in each of the Availability Zones. There are cost considerations for
  139. // using a file system in an Availability Zone through a mount target created
  140. // in another Availability Zone. For more information, go to Amazon EFS (http://aws.amazon.com/efs/)
  141. // product detail page. In addition, by always using a mount target local to
  142. // the instance's Availability Zone, you eliminate a partial failure scenario;
  143. // if the Availablity Zone in which your mount target is created goes down,
  144. // then you won't be able to access your file system through that mount target.
  145. //
  146. // This operation requires permission for the following action on the file
  147. // system:
  148. //
  149. // elasticfilesystem:CreateMountTarget This operation also requires permission
  150. // for the following Amazon EC2 actions:
  151. //
  152. // ec2:DescribeSubnets ec2:DescribeNetworkInterfaces ec2:CreateNetworkInterface
  153. func (c *EFS) CreateMountTarget(input *CreateMountTargetInput) (*MountTargetDescription, error) {
  154. req, out := c.CreateMountTargetRequest(input)
  155. err := req.Send()
  156. return out, err
  157. }
  158. const opCreateTags = "CreateTags"
  159. // CreateTagsRequest generates a request for the CreateTags operation.
  160. func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
  161. op := &request.Operation{
  162. Name: opCreateTags,
  163. HTTPMethod: "POST",
  164. HTTPPath: "/2015-02-01/create-tags/{FileSystemId}",
  165. }
  166. if input == nil {
  167. input = &CreateTagsInput{}
  168. }
  169. req = c.newRequest(op, input, output)
  170. output = &CreateTagsOutput{}
  171. req.Data = output
  172. return
  173. }
  174. // Creates or overwrites tags associated with a file system. Each tag is a key-value
  175. // pair. If a tag key specified in the request already exists on the file system,
  176. // this operation overwrites its value with the value provided in the request.
  177. // If you add the "Name" tag to your file system, Amazon EFS returns it in the
  178. // response to the DescribeFileSystems API.
  179. //
  180. // This operation requires permission for the elasticfilesystem:CreateTags
  181. // action.
  182. func (c *EFS) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
  183. req, out := c.CreateTagsRequest(input)
  184. err := req.Send()
  185. return out, err
  186. }
  187. const opDeleteFileSystem = "DeleteFileSystem"
  188. // DeleteFileSystemRequest generates a request for the DeleteFileSystem operation.
  189. func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) {
  190. op := &request.Operation{
  191. Name: opDeleteFileSystem,
  192. HTTPMethod: "DELETE",
  193. HTTPPath: "/2015-02-01/file-systems/{FileSystemId}",
  194. }
  195. if input == nil {
  196. input = &DeleteFileSystemInput{}
  197. }
  198. req = c.newRequest(op, input, output)
  199. output = &DeleteFileSystemOutput{}
  200. req.Data = output
  201. return
  202. }
  203. // Deletes a file system, permanently severing access to its contents. Upon
  204. // return, the file system no longer exists and you will not be able to access
  205. // any contents of the deleted file system.
  206. //
  207. // You cannot delete a file system that is in use. That is, if the file system
  208. // has any mount targets, you must first delete them. For more information,
  209. // see DescribeMountTargets and DeleteMountTarget.
  210. //
  211. // The DeleteFileSystem call returns while the file system state is still "deleting".
  212. // You can check the file system deletion status by calling the DescribeFileSystems
  213. // API, which returns a list of file systems in your account. If you pass file
  214. // system ID or creation token for the deleted file system, the DescribeFileSystems
  215. // will return a 404 "FileSystemNotFound" error. This operation requires permission
  216. // for the elasticfilesystem:DeleteFileSystem action.
  217. func (c *EFS) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) {
  218. req, out := c.DeleteFileSystemRequest(input)
  219. err := req.Send()
  220. return out, err
  221. }
  222. const opDeleteMountTarget = "DeleteMountTarget"
  223. // DeleteMountTargetRequest generates a request for the DeleteMountTarget operation.
  224. func (c *EFS) DeleteMountTargetRequest(input *DeleteMountTargetInput) (req *request.Request, output *DeleteMountTargetOutput) {
  225. op := &request.Operation{
  226. Name: opDeleteMountTarget,
  227. HTTPMethod: "DELETE",
  228. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}",
  229. }
  230. if input == nil {
  231. input = &DeleteMountTargetInput{}
  232. }
  233. req = c.newRequest(op, input, output)
  234. output = &DeleteMountTargetOutput{}
  235. req.Data = output
  236. return
  237. }
  238. // Deletes the specified mount target.
  239. //
  240. // This operation forcibly breaks any mounts of the file system via the mount
  241. // target being deleted, which might disrupt instances or applications using
  242. // those mounts. To avoid applications getting cut off abruptly, you might consider
  243. // unmounting any mounts of the mount target, if feasible. The operation also
  244. // deletes the associated network interface. Uncommitted writes may be lost,
  245. // but breaking a mount target using this operation does not corrupt the file
  246. // system itself. The file system you created remains. You can mount an EC2
  247. // instance in your VPC using another mount target.
  248. //
  249. // This operation requires permission for the following action on the file
  250. // system:
  251. //
  252. // elasticfilesystem:DeleteMountTarget The DeleteMountTarget call returns
  253. // while the mount target state is still "deleting". You can check the mount
  254. // target deletion by calling the DescribeMountTargets API, which returns a
  255. // list of mount target descriptions for the given file system. The operation
  256. // also requires permission for the following Amazon EC2 action on the mount
  257. // target's network interface:
  258. //
  259. // ec2:DeleteNetworkInterface
  260. func (c *EFS) DeleteMountTarget(input *DeleteMountTargetInput) (*DeleteMountTargetOutput, error) {
  261. req, out := c.DeleteMountTargetRequest(input)
  262. err := req.Send()
  263. return out, err
  264. }
  265. const opDeleteTags = "DeleteTags"
  266. // DeleteTagsRequest generates a request for the DeleteTags operation.
  267. func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  268. op := &request.Operation{
  269. Name: opDeleteTags,
  270. HTTPMethod: "POST",
  271. HTTPPath: "/2015-02-01/delete-tags/{FileSystemId}",
  272. }
  273. if input == nil {
  274. input = &DeleteTagsInput{}
  275. }
  276. req = c.newRequest(op, input, output)
  277. output = &DeleteTagsOutput{}
  278. req.Data = output
  279. return
  280. }
  281. // Deletes the specified tags from a file system. If the DeleteTags request
  282. // includes a tag key that does not exist, Amazon EFS ignores it; it is not
  283. // an error. For more information about tags and related restrictions, go to
  284. // Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
  285. // in the AWS Billing and Cost Management User Guide.
  286. //
  287. // This operation requires permission for the elasticfilesystem:DeleteTags
  288. // action.
  289. func (c *EFS) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  290. req, out := c.DeleteTagsRequest(input)
  291. err := req.Send()
  292. return out, err
  293. }
  294. const opDescribeFileSystems = "DescribeFileSystems"
  295. // DescribeFileSystemsRequest generates a request for the DescribeFileSystems operation.
  296. func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) {
  297. op := &request.Operation{
  298. Name: opDescribeFileSystems,
  299. HTTPMethod: "GET",
  300. HTTPPath: "/2015-02-01/file-systems",
  301. }
  302. if input == nil {
  303. input = &DescribeFileSystemsInput{}
  304. }
  305. req = c.newRequest(op, input, output)
  306. output = &DescribeFileSystemsOutput{}
  307. req.Data = output
  308. return
  309. }
  310. // Returns the description of a specific Amazon EFS file system if either the
  311. // file system CreationToken or the FileSystemId is provided; otherwise, returns
  312. // descriptions of all file systems owned by the caller's AWS account in the
  313. // AWS region of the endpoint that you're calling.
  314. //
  315. // When retrieving all file system descriptions, you can optionally specify
  316. // the MaxItems parameter to limit the number of descriptions in a response.
  317. // If more file system descriptions remain, Amazon EFS returns a NextMarker,
  318. // an opaque token, in the response. In this case, you should send a subsequent
  319. // request with the Marker request parameter set to the value of NextMarker.
  320. //
  321. // So to retrieve a list of your file system descriptions, the expected usage
  322. // of this API is an iterative process of first calling DescribeFileSystems
  323. // without the Marker and then continuing to call it with the Marker parameter
  324. // set to the value of the NextMarker from the previous response until the response
  325. // has no NextMarker.
  326. //
  327. // Note that the implementation may return fewer than MaxItems file system
  328. // descriptions while still including a NextMarker value.
  329. //
  330. // The order of file systems returned in the response of one DescribeFileSystems
  331. // call, and the order of file systems returned across the responses of a multi-call
  332. // iteration, is unspecified.
  333. //
  334. // This operation requires permission for the elasticfilesystem:DescribeFileSystems
  335. // action.
  336. func (c *EFS) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) {
  337. req, out := c.DescribeFileSystemsRequest(input)
  338. err := req.Send()
  339. return out, err
  340. }
  341. const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups"
  342. // DescribeMountTargetSecurityGroupsRequest generates a request for the DescribeMountTargetSecurityGroups operation.
  343. func (c *EFS) DescribeMountTargetSecurityGroupsRequest(input *DescribeMountTargetSecurityGroupsInput) (req *request.Request, output *DescribeMountTargetSecurityGroupsOutput) {
  344. op := &request.Operation{
  345. Name: opDescribeMountTargetSecurityGroups,
  346. HTTPMethod: "GET",
  347. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
  348. }
  349. if input == nil {
  350. input = &DescribeMountTargetSecurityGroupsInput{}
  351. }
  352. req = c.newRequest(op, input, output)
  353. output = &DescribeMountTargetSecurityGroupsOutput{}
  354. req.Data = output
  355. return
  356. }
  357. // Returns the security groups currently in effect for a mount target. This
  358. // operation requires that the network interface of the mount target has been
  359. // created and the life cycle state of the mount target is not "deleted".
  360. //
  361. // This operation requires permissions for the following actions:
  362. //
  363. // elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount
  364. // target's file system. ec2:DescribeNetworkInterfaceAttribute action on the
  365. // mount target's network interface.
  366. func (c *EFS) DescribeMountTargetSecurityGroups(input *DescribeMountTargetSecurityGroupsInput) (*DescribeMountTargetSecurityGroupsOutput, error) {
  367. req, out := c.DescribeMountTargetSecurityGroupsRequest(input)
  368. err := req.Send()
  369. return out, err
  370. }
  371. const opDescribeMountTargets = "DescribeMountTargets"
  372. // DescribeMountTargetsRequest generates a request for the DescribeMountTargets operation.
  373. func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req *request.Request, output *DescribeMountTargetsOutput) {
  374. op := &request.Operation{
  375. Name: opDescribeMountTargets,
  376. HTTPMethod: "GET",
  377. HTTPPath: "/2015-02-01/mount-targets",
  378. }
  379. if input == nil {
  380. input = &DescribeMountTargetsInput{}
  381. }
  382. req = c.newRequest(op, input, output)
  383. output = &DescribeMountTargetsOutput{}
  384. req.Data = output
  385. return
  386. }
  387. // Returns the descriptions of the current mount targets for a file system.
  388. // The order of mount targets returned in the response is unspecified.
  389. //
  390. // This operation requires permission for the elasticfilesystem:DescribeMountTargets
  391. // action on the file system FileSystemId.
  392. func (c *EFS) DescribeMountTargets(input *DescribeMountTargetsInput) (*DescribeMountTargetsOutput, error) {
  393. req, out := c.DescribeMountTargetsRequest(input)
  394. err := req.Send()
  395. return out, err
  396. }
  397. const opDescribeTags = "DescribeTags"
  398. // DescribeTagsRequest generates a request for the DescribeTags operation.
  399. func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  400. op := &request.Operation{
  401. Name: opDescribeTags,
  402. HTTPMethod: "GET",
  403. HTTPPath: "/2015-02-01/tags/{FileSystemId}/",
  404. }
  405. if input == nil {
  406. input = &DescribeTagsInput{}
  407. }
  408. req = c.newRequest(op, input, output)
  409. output = &DescribeTagsOutput{}
  410. req.Data = output
  411. return
  412. }
  413. // Returns the tags associated with a file system. The order of tags returned
  414. // in the response of one DescribeTags call, and the order of tags returned
  415. // across the responses of a multi-call iteration (when using pagination), is
  416. // unspecified.
  417. //
  418. // This operation requires permission for the elasticfilesystem:DescribeTags
  419. // action.
  420. func (c *EFS) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  421. req, out := c.DescribeTagsRequest(input)
  422. err := req.Send()
  423. return out, err
  424. }
  425. const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups"
  426. // ModifyMountTargetSecurityGroupsRequest generates a request for the ModifyMountTargetSecurityGroups operation.
  427. func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSecurityGroupsInput) (req *request.Request, output *ModifyMountTargetSecurityGroupsOutput) {
  428. op := &request.Operation{
  429. Name: opModifyMountTargetSecurityGroups,
  430. HTTPMethod: "PUT",
  431. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
  432. }
  433. if input == nil {
  434. input = &ModifyMountTargetSecurityGroupsInput{}
  435. }
  436. req = c.newRequest(op, input, output)
  437. output = &ModifyMountTargetSecurityGroupsOutput{}
  438. req.Data = output
  439. return
  440. }
  441. // Modifies the set of security groups in effect for a mount target.
  442. //
  443. // When you create a mount target, Amazon EFS also creates a new network interface
  444. // (see CreateMountTarget). This operation replaces the security groups in effect
  445. // for the network interface associated with a mount target, with the SecurityGroups
  446. // provided in the request. This operation requires that the network interface
  447. // of the mount target has been created and the life cycle state of the mount
  448. // target is not "deleted".
  449. //
  450. // The operation requires permissions for the following actions:
  451. //
  452. // elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount
  453. // target's file system. ec2:ModifyNetworkInterfaceAttribute action on the
  454. // mount target's network interface.
  455. func (c *EFS) ModifyMountTargetSecurityGroups(input *ModifyMountTargetSecurityGroupsInput) (*ModifyMountTargetSecurityGroupsOutput, error) {
  456. req, out := c.ModifyMountTargetSecurityGroupsRequest(input)
  457. err := req.Send()
  458. return out, err
  459. }
  460. type CreateFileSystemInput struct {
  461. // String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent
  462. // creation.
  463. CreationToken *string `type:"string" required:"true"`
  464. metadataCreateFileSystemInput `json:"-" xml:"-"`
  465. }
  466. type metadataCreateFileSystemInput struct {
  467. SDKShapeTraits bool `type:"structure"`
  468. }
  469. // String returns the string representation
  470. func (s CreateFileSystemInput) String() string {
  471. return awsutil.Prettify(s)
  472. }
  473. // GoString returns the string representation
  474. func (s CreateFileSystemInput) GoString() string {
  475. return s.String()
  476. }
  477. type CreateMountTargetInput struct {
  478. // The ID of the file system for which to create the mount target.
  479. FileSystemId *string `type:"string" required:"true"`
  480. // A valid IPv4 address within the address range of the specified subnet.
  481. IpAddress *string `type:"string"`
  482. // Up to 5 VPC security group IDs, of the form "sg-xxxxxxxx". These must be
  483. // for the same VPC as subnet specified.
  484. SecurityGroups []*string `type:"list"`
  485. // The ID of the subnet to add the mount target in.
  486. SubnetId *string `type:"string" required:"true"`
  487. metadataCreateMountTargetInput `json:"-" xml:"-"`
  488. }
  489. type metadataCreateMountTargetInput struct {
  490. SDKShapeTraits bool `type:"structure"`
  491. }
  492. // String returns the string representation
  493. func (s CreateMountTargetInput) String() string {
  494. return awsutil.Prettify(s)
  495. }
  496. // GoString returns the string representation
  497. func (s CreateMountTargetInput) GoString() string {
  498. return s.String()
  499. }
  500. type CreateTagsInput struct {
  501. // String. The ID of the file system whose tags you want to modify. This operation
  502. // modifies only the tags and not the file system.
  503. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  504. // An array of Tag objects to add. Each Tag object is a key-value pair.
  505. Tags []*Tag `type:"list" required:"true"`
  506. metadataCreateTagsInput `json:"-" xml:"-"`
  507. }
  508. type metadataCreateTagsInput struct {
  509. SDKShapeTraits bool `type:"structure"`
  510. }
  511. // String returns the string representation
  512. func (s CreateTagsInput) String() string {
  513. return awsutil.Prettify(s)
  514. }
  515. // GoString returns the string representation
  516. func (s CreateTagsInput) GoString() string {
  517. return s.String()
  518. }
  519. type CreateTagsOutput struct {
  520. metadataCreateTagsOutput `json:"-" xml:"-"`
  521. }
  522. type metadataCreateTagsOutput struct {
  523. SDKShapeTraits bool `type:"structure"`
  524. }
  525. // String returns the string representation
  526. func (s CreateTagsOutput) String() string {
  527. return awsutil.Prettify(s)
  528. }
  529. // GoString returns the string representation
  530. func (s CreateTagsOutput) GoString() string {
  531. return s.String()
  532. }
  533. type DeleteFileSystemInput struct {
  534. // The ID of the file system you want to delete.
  535. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  536. metadataDeleteFileSystemInput `json:"-" xml:"-"`
  537. }
  538. type metadataDeleteFileSystemInput struct {
  539. SDKShapeTraits bool `type:"structure"`
  540. }
  541. // String returns the string representation
  542. func (s DeleteFileSystemInput) String() string {
  543. return awsutil.Prettify(s)
  544. }
  545. // GoString returns the string representation
  546. func (s DeleteFileSystemInput) GoString() string {
  547. return s.String()
  548. }
  549. type DeleteFileSystemOutput struct {
  550. metadataDeleteFileSystemOutput `json:"-" xml:"-"`
  551. }
  552. type metadataDeleteFileSystemOutput struct {
  553. SDKShapeTraits bool `type:"structure"`
  554. }
  555. // String returns the string representation
  556. func (s DeleteFileSystemOutput) String() string {
  557. return awsutil.Prettify(s)
  558. }
  559. // GoString returns the string representation
  560. func (s DeleteFileSystemOutput) GoString() string {
  561. return s.String()
  562. }
  563. type DeleteMountTargetInput struct {
  564. // String. The ID of the mount target to delete.
  565. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  566. metadataDeleteMountTargetInput `json:"-" xml:"-"`
  567. }
  568. type metadataDeleteMountTargetInput struct {
  569. SDKShapeTraits bool `type:"structure"`
  570. }
  571. // String returns the string representation
  572. func (s DeleteMountTargetInput) String() string {
  573. return awsutil.Prettify(s)
  574. }
  575. // GoString returns the string representation
  576. func (s DeleteMountTargetInput) GoString() string {
  577. return s.String()
  578. }
  579. type DeleteMountTargetOutput struct {
  580. metadataDeleteMountTargetOutput `json:"-" xml:"-"`
  581. }
  582. type metadataDeleteMountTargetOutput struct {
  583. SDKShapeTraits bool `type:"structure"`
  584. }
  585. // String returns the string representation
  586. func (s DeleteMountTargetOutput) String() string {
  587. return awsutil.Prettify(s)
  588. }
  589. // GoString returns the string representation
  590. func (s DeleteMountTargetOutput) GoString() string {
  591. return s.String()
  592. }
  593. type DeleteTagsInput struct {
  594. // String. The ID of the file system whose tags you want to delete.
  595. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  596. // A list of tag keys to delete.
  597. TagKeys []*string `type:"list" required:"true"`
  598. metadataDeleteTagsInput `json:"-" xml:"-"`
  599. }
  600. type metadataDeleteTagsInput struct {
  601. SDKShapeTraits bool `type:"structure"`
  602. }
  603. // String returns the string representation
  604. func (s DeleteTagsInput) String() string {
  605. return awsutil.Prettify(s)
  606. }
  607. // GoString returns the string representation
  608. func (s DeleteTagsInput) GoString() string {
  609. return s.String()
  610. }
  611. type DeleteTagsOutput struct {
  612. metadataDeleteTagsOutput `json:"-" xml:"-"`
  613. }
  614. type metadataDeleteTagsOutput struct {
  615. SDKShapeTraits bool `type:"structure"`
  616. }
  617. // String returns the string representation
  618. func (s DeleteTagsOutput) String() string {
  619. return awsutil.Prettify(s)
  620. }
  621. // GoString returns the string representation
  622. func (s DeleteTagsOutput) GoString() string {
  623. return s.String()
  624. }
  625. type DescribeFileSystemsInput struct {
  626. // Optional string. Restricts the list to the file system with this creation
  627. // token (you specify a creation token at the time of creating an Amazon EFS
  628. // file system).
  629. CreationToken *string `location:"querystring" locationName:"CreationToken" type:"string"`
  630. // Optional string. File system ID whose description you want to retrieve.
  631. FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
  632. // Optional string. Opaque pagination token returned from a previous DescribeFileSystems
  633. // operation. If present, specifies to continue the list from where the returning
  634. // call had left off.
  635. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  636. // Optional integer. Specifies the maximum number of file systems to return
  637. // in the response. This parameter value must be greater than 0. The number
  638. // of items Amazon EFS returns will be the minimum of the MaxItems parameter
  639. // specified in the request and the service's internal maximum number of items
  640. // per page.
  641. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  642. metadataDescribeFileSystemsInput `json:"-" xml:"-"`
  643. }
  644. type metadataDescribeFileSystemsInput struct {
  645. SDKShapeTraits bool `type:"structure"`
  646. }
  647. // String returns the string representation
  648. func (s DescribeFileSystemsInput) String() string {
  649. return awsutil.Prettify(s)
  650. }
  651. // GoString returns the string representation
  652. func (s DescribeFileSystemsInput) GoString() string {
  653. return s.String()
  654. }
  655. type DescribeFileSystemsOutput struct {
  656. // An array of file system descriptions.
  657. FileSystems []*FileSystemDescription `type:"list"`
  658. // A string, present if provided by caller in the request.
  659. Marker *string `type:"string"`
  660. // A string, present if there are more file systems than returned in the response.
  661. // You can use the NextMarker in the subsequent request to fetch the descriptions.
  662. NextMarker *string `type:"string"`
  663. metadataDescribeFileSystemsOutput `json:"-" xml:"-"`
  664. }
  665. type metadataDescribeFileSystemsOutput struct {
  666. SDKShapeTraits bool `type:"structure"`
  667. }
  668. // String returns the string representation
  669. func (s DescribeFileSystemsOutput) String() string {
  670. return awsutil.Prettify(s)
  671. }
  672. // GoString returns the string representation
  673. func (s DescribeFileSystemsOutput) GoString() string {
  674. return s.String()
  675. }
  676. type DescribeMountTargetSecurityGroupsInput struct {
  677. // The ID of the mount target whose security groups you want to retrieve.
  678. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  679. metadataDescribeMountTargetSecurityGroupsInput `json:"-" xml:"-"`
  680. }
  681. type metadataDescribeMountTargetSecurityGroupsInput struct {
  682. SDKShapeTraits bool `type:"structure"`
  683. }
  684. // String returns the string representation
  685. func (s DescribeMountTargetSecurityGroupsInput) String() string {
  686. return awsutil.Prettify(s)
  687. }
  688. // GoString returns the string representation
  689. func (s DescribeMountTargetSecurityGroupsInput) GoString() string {
  690. return s.String()
  691. }
  692. type DescribeMountTargetSecurityGroupsOutput struct {
  693. // An array of security groups.
  694. SecurityGroups []*string `type:"list" required:"true"`
  695. metadataDescribeMountTargetSecurityGroupsOutput `json:"-" xml:"-"`
  696. }
  697. type metadataDescribeMountTargetSecurityGroupsOutput struct {
  698. SDKShapeTraits bool `type:"structure"`
  699. }
  700. // String returns the string representation
  701. func (s DescribeMountTargetSecurityGroupsOutput) String() string {
  702. return awsutil.Prettify(s)
  703. }
  704. // GoString returns the string representation
  705. func (s DescribeMountTargetSecurityGroupsOutput) GoString() string {
  706. return s.String()
  707. }
  708. type DescribeMountTargetsInput struct {
  709. // String. The ID of the file system whose mount targets you want to list.
  710. FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string" required:"true"`
  711. // Optional. String. Opaque pagination token returned from a previous DescribeMountTargets
  712. // operation. If present, it specifies to continue the list from where the previous
  713. // returning call left off.
  714. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  715. // Optional. Maximum number of mount targets to return in the response. It must
  716. // be an integer with a value greater than zero.
  717. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  718. metadataDescribeMountTargetsInput `json:"-" xml:"-"`
  719. }
  720. type metadataDescribeMountTargetsInput struct {
  721. SDKShapeTraits bool `type:"structure"`
  722. }
  723. // String returns the string representation
  724. func (s DescribeMountTargetsInput) String() string {
  725. return awsutil.Prettify(s)
  726. }
  727. // GoString returns the string representation
  728. func (s DescribeMountTargetsInput) GoString() string {
  729. return s.String()
  730. }
  731. type DescribeMountTargetsOutput struct {
  732. // If the request included the Marker, the response returns that value in this
  733. // field.
  734. Marker *string `type:"string"`
  735. // Returns the file system's mount targets as an array of MountTargetDescription
  736. // objects.
  737. MountTargets []*MountTargetDescription `type:"list"`
  738. // If a value is present, there are more mount targets to return. In a subsequent
  739. // request, you can provide Marker in your request with this value to retrieve
  740. // the next set of mount targets.
  741. NextMarker *string `type:"string"`
  742. metadataDescribeMountTargetsOutput `json:"-" xml:"-"`
  743. }
  744. type metadataDescribeMountTargetsOutput struct {
  745. SDKShapeTraits bool `type:"structure"`
  746. }
  747. // String returns the string representation
  748. func (s DescribeMountTargetsOutput) String() string {
  749. return awsutil.Prettify(s)
  750. }
  751. // GoString returns the string representation
  752. func (s DescribeMountTargetsOutput) GoString() string {
  753. return s.String()
  754. }
  755. type DescribeTagsInput struct {
  756. // The ID of the file system whose tag set you want to retrieve.
  757. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  758. // Optional. String. Opaque pagination token returned from a previous DescribeTags
  759. // operation. If present, it specifies to continue the list from where the previous
  760. // call left off.
  761. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  762. // Optional. Maximum number of file system tags to return in the response. It
  763. // must be an integer with a value greater than zero.
  764. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  765. metadataDescribeTagsInput `json:"-" xml:"-"`
  766. }
  767. type metadataDescribeTagsInput struct {
  768. SDKShapeTraits bool `type:"structure"`
  769. }
  770. // String returns the string representation
  771. func (s DescribeTagsInput) String() string {
  772. return awsutil.Prettify(s)
  773. }
  774. // GoString returns the string representation
  775. func (s DescribeTagsInput) GoString() string {
  776. return s.String()
  777. }
  778. type DescribeTagsOutput struct {
  779. // If the request included a Marker, the response returns that value in this
  780. // field.
  781. Marker *string `type:"string"`
  782. // If a value is present, there are more tags to return. In a subsequent request,
  783. // you can provide the value of NextMarker as the value of the Marker parameter
  784. // in your next request to retrieve the next set of tags.
  785. NextMarker *string `type:"string"`
  786. // Returns tags associated with the file system as an array of Tag objects.
  787. Tags []*Tag `type:"list" required:"true"`
  788. metadataDescribeTagsOutput `json:"-" xml:"-"`
  789. }
  790. type metadataDescribeTagsOutput struct {
  791. SDKShapeTraits bool `type:"structure"`
  792. }
  793. // String returns the string representation
  794. func (s DescribeTagsOutput) String() string {
  795. return awsutil.Prettify(s)
  796. }
  797. // GoString returns the string representation
  798. func (s DescribeTagsOutput) GoString() string {
  799. return s.String()
  800. }
  801. // This object provides description of a file system.
  802. type FileSystemDescription struct {
  803. // The time at which the file system was created, in seconds, since 1970-01-01T00:00:00Z.
  804. CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  805. // Opaque string specified in the request.
  806. CreationToken *string `type:"string" required:"true"`
  807. // The file system ID assigned by Amazon EFS.
  808. FileSystemId *string `type:"string" required:"true"`
  809. // A predefined string value that indicates the lifecycle phase of the file
  810. // system.
  811. LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
  812. // You can add tags to a file system (see CreateTags) including a "Name" tag.
  813. // If the file system has a "Name" tag, Amazon EFS returns the value in this
  814. // field.
  815. Name *string `type:"string"`
  816. // The current number of mount targets (see CreateMountTarget) the file system
  817. // has.
  818. NumberOfMountTargets *int64 `type:"integer" required:"true"`
  819. // The AWS account that created the file system. If the file system was created
  820. // by an IAM user, the parent account to which the user belongs is the owner.
  821. OwnerId *string `type:"string" required:"true"`
  822. // This object provides the latest known metered size of data stored in the
  823. // file system, in bytes, in its Value field, and the time at which that size
  824. // was determined in its Timestamp field. The Timestamp value is the integer
  825. // number of seconds since 1970-01-01T00:00:00Z. Note that the value does not
  826. // represent the size of a consistent snapshot of the file system, but it is
  827. // eventually consistent when there are no writes to the file system. That is,
  828. // the value will represent actual size only if the file system is not modified
  829. // for a period longer than a couple of hours. Otherwise, the value is not the
  830. // exact size the file system was at any instant in time.
  831. SizeInBytes *FileSystemSize `type:"structure" required:"true"`
  832. metadataFileSystemDescription `json:"-" xml:"-"`
  833. }
  834. type metadataFileSystemDescription struct {
  835. SDKShapeTraits bool `type:"structure"`
  836. }
  837. // String returns the string representation
  838. func (s FileSystemDescription) String() string {
  839. return awsutil.Prettify(s)
  840. }
  841. // GoString returns the string representation
  842. func (s FileSystemDescription) GoString() string {
  843. return s.String()
  844. }
  845. // This object provides the latest known metered size, in bytes, of data stored
  846. // in the file system, in its Value field, and the time at which that size was
  847. // determined in its Timestamp field. Note that the value does not represent
  848. // the size of a consistent snapshot of the file system, but it is eventually
  849. // consistent when there are no writes to the file system. That is, the value
  850. // will represent the actual size only if the file system is not modified for
  851. // a period longer than a couple of hours. Otherwise, the value is not necessarily
  852. // the exact size the file system was at any instant in time.
  853. type FileSystemSize struct {
  854. // The time at which the size of data, returned in the Value field, was determined.
  855. // The value is the integer number of seconds since 1970-01-01T00:00:00Z.
  856. Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  857. // The latest known metered size, in bytes, of data stored in the file system.
  858. Value *int64 `type:"long" required:"true"`
  859. metadataFileSystemSize `json:"-" xml:"-"`
  860. }
  861. type metadataFileSystemSize struct {
  862. SDKShapeTraits bool `type:"structure"`
  863. }
  864. // String returns the string representation
  865. func (s FileSystemSize) String() string {
  866. return awsutil.Prettify(s)
  867. }
  868. // GoString returns the string representation
  869. func (s FileSystemSize) GoString() string {
  870. return s.String()
  871. }
  872. type ModifyMountTargetSecurityGroupsInput struct {
  873. // The ID of the mount target whose security groups you want to modify.
  874. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  875. // An array of up to five VPC security group IDs.
  876. SecurityGroups []*string `type:"list"`
  877. metadataModifyMountTargetSecurityGroupsInput `json:"-" xml:"-"`
  878. }
  879. type metadataModifyMountTargetSecurityGroupsInput struct {
  880. SDKShapeTraits bool `type:"structure"`
  881. }
  882. // String returns the string representation
  883. func (s ModifyMountTargetSecurityGroupsInput) String() string {
  884. return awsutil.Prettify(s)
  885. }
  886. // GoString returns the string representation
  887. func (s ModifyMountTargetSecurityGroupsInput) GoString() string {
  888. return s.String()
  889. }
  890. type ModifyMountTargetSecurityGroupsOutput struct {
  891. metadataModifyMountTargetSecurityGroupsOutput `json:"-" xml:"-"`
  892. }
  893. type metadataModifyMountTargetSecurityGroupsOutput struct {
  894. SDKShapeTraits bool `type:"structure"`
  895. }
  896. // String returns the string representation
  897. func (s ModifyMountTargetSecurityGroupsOutput) String() string {
  898. return awsutil.Prettify(s)
  899. }
  900. // GoString returns the string representation
  901. func (s ModifyMountTargetSecurityGroupsOutput) GoString() string {
  902. return s.String()
  903. }
  904. // This object provides description of a mount target.
  905. type MountTargetDescription struct {
  906. // The ID of the file system for which the mount target is intended.
  907. FileSystemId *string `type:"string" required:"true"`
  908. // The address at which the file system may be mounted via the mount target.
  909. IpAddress *string `type:"string"`
  910. // The lifecycle state the mount target is in.
  911. LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
  912. // The system-assigned mount target ID.
  913. MountTargetId *string `type:"string" required:"true"`
  914. // The ID of the network interface that Amazon EFS created when it created the
  915. // mount target.
  916. NetworkInterfaceId *string `type:"string"`
  917. // The AWS account ID that owns the resource.
  918. OwnerId *string `type:"string"`
  919. // The ID of the subnet that the mount target is in.
  920. SubnetId *string `type:"string" required:"true"`
  921. metadataMountTargetDescription `json:"-" xml:"-"`
  922. }
  923. type metadataMountTargetDescription struct {
  924. SDKShapeTraits bool `type:"structure"`
  925. }
  926. // String returns the string representation
  927. func (s MountTargetDescription) String() string {
  928. return awsutil.Prettify(s)
  929. }
  930. // GoString returns the string representation
  931. func (s MountTargetDescription) GoString() string {
  932. return s.String()
  933. }
  934. // A tag is a pair of key and value. The allowed characters in keys and values
  935. // are letters, whitespace, and numbers, representable in UTF-8, and the characters
  936. // '+', '-', '=', '.', '_', ':', and '/'.
  937. type Tag struct {
  938. // Tag key, a string. The key must not start with "aws:".
  939. Key *string `type:"string" required:"true"`
  940. // Value of the tag key.
  941. Value *string `type:"string" required:"true"`
  942. metadataTag `json:"-" xml:"-"`
  943. }
  944. type metadataTag struct {
  945. SDKShapeTraits bool `type:"structure"`
  946. }
  947. // String returns the string representation
  948. func (s Tag) String() string {
  949. return awsutil.Prettify(s)
  950. }
  951. // GoString returns the string representation
  952. func (s Tag) GoString() string {
  953. return s.String()
  954. }
  955. const (
  956. // @enum LifeCycleState
  957. LifeCycleStateCreating = "creating"
  958. // @enum LifeCycleState
  959. LifeCycleStateAvailable = "available"
  960. // @enum LifeCycleState
  961. LifeCycleStateDeleting = "deleting"
  962. // @enum LifeCycleState
  963. LifeCycleStateDeleted = "deleted"
  964. )