api.go 108 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package efs
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  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 will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See CreateFileSystem for more information on using the CreateFileSystem
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the CreateFileSystemRequest method.
  29. // req, resp := client.CreateFileSystemRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem
  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. output = &FileSystemDescription{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateFileSystem API operation for Amazon Elastic File System.
  51. //
  52. // Creates a new, empty file system. The operation requires a creation token
  53. // in the request that Amazon EFS uses to ensure idempotent creation (calling
  54. // the operation with same creation token has no effect). If a file system does
  55. // not currently exist that is owned by the caller's AWS account with the specified
  56. // creation token, this operation does the following:
  57. //
  58. // * Creates a new, empty file system. The file system will have an Amazon
  59. // EFS assigned ID, and an initial lifecycle state creating.
  60. //
  61. // * Returns with the description of the created file system.
  62. //
  63. // Otherwise, this operation returns a FileSystemAlreadyExists error with the
  64. // ID of the existing file system.
  65. //
  66. // For basic use cases, you can use a randomly generated UUID for the creation
  67. // token.
  68. //
  69. // The idempotent operation allows you to retry a CreateFileSystem call without
  70. // risk of creating an extra file system. This can happen when an initial call
  71. // fails in a way that leaves it uncertain whether or not a file system was
  72. // actually created. An example might be that a transport level timeout occurred
  73. // or your connection was reset. As long as you use the same creation token,
  74. // if the initial call had succeeded in creating a file system, the client can
  75. // learn of its existence from the FileSystemAlreadyExists error.
  76. //
  77. // The CreateFileSystem call returns while the file system's lifecycle state
  78. // is still creating. You can check the file system creation status by calling
  79. // the DescribeFileSystems operation, which among other things returns the file
  80. // system state.
  81. //
  82. // This operation also takes an optional PerformanceMode parameter that you
  83. // choose for your file system. We recommend generalPurpose performance mode
  84. // for most file systems. File systems using the maxIO performance mode can
  85. // scale to higher levels of aggregate throughput and operations per second
  86. // with a tradeoff of slightly higher latencies for most file operations. The
  87. // performance mode can't be changed after the file system has been created.
  88. // For more information, see Amazon EFS: Performance Modes (http://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html).
  89. //
  90. // After the file system is fully created, Amazon EFS sets its lifecycle state
  91. // to available, at which point you can create one or more mount targets for
  92. // the file system in your VPC. For more information, see CreateMountTarget.
  93. // You mount your Amazon EFS file system on an EC2 instances in your VPC via
  94. // the mount target. For more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html).
  95. //
  96. // This operation requires permissions for the elasticfilesystem:CreateFileSystem
  97. // action.
  98. //
  99. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  100. // with awserr.Error's Code and Message methods to get detailed information about
  101. // the error.
  102. //
  103. // See the AWS API reference guide for Amazon Elastic File System's
  104. // API operation CreateFileSystem for usage and error information.
  105. //
  106. // Returned Error Codes:
  107. // * ErrCodeBadRequest "BadRequest"
  108. // Returned if the request is malformed or contains an error such as an invalid
  109. // parameter value or a missing required parameter.
  110. //
  111. // * ErrCodeInternalServerError "InternalServerError"
  112. // Returned if an error occurred on the server side.
  113. //
  114. // * ErrCodeFileSystemAlreadyExists "FileSystemAlreadyExists"
  115. // Returned if the file system you are trying to create already exists, with
  116. // the creation token you provided.
  117. //
  118. // * ErrCodeFileSystemLimitExceeded "FileSystemLimitExceeded"
  119. // Returned if the AWS account has already created the maximum number of file
  120. // systems allowed per account.
  121. //
  122. // * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity"
  123. // Returned if there's not enough capacity to provision additional throughput.
  124. // This value might be returned when you try to create a file system in provisioned
  125. // throughput mode, when you attempt to increase the provisioned throughput
  126. // of an existing file system, or when you attempt to change an existing file
  127. // system from bursting to provisioned throughput mode.
  128. //
  129. // * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded"
  130. // Returned if the throughput mode or amount of provisioned throughput can't
  131. // be changed because the throughput limit of 1024 MiB/s has been reached.
  132. //
  133. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem
  134. func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) {
  135. req, out := c.CreateFileSystemRequest(input)
  136. return out, req.Send()
  137. }
  138. // CreateFileSystemWithContext is the same as CreateFileSystem with the addition of
  139. // the ability to pass a context and additional request options.
  140. //
  141. // See CreateFileSystem for details on how to use this API operation.
  142. //
  143. // The context must be non-nil and will be used for request cancellation. If
  144. // the context is nil a panic will occur. In the future the SDK may create
  145. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  146. // for more information on using Contexts.
  147. func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*FileSystemDescription, error) {
  148. req, out := c.CreateFileSystemRequest(input)
  149. req.SetContext(ctx)
  150. req.ApplyOptions(opts...)
  151. return out, req.Send()
  152. }
  153. const opCreateMountTarget = "CreateMountTarget"
  154. // CreateMountTargetRequest generates a "aws/request.Request" representing the
  155. // client's request for the CreateMountTarget operation. The "output" return
  156. // value will be populated with the request's response once the request completes
  157. // successfully.
  158. //
  159. // Use "Send" method on the returned Request to send the API call to the service.
  160. // the "output" return value is not valid until after Send returns without error.
  161. //
  162. // See CreateMountTarget for more information on using the CreateMountTarget
  163. // API call, and error handling.
  164. //
  165. // This method is useful when you want to inject custom logic or configuration
  166. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  167. //
  168. //
  169. // // Example sending a request using the CreateMountTargetRequest method.
  170. // req, resp := client.CreateMountTargetRequest(params)
  171. //
  172. // err := req.Send()
  173. // if err == nil { // resp is now filled
  174. // fmt.Println(resp)
  175. // }
  176. //
  177. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget
  178. func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *request.Request, output *MountTargetDescription) {
  179. op := &request.Operation{
  180. Name: opCreateMountTarget,
  181. HTTPMethod: "POST",
  182. HTTPPath: "/2015-02-01/mount-targets",
  183. }
  184. if input == nil {
  185. input = &CreateMountTargetInput{}
  186. }
  187. output = &MountTargetDescription{}
  188. req = c.newRequest(op, input, output)
  189. return
  190. }
  191. // CreateMountTarget API operation for Amazon Elastic File System.
  192. //
  193. // Creates a mount target for a file system. You can then mount the file system
  194. // on EC2 instances via the mount target.
  195. //
  196. // You can create one mount target in each Availability Zone in your VPC. All
  197. // EC2 instances in a VPC within a given Availability Zone share a single mount
  198. // target for a given file system. If you have multiple subnets in an Availability
  199. // Zone, you create a mount target in one of the subnets. EC2 instances do not
  200. // need to be in the same subnet as the mount target in order to access their
  201. // file system. For more information, see Amazon EFS: How it Works (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html).
  202. //
  203. // In the request, you also specify a file system ID for which you are creating
  204. // the mount target and the file system's lifecycle state must be available.
  205. // For more information, see DescribeFileSystems.
  206. //
  207. // In the request, you also provide a subnet ID, which determines the following:
  208. //
  209. // * VPC in which Amazon EFS creates the mount target
  210. //
  211. // * Availability Zone in which Amazon EFS creates the mount target
  212. //
  213. // * IP address range from which Amazon EFS selects the IP address of the
  214. // mount target (if you don't specify an IP address in the request)
  215. //
  216. // After creating the mount target, Amazon EFS returns a response that includes,
  217. // a MountTargetId and an IpAddress. You use this IP address when mounting the
  218. // file system in an EC2 instance. You can also use the mount target's DNS name
  219. // when mounting the file system. The EC2 instance on which you mount the file
  220. // system via the mount target can resolve the mount target's DNS name to its
  221. // IP address. For more information, see How it Works: Implementation Overview
  222. // (http://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation).
  223. //
  224. // Note that you can create mount targets for a file system in only one VPC,
  225. // and there can be only one mount target per Availability Zone. That is, if
  226. // the file system already has one or more mount targets created for it, the
  227. // subnet specified in the request to add another mount target must meet the
  228. // following requirements:
  229. //
  230. // * Must belong to the same VPC as the subnets of the existing mount targets
  231. //
  232. // * Must not be in the same Availability Zone as any of the subnets of the
  233. // existing mount targets
  234. //
  235. // If the request satisfies the requirements, Amazon EFS does the following:
  236. //
  237. // * Creates a new mount target in the specified subnet.
  238. //
  239. // * Also creates a new network interface in the subnet as follows:
  240. //
  241. // If the request provides an IpAddress, Amazon EFS assigns that IP address
  242. // to the network interface. Otherwise, Amazon EFS assigns a free address
  243. // in the subnet (in the same way that the Amazon EC2 CreateNetworkInterface
  244. // call does when a request does not specify a primary private IP address).
  245. //
  246. // If the request provides SecurityGroups, this network interface is associated
  247. // with those security groups. Otherwise, it belongs to the default security
  248. // group for the subnet's VPC.
  249. //
  250. // Assigns the description Mount target fsmt-id for file system fs-id where
  251. // fsmt-id is the mount target ID, and fs-id is the FileSystemId.
  252. //
  253. // Sets the requesterManaged property of the network interface to true, and
  254. // the requesterId value to EFS.
  255. //
  256. // Each Amazon EFS mount target has one corresponding requester-managed EC2
  257. // network interface. After the network interface is created, Amazon EFS
  258. // sets the NetworkInterfaceId field in the mount target's description to
  259. // the network interface ID, and the IpAddress field to its address. If network
  260. // interface creation fails, the entire CreateMountTarget operation fails.
  261. //
  262. // The CreateMountTarget call returns only after creating the network interface,
  263. // but while the mount target state is still creating, you can check the mount
  264. // target creation status by calling the DescribeMountTargets operation, which
  265. // among other things returns the mount target state.
  266. //
  267. // We recommend you create a mount target in each of the Availability Zones.
  268. // There are cost considerations for using a file system in an Availability
  269. // Zone through a mount target created in another Availability Zone. For more
  270. // information, see Amazon EFS (http://aws.amazon.com/efs/). In addition, by
  271. // always using a mount target local to the instance's Availability Zone, you
  272. // eliminate a partial failure scenario. If the Availability Zone in which your
  273. // mount target is created goes down, then you won't be able to access your
  274. // file system through that mount target.
  275. //
  276. // This operation requires permissions for the following action on the file
  277. // system:
  278. //
  279. // * elasticfilesystem:CreateMountTarget
  280. //
  281. // This operation also requires permissions for the following Amazon EC2 actions:
  282. //
  283. // * ec2:DescribeSubnets
  284. //
  285. // * ec2:DescribeNetworkInterfaces
  286. //
  287. // * ec2:CreateNetworkInterface
  288. //
  289. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  290. // with awserr.Error's Code and Message methods to get detailed information about
  291. // the error.
  292. //
  293. // See the AWS API reference guide for Amazon Elastic File System's
  294. // API operation CreateMountTarget for usage and error information.
  295. //
  296. // Returned Error Codes:
  297. // * ErrCodeBadRequest "BadRequest"
  298. // Returned if the request is malformed or contains an error such as an invalid
  299. // parameter value or a missing required parameter.
  300. //
  301. // * ErrCodeInternalServerError "InternalServerError"
  302. // Returned if an error occurred on the server side.
  303. //
  304. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  305. // Returned if the specified FileSystemId value doesn't exist in the requester's
  306. // AWS account.
  307. //
  308. // * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState"
  309. // Returned if the file system's lifecycle state is not "available".
  310. //
  311. // * ErrCodeMountTargetConflict "MountTargetConflict"
  312. // Returned if the mount target would violate one of the specified restrictions
  313. // based on the file system's existing mount targets.
  314. //
  315. // * ErrCodeSubnetNotFound "SubnetNotFound"
  316. // Returned if there is no subnet with ID SubnetId provided in the request.
  317. //
  318. // * ErrCodeNoFreeAddressesInSubnet "NoFreeAddressesInSubnet"
  319. // Returned if IpAddress was not specified in the request and there are no free
  320. // IP addresses in the subnet.
  321. //
  322. // * ErrCodeIpAddressInUse "IpAddressInUse"
  323. // Returned if the request specified an IpAddress that is already in use in
  324. // the subnet.
  325. //
  326. // * ErrCodeNetworkInterfaceLimitExceeded "NetworkInterfaceLimitExceeded"
  327. // The calling account has reached the limit for elastic network interfaces
  328. // for the specific AWS Region. The client should try to delete some elastic
  329. // network interfaces or get the account limit raised. For more information,
  330. // see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html)
  331. // in the Amazon VPC User Guide (see the Network interfaces per VPC entry in
  332. // the table).
  333. //
  334. // * ErrCodeSecurityGroupLimitExceeded "SecurityGroupLimitExceeded"
  335. // Returned if the size of SecurityGroups specified in the request is greater
  336. // than five.
  337. //
  338. // * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound"
  339. // Returned if one of the specified security groups doesn't exist in the subnet's
  340. // VPC.
  341. //
  342. // * ErrCodeUnsupportedAvailabilityZone "UnsupportedAvailabilityZone"
  343. //
  344. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget
  345. func (c *EFS) CreateMountTarget(input *CreateMountTargetInput) (*MountTargetDescription, error) {
  346. req, out := c.CreateMountTargetRequest(input)
  347. return out, req.Send()
  348. }
  349. // CreateMountTargetWithContext is the same as CreateMountTarget with the addition of
  350. // the ability to pass a context and additional request options.
  351. //
  352. // See CreateMountTarget for details on how to use this API operation.
  353. //
  354. // The context must be non-nil and will be used for request cancellation. If
  355. // the context is nil a panic will occur. In the future the SDK may create
  356. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  357. // for more information on using Contexts.
  358. func (c *EFS) CreateMountTargetWithContext(ctx aws.Context, input *CreateMountTargetInput, opts ...request.Option) (*MountTargetDescription, error) {
  359. req, out := c.CreateMountTargetRequest(input)
  360. req.SetContext(ctx)
  361. req.ApplyOptions(opts...)
  362. return out, req.Send()
  363. }
  364. const opCreateTags = "CreateTags"
  365. // CreateTagsRequest generates a "aws/request.Request" representing the
  366. // client's request for the CreateTags operation. The "output" return
  367. // value will be populated with the request's response once the request completes
  368. // successfully.
  369. //
  370. // Use "Send" method on the returned Request to send the API call to the service.
  371. // the "output" return value is not valid until after Send returns without error.
  372. //
  373. // See CreateTags for more information on using the CreateTags
  374. // API call, and error handling.
  375. //
  376. // This method is useful when you want to inject custom logic or configuration
  377. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  378. //
  379. //
  380. // // Example sending a request using the CreateTagsRequest method.
  381. // req, resp := client.CreateTagsRequest(params)
  382. //
  383. // err := req.Send()
  384. // if err == nil { // resp is now filled
  385. // fmt.Println(resp)
  386. // }
  387. //
  388. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags
  389. func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
  390. op := &request.Operation{
  391. Name: opCreateTags,
  392. HTTPMethod: "POST",
  393. HTTPPath: "/2015-02-01/create-tags/{FileSystemId}",
  394. }
  395. if input == nil {
  396. input = &CreateTagsInput{}
  397. }
  398. output = &CreateTagsOutput{}
  399. req = c.newRequest(op, input, output)
  400. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  401. return
  402. }
  403. // CreateTags API operation for Amazon Elastic File System.
  404. //
  405. // Creates or overwrites tags associated with a file system. Each tag is a key-value
  406. // pair. If a tag key specified in the request already exists on the file system,
  407. // this operation overwrites its value with the value provided in the request.
  408. // If you add the Name tag to your file system, Amazon EFS returns it in the
  409. // response to the DescribeFileSystems operation.
  410. //
  411. // This operation requires permission for the elasticfilesystem:CreateTags action.
  412. //
  413. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  414. // with awserr.Error's Code and Message methods to get detailed information about
  415. // the error.
  416. //
  417. // See the AWS API reference guide for Amazon Elastic File System's
  418. // API operation CreateTags for usage and error information.
  419. //
  420. // Returned Error Codes:
  421. // * ErrCodeBadRequest "BadRequest"
  422. // Returned if the request is malformed or contains an error such as an invalid
  423. // parameter value or a missing required parameter.
  424. //
  425. // * ErrCodeInternalServerError "InternalServerError"
  426. // Returned if an error occurred on the server side.
  427. //
  428. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  429. // Returned if the specified FileSystemId value doesn't exist in the requester's
  430. // AWS account.
  431. //
  432. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags
  433. func (c *EFS) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
  434. req, out := c.CreateTagsRequest(input)
  435. return out, req.Send()
  436. }
  437. // CreateTagsWithContext is the same as CreateTags with the addition of
  438. // the ability to pass a context and additional request options.
  439. //
  440. // See CreateTags for details on how to use this API operation.
  441. //
  442. // The context must be non-nil and will be used for request cancellation. If
  443. // the context is nil a panic will occur. In the future the SDK may create
  444. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  445. // for more information on using Contexts.
  446. func (c *EFS) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) {
  447. req, out := c.CreateTagsRequest(input)
  448. req.SetContext(ctx)
  449. req.ApplyOptions(opts...)
  450. return out, req.Send()
  451. }
  452. const opDeleteFileSystem = "DeleteFileSystem"
  453. // DeleteFileSystemRequest generates a "aws/request.Request" representing the
  454. // client's request for the DeleteFileSystem operation. The "output" return
  455. // value will be populated with the request's response once the request completes
  456. // successfully.
  457. //
  458. // Use "Send" method on the returned Request to send the API call to the service.
  459. // the "output" return value is not valid until after Send returns without error.
  460. //
  461. // See DeleteFileSystem for more information on using the DeleteFileSystem
  462. // API call, and error handling.
  463. //
  464. // This method is useful when you want to inject custom logic or configuration
  465. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  466. //
  467. //
  468. // // Example sending a request using the DeleteFileSystemRequest method.
  469. // req, resp := client.DeleteFileSystemRequest(params)
  470. //
  471. // err := req.Send()
  472. // if err == nil { // resp is now filled
  473. // fmt.Println(resp)
  474. // }
  475. //
  476. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem
  477. func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) {
  478. op := &request.Operation{
  479. Name: opDeleteFileSystem,
  480. HTTPMethod: "DELETE",
  481. HTTPPath: "/2015-02-01/file-systems/{FileSystemId}",
  482. }
  483. if input == nil {
  484. input = &DeleteFileSystemInput{}
  485. }
  486. output = &DeleteFileSystemOutput{}
  487. req = c.newRequest(op, input, output)
  488. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  489. return
  490. }
  491. // DeleteFileSystem API operation for Amazon Elastic File System.
  492. //
  493. // Deletes a file system, permanently severing access to its contents. Upon
  494. // return, the file system no longer exists and you can't access any contents
  495. // of the deleted file system.
  496. //
  497. // You can't delete a file system that is in use. That is, if the file system
  498. // has any mount targets, you must first delete them. For more information,
  499. // see DescribeMountTargets and DeleteMountTarget.
  500. //
  501. // The DeleteFileSystem call returns while the file system state is still deleting.
  502. // You can check the file system deletion status by calling the DescribeFileSystems
  503. // operation, which returns a list of file systems in your account. If you pass
  504. // file system ID or creation token for the deleted file system, the DescribeFileSystems
  505. // returns a 404 FileSystemNotFound error.
  506. //
  507. // This operation requires permissions for the elasticfilesystem:DeleteFileSystem
  508. // action.
  509. //
  510. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  511. // with awserr.Error's Code and Message methods to get detailed information about
  512. // the error.
  513. //
  514. // See the AWS API reference guide for Amazon Elastic File System's
  515. // API operation DeleteFileSystem for usage and error information.
  516. //
  517. // Returned Error Codes:
  518. // * ErrCodeBadRequest "BadRequest"
  519. // Returned if the request is malformed or contains an error such as an invalid
  520. // parameter value or a missing required parameter.
  521. //
  522. // * ErrCodeInternalServerError "InternalServerError"
  523. // Returned if an error occurred on the server side.
  524. //
  525. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  526. // Returned if the specified FileSystemId value doesn't exist in the requester's
  527. // AWS account.
  528. //
  529. // * ErrCodeFileSystemInUse "FileSystemInUse"
  530. // Returned if a file system has mount targets.
  531. //
  532. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem
  533. func (c *EFS) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) {
  534. req, out := c.DeleteFileSystemRequest(input)
  535. return out, req.Send()
  536. }
  537. // DeleteFileSystemWithContext is the same as DeleteFileSystem with the addition of
  538. // the ability to pass a context and additional request options.
  539. //
  540. // See DeleteFileSystem for details on how to use this API operation.
  541. //
  542. // The context must be non-nil and will be used for request cancellation. If
  543. // the context is nil a panic will occur. In the future the SDK may create
  544. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  545. // for more information on using Contexts.
  546. func (c *EFS) DeleteFileSystemWithContext(ctx aws.Context, input *DeleteFileSystemInput, opts ...request.Option) (*DeleteFileSystemOutput, error) {
  547. req, out := c.DeleteFileSystemRequest(input)
  548. req.SetContext(ctx)
  549. req.ApplyOptions(opts...)
  550. return out, req.Send()
  551. }
  552. const opDeleteMountTarget = "DeleteMountTarget"
  553. // DeleteMountTargetRequest generates a "aws/request.Request" representing the
  554. // client's request for the DeleteMountTarget operation. The "output" return
  555. // value will be populated with the request's response once the request completes
  556. // successfully.
  557. //
  558. // Use "Send" method on the returned Request to send the API call to the service.
  559. // the "output" return value is not valid until after Send returns without error.
  560. //
  561. // See DeleteMountTarget for more information on using the DeleteMountTarget
  562. // API call, and error handling.
  563. //
  564. // This method is useful when you want to inject custom logic or configuration
  565. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  566. //
  567. //
  568. // // Example sending a request using the DeleteMountTargetRequest method.
  569. // req, resp := client.DeleteMountTargetRequest(params)
  570. //
  571. // err := req.Send()
  572. // if err == nil { // resp is now filled
  573. // fmt.Println(resp)
  574. // }
  575. //
  576. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget
  577. func (c *EFS) DeleteMountTargetRequest(input *DeleteMountTargetInput) (req *request.Request, output *DeleteMountTargetOutput) {
  578. op := &request.Operation{
  579. Name: opDeleteMountTarget,
  580. HTTPMethod: "DELETE",
  581. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}",
  582. }
  583. if input == nil {
  584. input = &DeleteMountTargetInput{}
  585. }
  586. output = &DeleteMountTargetOutput{}
  587. req = c.newRequest(op, input, output)
  588. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  589. return
  590. }
  591. // DeleteMountTarget API operation for Amazon Elastic File System.
  592. //
  593. // Deletes the specified mount target.
  594. //
  595. // This operation forcibly breaks any mounts of the file system via the mount
  596. // target that is being deleted, which might disrupt instances or applications
  597. // using those mounts. To avoid applications getting cut off abruptly, you might
  598. // consider unmounting any mounts of the mount target, if feasible. The operation
  599. // also deletes the associated network interface. Uncommitted writes may be
  600. // lost, but breaking a mount target using this operation does not corrupt the
  601. // file system itself. The file system you created remains. You can mount an
  602. // EC2 instance in your VPC via another mount target.
  603. //
  604. // This operation requires permissions for the following action on the file
  605. // system:
  606. //
  607. // * elasticfilesystem:DeleteMountTarget
  608. //
  609. // The DeleteMountTarget call returns while the mount target state is still
  610. // deleting. You can check the mount target deletion by calling the DescribeMountTargets
  611. // operation, which returns a list of mount target descriptions for the given
  612. // file system.
  613. //
  614. // The operation also requires permissions for the following Amazon EC2 action
  615. // on the mount target's network interface:
  616. //
  617. // * ec2:DeleteNetworkInterface
  618. //
  619. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  620. // with awserr.Error's Code and Message methods to get detailed information about
  621. // the error.
  622. //
  623. // See the AWS API reference guide for Amazon Elastic File System's
  624. // API operation DeleteMountTarget for usage and error information.
  625. //
  626. // Returned Error Codes:
  627. // * ErrCodeBadRequest "BadRequest"
  628. // Returned if the request is malformed or contains an error such as an invalid
  629. // parameter value or a missing required parameter.
  630. //
  631. // * ErrCodeInternalServerError "InternalServerError"
  632. // Returned if an error occurred on the server side.
  633. //
  634. // * ErrCodeDependencyTimeout "DependencyTimeout"
  635. // The service timed out trying to fulfill the request, and the client should
  636. // try the call again.
  637. //
  638. // * ErrCodeMountTargetNotFound "MountTargetNotFound"
  639. // Returned if there is no mount target with the specified ID found in the caller's
  640. // account.
  641. //
  642. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget
  643. func (c *EFS) DeleteMountTarget(input *DeleteMountTargetInput) (*DeleteMountTargetOutput, error) {
  644. req, out := c.DeleteMountTargetRequest(input)
  645. return out, req.Send()
  646. }
  647. // DeleteMountTargetWithContext is the same as DeleteMountTarget with the addition of
  648. // the ability to pass a context and additional request options.
  649. //
  650. // See DeleteMountTarget for details on how to use this API operation.
  651. //
  652. // The context must be non-nil and will be used for request cancellation. If
  653. // the context is nil a panic will occur. In the future the SDK may create
  654. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  655. // for more information on using Contexts.
  656. func (c *EFS) DeleteMountTargetWithContext(ctx aws.Context, input *DeleteMountTargetInput, opts ...request.Option) (*DeleteMountTargetOutput, error) {
  657. req, out := c.DeleteMountTargetRequest(input)
  658. req.SetContext(ctx)
  659. req.ApplyOptions(opts...)
  660. return out, req.Send()
  661. }
  662. const opDeleteTags = "DeleteTags"
  663. // DeleteTagsRequest generates a "aws/request.Request" representing the
  664. // client's request for the DeleteTags operation. The "output" return
  665. // value will be populated with the request's response once the request completes
  666. // successfully.
  667. //
  668. // Use "Send" method on the returned Request to send the API call to the service.
  669. // the "output" return value is not valid until after Send returns without error.
  670. //
  671. // See DeleteTags for more information on using the DeleteTags
  672. // API call, and error handling.
  673. //
  674. // This method is useful when you want to inject custom logic or configuration
  675. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  676. //
  677. //
  678. // // Example sending a request using the DeleteTagsRequest method.
  679. // req, resp := client.DeleteTagsRequest(params)
  680. //
  681. // err := req.Send()
  682. // if err == nil { // resp is now filled
  683. // fmt.Println(resp)
  684. // }
  685. //
  686. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags
  687. func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  688. op := &request.Operation{
  689. Name: opDeleteTags,
  690. HTTPMethod: "POST",
  691. HTTPPath: "/2015-02-01/delete-tags/{FileSystemId}",
  692. }
  693. if input == nil {
  694. input = &DeleteTagsInput{}
  695. }
  696. output = &DeleteTagsOutput{}
  697. req = c.newRequest(op, input, output)
  698. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  699. return
  700. }
  701. // DeleteTags API operation for Amazon Elastic File System.
  702. //
  703. // Deletes the specified tags from a file system. If the DeleteTags request
  704. // includes a tag key that does not exist, Amazon EFS ignores it and doesn't
  705. // cause an error. For more information about tags and related restrictions,
  706. // see Tag Restrictions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
  707. // in the AWS Billing and Cost Management User Guide.
  708. //
  709. // This operation requires permissions for the elasticfilesystem:DeleteTags
  710. // action.
  711. //
  712. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  713. // with awserr.Error's Code and Message methods to get detailed information about
  714. // the error.
  715. //
  716. // See the AWS API reference guide for Amazon Elastic File System's
  717. // API operation DeleteTags for usage and error information.
  718. //
  719. // Returned Error Codes:
  720. // * ErrCodeBadRequest "BadRequest"
  721. // Returned if the request is malformed or contains an error such as an invalid
  722. // parameter value or a missing required parameter.
  723. //
  724. // * ErrCodeInternalServerError "InternalServerError"
  725. // Returned if an error occurred on the server side.
  726. //
  727. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  728. // Returned if the specified FileSystemId value doesn't exist in the requester's
  729. // AWS account.
  730. //
  731. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags
  732. func (c *EFS) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  733. req, out := c.DeleteTagsRequest(input)
  734. return out, req.Send()
  735. }
  736. // DeleteTagsWithContext is the same as DeleteTags with the addition of
  737. // the ability to pass a context and additional request options.
  738. //
  739. // See DeleteTags for details on how to use this API operation.
  740. //
  741. // The context must be non-nil and will be used for request cancellation. If
  742. // the context is nil a panic will occur. In the future the SDK may create
  743. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  744. // for more information on using Contexts.
  745. func (c *EFS) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
  746. req, out := c.DeleteTagsRequest(input)
  747. req.SetContext(ctx)
  748. req.ApplyOptions(opts...)
  749. return out, req.Send()
  750. }
  751. const opDescribeFileSystems = "DescribeFileSystems"
  752. // DescribeFileSystemsRequest generates a "aws/request.Request" representing the
  753. // client's request for the DescribeFileSystems operation. The "output" return
  754. // value will be populated with the request's response once the request completes
  755. // successfully.
  756. //
  757. // Use "Send" method on the returned Request to send the API call to the service.
  758. // the "output" return value is not valid until after Send returns without error.
  759. //
  760. // See DescribeFileSystems for more information on using the DescribeFileSystems
  761. // API call, and error handling.
  762. //
  763. // This method is useful when you want to inject custom logic or configuration
  764. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  765. //
  766. //
  767. // // Example sending a request using the DescribeFileSystemsRequest method.
  768. // req, resp := client.DescribeFileSystemsRequest(params)
  769. //
  770. // err := req.Send()
  771. // if err == nil { // resp is now filled
  772. // fmt.Println(resp)
  773. // }
  774. //
  775. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems
  776. func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) {
  777. op := &request.Operation{
  778. Name: opDescribeFileSystems,
  779. HTTPMethod: "GET",
  780. HTTPPath: "/2015-02-01/file-systems",
  781. }
  782. if input == nil {
  783. input = &DescribeFileSystemsInput{}
  784. }
  785. output = &DescribeFileSystemsOutput{}
  786. req = c.newRequest(op, input, output)
  787. return
  788. }
  789. // DescribeFileSystems API operation for Amazon Elastic File System.
  790. //
  791. // Returns the description of a specific Amazon EFS file system if either the
  792. // file system CreationToken or the FileSystemId is provided. Otherwise, it
  793. // returns descriptions of all file systems owned by the caller's AWS account
  794. // in the AWS Region of the endpoint that you're calling.
  795. //
  796. // When retrieving all file system descriptions, you can optionally specify
  797. // the MaxItems parameter to limit the number of descriptions in a response.
  798. // If more file system descriptions remain, Amazon EFS returns a NextMarker,
  799. // an opaque token, in the response. In this case, you should send a subsequent
  800. // request with the Marker request parameter set to the value of NextMarker.
  801. //
  802. // To retrieve a list of your file system descriptions, this operation is used
  803. // in an iterative process, where DescribeFileSystems is called first without
  804. // the Marker and then the operation continues to call it with the Marker parameter
  805. // set to the value of the NextMarker from the previous response until the response
  806. // has no NextMarker.
  807. //
  808. // The implementation may return fewer than MaxItems file system descriptions
  809. // while still including a NextMarker value.
  810. //
  811. // The order of file systems returned in the response of one DescribeFileSystems
  812. // call and the order of file systems returned across the responses of a multi-call
  813. // iteration is unspecified.
  814. //
  815. // This operation requires permissions for the elasticfilesystem:DescribeFileSystems
  816. // action.
  817. //
  818. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  819. // with awserr.Error's Code and Message methods to get detailed information about
  820. // the error.
  821. //
  822. // See the AWS API reference guide for Amazon Elastic File System's
  823. // API operation DescribeFileSystems for usage and error information.
  824. //
  825. // Returned Error Codes:
  826. // * ErrCodeBadRequest "BadRequest"
  827. // Returned if the request is malformed or contains an error such as an invalid
  828. // parameter value or a missing required parameter.
  829. //
  830. // * ErrCodeInternalServerError "InternalServerError"
  831. // Returned if an error occurred on the server side.
  832. //
  833. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  834. // Returned if the specified FileSystemId value doesn't exist in the requester's
  835. // AWS account.
  836. //
  837. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems
  838. func (c *EFS) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) {
  839. req, out := c.DescribeFileSystemsRequest(input)
  840. return out, req.Send()
  841. }
  842. // DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of
  843. // the ability to pass a context and additional request options.
  844. //
  845. // See DescribeFileSystems for details on how to use this API operation.
  846. //
  847. // The context must be non-nil and will be used for request cancellation. If
  848. // the context is nil a panic will occur. In the future the SDK may create
  849. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  850. // for more information on using Contexts.
  851. func (c *EFS) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) {
  852. req, out := c.DescribeFileSystemsRequest(input)
  853. req.SetContext(ctx)
  854. req.ApplyOptions(opts...)
  855. return out, req.Send()
  856. }
  857. const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups"
  858. // DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the
  859. // client's request for the DescribeMountTargetSecurityGroups operation. The "output" return
  860. // value will be populated with the request's response once the request completes
  861. // successfully.
  862. //
  863. // Use "Send" method on the returned Request to send the API call to the service.
  864. // the "output" return value is not valid until after Send returns without error.
  865. //
  866. // See DescribeMountTargetSecurityGroups for more information on using the DescribeMountTargetSecurityGroups
  867. // API call, and error handling.
  868. //
  869. // This method is useful when you want to inject custom logic or configuration
  870. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  871. //
  872. //
  873. // // Example sending a request using the DescribeMountTargetSecurityGroupsRequest method.
  874. // req, resp := client.DescribeMountTargetSecurityGroupsRequest(params)
  875. //
  876. // err := req.Send()
  877. // if err == nil { // resp is now filled
  878. // fmt.Println(resp)
  879. // }
  880. //
  881. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups
  882. func (c *EFS) DescribeMountTargetSecurityGroupsRequest(input *DescribeMountTargetSecurityGroupsInput) (req *request.Request, output *DescribeMountTargetSecurityGroupsOutput) {
  883. op := &request.Operation{
  884. Name: opDescribeMountTargetSecurityGroups,
  885. HTTPMethod: "GET",
  886. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
  887. }
  888. if input == nil {
  889. input = &DescribeMountTargetSecurityGroupsInput{}
  890. }
  891. output = &DescribeMountTargetSecurityGroupsOutput{}
  892. req = c.newRequest(op, input, output)
  893. return
  894. }
  895. // DescribeMountTargetSecurityGroups API operation for Amazon Elastic File System.
  896. //
  897. // Returns the security groups currently in effect for a mount target. This
  898. // operation requires that the network interface of the mount target has been
  899. // created and the lifecycle state of the mount target is not deleted.
  900. //
  901. // This operation requires permissions for the following actions:
  902. //
  903. // * elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount
  904. // target's file system.
  905. //
  906. // * ec2:DescribeNetworkInterfaceAttribute action on the mount target's network
  907. // interface.
  908. //
  909. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  910. // with awserr.Error's Code and Message methods to get detailed information about
  911. // the error.
  912. //
  913. // See the AWS API reference guide for Amazon Elastic File System's
  914. // API operation DescribeMountTargetSecurityGroups for usage and error information.
  915. //
  916. // Returned Error Codes:
  917. // * ErrCodeBadRequest "BadRequest"
  918. // Returned if the request is malformed or contains an error such as an invalid
  919. // parameter value or a missing required parameter.
  920. //
  921. // * ErrCodeInternalServerError "InternalServerError"
  922. // Returned if an error occurred on the server side.
  923. //
  924. // * ErrCodeMountTargetNotFound "MountTargetNotFound"
  925. // Returned if there is no mount target with the specified ID found in the caller's
  926. // account.
  927. //
  928. // * ErrCodeIncorrectMountTargetState "IncorrectMountTargetState"
  929. // Returned if the mount target is not in the correct state for the operation.
  930. //
  931. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups
  932. func (c *EFS) DescribeMountTargetSecurityGroups(input *DescribeMountTargetSecurityGroupsInput) (*DescribeMountTargetSecurityGroupsOutput, error) {
  933. req, out := c.DescribeMountTargetSecurityGroupsRequest(input)
  934. return out, req.Send()
  935. }
  936. // DescribeMountTargetSecurityGroupsWithContext is the same as DescribeMountTargetSecurityGroups with the addition of
  937. // the ability to pass a context and additional request options.
  938. //
  939. // See DescribeMountTargetSecurityGroups for details on how to use this API operation.
  940. //
  941. // The context must be non-nil and will be used for request cancellation. If
  942. // the context is nil a panic will occur. In the future the SDK may create
  943. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  944. // for more information on using Contexts.
  945. func (c *EFS) DescribeMountTargetSecurityGroupsWithContext(ctx aws.Context, input *DescribeMountTargetSecurityGroupsInput, opts ...request.Option) (*DescribeMountTargetSecurityGroupsOutput, error) {
  946. req, out := c.DescribeMountTargetSecurityGroupsRequest(input)
  947. req.SetContext(ctx)
  948. req.ApplyOptions(opts...)
  949. return out, req.Send()
  950. }
  951. const opDescribeMountTargets = "DescribeMountTargets"
  952. // DescribeMountTargetsRequest generates a "aws/request.Request" representing the
  953. // client's request for the DescribeMountTargets operation. The "output" return
  954. // value will be populated with the request's response once the request completes
  955. // successfully.
  956. //
  957. // Use "Send" method on the returned Request to send the API call to the service.
  958. // the "output" return value is not valid until after Send returns without error.
  959. //
  960. // See DescribeMountTargets for more information on using the DescribeMountTargets
  961. // API call, and error handling.
  962. //
  963. // This method is useful when you want to inject custom logic or configuration
  964. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  965. //
  966. //
  967. // // Example sending a request using the DescribeMountTargetsRequest method.
  968. // req, resp := client.DescribeMountTargetsRequest(params)
  969. //
  970. // err := req.Send()
  971. // if err == nil { // resp is now filled
  972. // fmt.Println(resp)
  973. // }
  974. //
  975. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets
  976. func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req *request.Request, output *DescribeMountTargetsOutput) {
  977. op := &request.Operation{
  978. Name: opDescribeMountTargets,
  979. HTTPMethod: "GET",
  980. HTTPPath: "/2015-02-01/mount-targets",
  981. }
  982. if input == nil {
  983. input = &DescribeMountTargetsInput{}
  984. }
  985. output = &DescribeMountTargetsOutput{}
  986. req = c.newRequest(op, input, output)
  987. return
  988. }
  989. // DescribeMountTargets API operation for Amazon Elastic File System.
  990. //
  991. // Returns the descriptions of all the current mount targets, or a specific
  992. // mount target, for a file system. When requesting all of the current mount
  993. // targets, the order of mount targets returned in the response is unspecified.
  994. //
  995. // This operation requires permissions for the elasticfilesystem:DescribeMountTargets
  996. // action, on either the file system ID that you specify in FileSystemId, or
  997. // on the file system of the mount target that you specify in MountTargetId.
  998. //
  999. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1000. // with awserr.Error's Code and Message methods to get detailed information about
  1001. // the error.
  1002. //
  1003. // See the AWS API reference guide for Amazon Elastic File System's
  1004. // API operation DescribeMountTargets for usage and error information.
  1005. //
  1006. // Returned Error Codes:
  1007. // * ErrCodeBadRequest "BadRequest"
  1008. // Returned if the request is malformed or contains an error such as an invalid
  1009. // parameter value or a missing required parameter.
  1010. //
  1011. // * ErrCodeInternalServerError "InternalServerError"
  1012. // Returned if an error occurred on the server side.
  1013. //
  1014. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  1015. // Returned if the specified FileSystemId value doesn't exist in the requester's
  1016. // AWS account.
  1017. //
  1018. // * ErrCodeMountTargetNotFound "MountTargetNotFound"
  1019. // Returned if there is no mount target with the specified ID found in the caller's
  1020. // account.
  1021. //
  1022. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets
  1023. func (c *EFS) DescribeMountTargets(input *DescribeMountTargetsInput) (*DescribeMountTargetsOutput, error) {
  1024. req, out := c.DescribeMountTargetsRequest(input)
  1025. return out, req.Send()
  1026. }
  1027. // DescribeMountTargetsWithContext is the same as DescribeMountTargets with the addition of
  1028. // the ability to pass a context and additional request options.
  1029. //
  1030. // See DescribeMountTargets for details on how to use this API operation.
  1031. //
  1032. // The context must be non-nil and will be used for request cancellation. If
  1033. // the context is nil a panic will occur. In the future the SDK may create
  1034. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1035. // for more information on using Contexts.
  1036. func (c *EFS) DescribeMountTargetsWithContext(ctx aws.Context, input *DescribeMountTargetsInput, opts ...request.Option) (*DescribeMountTargetsOutput, error) {
  1037. req, out := c.DescribeMountTargetsRequest(input)
  1038. req.SetContext(ctx)
  1039. req.ApplyOptions(opts...)
  1040. return out, req.Send()
  1041. }
  1042. const opDescribeTags = "DescribeTags"
  1043. // DescribeTagsRequest generates a "aws/request.Request" representing the
  1044. // client's request for the DescribeTags operation. The "output" return
  1045. // value will be populated with the request's response once the request completes
  1046. // successfully.
  1047. //
  1048. // Use "Send" method on the returned Request to send the API call to the service.
  1049. // the "output" return value is not valid until after Send returns without error.
  1050. //
  1051. // See DescribeTags for more information on using the DescribeTags
  1052. // API call, and error handling.
  1053. //
  1054. // This method is useful when you want to inject custom logic or configuration
  1055. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1056. //
  1057. //
  1058. // // Example sending a request using the DescribeTagsRequest method.
  1059. // req, resp := client.DescribeTagsRequest(params)
  1060. //
  1061. // err := req.Send()
  1062. // if err == nil { // resp is now filled
  1063. // fmt.Println(resp)
  1064. // }
  1065. //
  1066. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags
  1067. func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  1068. op := &request.Operation{
  1069. Name: opDescribeTags,
  1070. HTTPMethod: "GET",
  1071. HTTPPath: "/2015-02-01/tags/{FileSystemId}/",
  1072. }
  1073. if input == nil {
  1074. input = &DescribeTagsInput{}
  1075. }
  1076. output = &DescribeTagsOutput{}
  1077. req = c.newRequest(op, input, output)
  1078. return
  1079. }
  1080. // DescribeTags API operation for Amazon Elastic File System.
  1081. //
  1082. // Returns the tags associated with a file system. The order of tags returned
  1083. // in the response of one DescribeTags call and the order of tags returned across
  1084. // the responses of a multi-call iteration (when using pagination) is unspecified.
  1085. //
  1086. // This operation requires permissions for the elasticfilesystem:DescribeTags
  1087. // action.
  1088. //
  1089. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1090. // with awserr.Error's Code and Message methods to get detailed information about
  1091. // the error.
  1092. //
  1093. // See the AWS API reference guide for Amazon Elastic File System's
  1094. // API operation DescribeTags for usage and error information.
  1095. //
  1096. // Returned Error Codes:
  1097. // * ErrCodeBadRequest "BadRequest"
  1098. // Returned if the request is malformed or contains an error such as an invalid
  1099. // parameter value or a missing required parameter.
  1100. //
  1101. // * ErrCodeInternalServerError "InternalServerError"
  1102. // Returned if an error occurred on the server side.
  1103. //
  1104. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  1105. // Returned if the specified FileSystemId value doesn't exist in the requester's
  1106. // AWS account.
  1107. //
  1108. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags
  1109. func (c *EFS) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  1110. req, out := c.DescribeTagsRequest(input)
  1111. return out, req.Send()
  1112. }
  1113. // DescribeTagsWithContext is the same as DescribeTags with the addition of
  1114. // the ability to pass a context and additional request options.
  1115. //
  1116. // See DescribeTags for details on how to use this API operation.
  1117. //
  1118. // The context must be non-nil and will be used for request cancellation. If
  1119. // the context is nil a panic will occur. In the future the SDK may create
  1120. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1121. // for more information on using Contexts.
  1122. func (c *EFS) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
  1123. req, out := c.DescribeTagsRequest(input)
  1124. req.SetContext(ctx)
  1125. req.ApplyOptions(opts...)
  1126. return out, req.Send()
  1127. }
  1128. const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups"
  1129. // ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the
  1130. // client's request for the ModifyMountTargetSecurityGroups operation. The "output" return
  1131. // value will be populated with the request's response once the request completes
  1132. // successfully.
  1133. //
  1134. // Use "Send" method on the returned Request to send the API call to the service.
  1135. // the "output" return value is not valid until after Send returns without error.
  1136. //
  1137. // See ModifyMountTargetSecurityGroups for more information on using the ModifyMountTargetSecurityGroups
  1138. // API call, and error handling.
  1139. //
  1140. // This method is useful when you want to inject custom logic or configuration
  1141. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1142. //
  1143. //
  1144. // // Example sending a request using the ModifyMountTargetSecurityGroupsRequest method.
  1145. // req, resp := client.ModifyMountTargetSecurityGroupsRequest(params)
  1146. //
  1147. // err := req.Send()
  1148. // if err == nil { // resp is now filled
  1149. // fmt.Println(resp)
  1150. // }
  1151. //
  1152. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups
  1153. func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSecurityGroupsInput) (req *request.Request, output *ModifyMountTargetSecurityGroupsOutput) {
  1154. op := &request.Operation{
  1155. Name: opModifyMountTargetSecurityGroups,
  1156. HTTPMethod: "PUT",
  1157. HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
  1158. }
  1159. if input == nil {
  1160. input = &ModifyMountTargetSecurityGroupsInput{}
  1161. }
  1162. output = &ModifyMountTargetSecurityGroupsOutput{}
  1163. req = c.newRequest(op, input, output)
  1164. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1165. return
  1166. }
  1167. // ModifyMountTargetSecurityGroups API operation for Amazon Elastic File System.
  1168. //
  1169. // Modifies the set of security groups in effect for a mount target.
  1170. //
  1171. // When you create a mount target, Amazon EFS also creates a new network interface.
  1172. // For more information, see CreateMountTarget. This operation replaces the
  1173. // security groups in effect for the network interface associated with a mount
  1174. // target, with the SecurityGroups provided in the request. This operation requires
  1175. // that the network interface of the mount target has been created and the lifecycle
  1176. // state of the mount target is not deleted.
  1177. //
  1178. // The operation requires permissions for the following actions:
  1179. //
  1180. // * elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount
  1181. // target's file system.
  1182. //
  1183. // * ec2:ModifyNetworkInterfaceAttribute action on the mount target's network
  1184. // interface.
  1185. //
  1186. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1187. // with awserr.Error's Code and Message methods to get detailed information about
  1188. // the error.
  1189. //
  1190. // See the AWS API reference guide for Amazon Elastic File System's
  1191. // API operation ModifyMountTargetSecurityGroups for usage and error information.
  1192. //
  1193. // Returned Error Codes:
  1194. // * ErrCodeBadRequest "BadRequest"
  1195. // Returned if the request is malformed or contains an error such as an invalid
  1196. // parameter value or a missing required parameter.
  1197. //
  1198. // * ErrCodeInternalServerError "InternalServerError"
  1199. // Returned if an error occurred on the server side.
  1200. //
  1201. // * ErrCodeMountTargetNotFound "MountTargetNotFound"
  1202. // Returned if there is no mount target with the specified ID found in the caller's
  1203. // account.
  1204. //
  1205. // * ErrCodeIncorrectMountTargetState "IncorrectMountTargetState"
  1206. // Returned if the mount target is not in the correct state for the operation.
  1207. //
  1208. // * ErrCodeSecurityGroupLimitExceeded "SecurityGroupLimitExceeded"
  1209. // Returned if the size of SecurityGroups specified in the request is greater
  1210. // than five.
  1211. //
  1212. // * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound"
  1213. // Returned if one of the specified security groups doesn't exist in the subnet's
  1214. // VPC.
  1215. //
  1216. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups
  1217. func (c *EFS) ModifyMountTargetSecurityGroups(input *ModifyMountTargetSecurityGroupsInput) (*ModifyMountTargetSecurityGroupsOutput, error) {
  1218. req, out := c.ModifyMountTargetSecurityGroupsRequest(input)
  1219. return out, req.Send()
  1220. }
  1221. // ModifyMountTargetSecurityGroupsWithContext is the same as ModifyMountTargetSecurityGroups with the addition of
  1222. // the ability to pass a context and additional request options.
  1223. //
  1224. // See ModifyMountTargetSecurityGroups for details on how to use this API operation.
  1225. //
  1226. // The context must be non-nil and will be used for request cancellation. If
  1227. // the context is nil a panic will occur. In the future the SDK may create
  1228. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1229. // for more information on using Contexts.
  1230. func (c *EFS) ModifyMountTargetSecurityGroupsWithContext(ctx aws.Context, input *ModifyMountTargetSecurityGroupsInput, opts ...request.Option) (*ModifyMountTargetSecurityGroupsOutput, error) {
  1231. req, out := c.ModifyMountTargetSecurityGroupsRequest(input)
  1232. req.SetContext(ctx)
  1233. req.ApplyOptions(opts...)
  1234. return out, req.Send()
  1235. }
  1236. const opUpdateFileSystem = "UpdateFileSystem"
  1237. // UpdateFileSystemRequest generates a "aws/request.Request" representing the
  1238. // client's request for the UpdateFileSystem operation. The "output" return
  1239. // value will be populated with the request's response once the request completes
  1240. // successfully.
  1241. //
  1242. // Use "Send" method on the returned Request to send the API call to the service.
  1243. // the "output" return value is not valid until after Send returns without error.
  1244. //
  1245. // See UpdateFileSystem for more information on using the UpdateFileSystem
  1246. // API call, and error handling.
  1247. //
  1248. // This method is useful when you want to inject custom logic or configuration
  1249. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1250. //
  1251. //
  1252. // // Example sending a request using the UpdateFileSystemRequest method.
  1253. // req, resp := client.UpdateFileSystemRequest(params)
  1254. //
  1255. // err := req.Send()
  1256. // if err == nil { // resp is now filled
  1257. // fmt.Println(resp)
  1258. // }
  1259. //
  1260. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem
  1261. func (c *EFS) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) {
  1262. op := &request.Operation{
  1263. Name: opUpdateFileSystem,
  1264. HTTPMethod: "PUT",
  1265. HTTPPath: "/2015-02-01/file-systems/{FileSystemId}",
  1266. }
  1267. if input == nil {
  1268. input = &UpdateFileSystemInput{}
  1269. }
  1270. output = &UpdateFileSystemOutput{}
  1271. req = c.newRequest(op, input, output)
  1272. return
  1273. }
  1274. // UpdateFileSystem API operation for Amazon Elastic File System.
  1275. //
  1276. // Updates the throughput mode or the amount of provisioned throughput of an
  1277. // existing file system.
  1278. //
  1279. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1280. // with awserr.Error's Code and Message methods to get detailed information about
  1281. // the error.
  1282. //
  1283. // See the AWS API reference guide for Amazon Elastic File System's
  1284. // API operation UpdateFileSystem for usage and error information.
  1285. //
  1286. // Returned Error Codes:
  1287. // * ErrCodeBadRequest "BadRequest"
  1288. // Returned if the request is malformed or contains an error such as an invalid
  1289. // parameter value or a missing required parameter.
  1290. //
  1291. // * ErrCodeFileSystemNotFound "FileSystemNotFound"
  1292. // Returned if the specified FileSystemId value doesn't exist in the requester's
  1293. // AWS account.
  1294. //
  1295. // * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState"
  1296. // Returned if the file system's lifecycle state is not "available".
  1297. //
  1298. // * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity"
  1299. // Returned if there's not enough capacity to provision additional throughput.
  1300. // This value might be returned when you try to create a file system in provisioned
  1301. // throughput mode, when you attempt to increase the provisioned throughput
  1302. // of an existing file system, or when you attempt to change an existing file
  1303. // system from bursting to provisioned throughput mode.
  1304. //
  1305. // * ErrCodeInternalServerError "InternalServerError"
  1306. // Returned if an error occurred on the server side.
  1307. //
  1308. // * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded"
  1309. // Returned if the throughput mode or amount of provisioned throughput can't
  1310. // be changed because the throughput limit of 1024 MiB/s has been reached.
  1311. //
  1312. // * ErrCodeTooManyRequests "TooManyRequests"
  1313. // Returned if you don’t wait at least 24 hours before changing the throughput
  1314. // mode, or decreasing the Provisioned Throughput value.
  1315. //
  1316. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem
  1317. func (c *EFS) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) {
  1318. req, out := c.UpdateFileSystemRequest(input)
  1319. return out, req.Send()
  1320. }
  1321. // UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of
  1322. // the ability to pass a context and additional request options.
  1323. //
  1324. // See UpdateFileSystem for details on how to use this API operation.
  1325. //
  1326. // The context must be non-nil and will be used for request cancellation. If
  1327. // the context is nil a panic will occur. In the future the SDK may create
  1328. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1329. // for more information on using Contexts.
  1330. func (c *EFS) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) {
  1331. req, out := c.UpdateFileSystemRequest(input)
  1332. req.SetContext(ctx)
  1333. req.ApplyOptions(opts...)
  1334. return out, req.Send()
  1335. }
  1336. type CreateFileSystemInput struct {
  1337. _ struct{} `type:"structure"`
  1338. // String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent
  1339. // creation.
  1340. //
  1341. // CreationToken is a required field
  1342. CreationToken *string `min:"1" type:"string" required:"true"`
  1343. // A Boolean value that, if true, creates an encrypted file system. When creating
  1344. // an encrypted file system, you have the option of specifying a CreateFileSystemRequest$KmsKeyId
  1345. // for an existing AWS Key Management Service (AWS KMS) customer master key
  1346. // (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, /aws/elasticfilesystem,
  1347. // is used to protect the encrypted file system.
  1348. Encrypted *bool `type:"boolean"`
  1349. // The ID of the AWS KMS CMK to be used to protect the encrypted file system.
  1350. // This parameter is only required if you want to use a non-default CMK. If
  1351. // this parameter is not specified, the default CMK for Amazon EFS is used.
  1352. // This ID can be in one of the following formats:
  1353. //
  1354. // * Key ID - A unique identifier of the key, for example, 1234abcd-12ab-34cd-56ef-1234567890ab.
  1355. //
  1356. // * ARN - An Amazon Resource Name (ARN) for the key, for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  1357. //
  1358. // * Key alias - A previously created display name for a key. For example,
  1359. // alias/projectKey1.
  1360. //
  1361. // * Key alias ARN - An ARN for a key alias, for example, arn:aws:kms:us-west-2:444455556666:alias/projectKey1.
  1362. //
  1363. // If KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter
  1364. // must be set to true.
  1365. KmsKeyId *string `min:"1" type:"string"`
  1366. // The PerformanceMode of the file system. We recommend generalPurpose performance
  1367. // mode for most file systems. File systems using the maxIO performance mode
  1368. // can scale to higher levels of aggregate throughput and operations per second
  1369. // with a tradeoff of slightly higher latencies for most file operations. This
  1370. // can't be changed after the file system has been created.
  1371. PerformanceMode *string `type:"string" enum:"PerformanceMode"`
  1372. // The throughput, measured in MiB/s, that you want to provision for a file
  1373. // system that you're creating. The limit on throughput is 1024 MiB/s. You can
  1374. // get these limits increased by contacting AWS Support. For more information,
  1375. // see Amazon EFS Limits That You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits)
  1376. // in the Amazon EFS User Guide.
  1377. ProvisionedThroughputInMibps *float64 `type:"double"`
  1378. // The throughput mode for the file system to be created. There are two throughput
  1379. // modes to choose from for your file system: bursting and provisioned. You
  1380. // can decrease your file system's throughput in Provisioned Throughput mode
  1381. // or change between the throughput modes as long as it’s been more than 24
  1382. // hours since the last decrease or throughput mode change.
  1383. ThroughputMode *string `type:"string" enum:"ThroughputMode"`
  1384. }
  1385. // String returns the string representation
  1386. func (s CreateFileSystemInput) String() string {
  1387. return awsutil.Prettify(s)
  1388. }
  1389. // GoString returns the string representation
  1390. func (s CreateFileSystemInput) GoString() string {
  1391. return s.String()
  1392. }
  1393. // Validate inspects the fields of the type to determine if they are valid.
  1394. func (s *CreateFileSystemInput) Validate() error {
  1395. invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"}
  1396. if s.CreationToken == nil {
  1397. invalidParams.Add(request.NewErrParamRequired("CreationToken"))
  1398. }
  1399. if s.CreationToken != nil && len(*s.CreationToken) < 1 {
  1400. invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1))
  1401. }
  1402. if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 {
  1403. invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1))
  1404. }
  1405. if invalidParams.Len() > 0 {
  1406. return invalidParams
  1407. }
  1408. return nil
  1409. }
  1410. // SetCreationToken sets the CreationToken field's value.
  1411. func (s *CreateFileSystemInput) SetCreationToken(v string) *CreateFileSystemInput {
  1412. s.CreationToken = &v
  1413. return s
  1414. }
  1415. // SetEncrypted sets the Encrypted field's value.
  1416. func (s *CreateFileSystemInput) SetEncrypted(v bool) *CreateFileSystemInput {
  1417. s.Encrypted = &v
  1418. return s
  1419. }
  1420. // SetKmsKeyId sets the KmsKeyId field's value.
  1421. func (s *CreateFileSystemInput) SetKmsKeyId(v string) *CreateFileSystemInput {
  1422. s.KmsKeyId = &v
  1423. return s
  1424. }
  1425. // SetPerformanceMode sets the PerformanceMode field's value.
  1426. func (s *CreateFileSystemInput) SetPerformanceMode(v string) *CreateFileSystemInput {
  1427. s.PerformanceMode = &v
  1428. return s
  1429. }
  1430. // SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
  1431. func (s *CreateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *CreateFileSystemInput {
  1432. s.ProvisionedThroughputInMibps = &v
  1433. return s
  1434. }
  1435. // SetThroughputMode sets the ThroughputMode field's value.
  1436. func (s *CreateFileSystemInput) SetThroughputMode(v string) *CreateFileSystemInput {
  1437. s.ThroughputMode = &v
  1438. return s
  1439. }
  1440. type CreateMountTargetInput struct {
  1441. _ struct{} `type:"structure"`
  1442. // ID of the file system for which to create the mount target.
  1443. //
  1444. // FileSystemId is a required field
  1445. FileSystemId *string `type:"string" required:"true"`
  1446. // Valid IPv4 address within the address range of the specified subnet.
  1447. IpAddress *string `type:"string"`
  1448. // Up to five VPC security group IDs, of the form sg-xxxxxxxx. These must be
  1449. // for the same VPC as subnet specified.
  1450. SecurityGroups []*string `type:"list"`
  1451. // ID of the subnet to add the mount target in.
  1452. //
  1453. // SubnetId is a required field
  1454. SubnetId *string `type:"string" required:"true"`
  1455. }
  1456. // String returns the string representation
  1457. func (s CreateMountTargetInput) String() string {
  1458. return awsutil.Prettify(s)
  1459. }
  1460. // GoString returns the string representation
  1461. func (s CreateMountTargetInput) GoString() string {
  1462. return s.String()
  1463. }
  1464. // Validate inspects the fields of the type to determine if they are valid.
  1465. func (s *CreateMountTargetInput) Validate() error {
  1466. invalidParams := request.ErrInvalidParams{Context: "CreateMountTargetInput"}
  1467. if s.FileSystemId == nil {
  1468. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  1469. }
  1470. if s.SubnetId == nil {
  1471. invalidParams.Add(request.NewErrParamRequired("SubnetId"))
  1472. }
  1473. if invalidParams.Len() > 0 {
  1474. return invalidParams
  1475. }
  1476. return nil
  1477. }
  1478. // SetFileSystemId sets the FileSystemId field's value.
  1479. func (s *CreateMountTargetInput) SetFileSystemId(v string) *CreateMountTargetInput {
  1480. s.FileSystemId = &v
  1481. return s
  1482. }
  1483. // SetIpAddress sets the IpAddress field's value.
  1484. func (s *CreateMountTargetInput) SetIpAddress(v string) *CreateMountTargetInput {
  1485. s.IpAddress = &v
  1486. return s
  1487. }
  1488. // SetSecurityGroups sets the SecurityGroups field's value.
  1489. func (s *CreateMountTargetInput) SetSecurityGroups(v []*string) *CreateMountTargetInput {
  1490. s.SecurityGroups = v
  1491. return s
  1492. }
  1493. // SetSubnetId sets the SubnetId field's value.
  1494. func (s *CreateMountTargetInput) SetSubnetId(v string) *CreateMountTargetInput {
  1495. s.SubnetId = &v
  1496. return s
  1497. }
  1498. type CreateTagsInput struct {
  1499. _ struct{} `type:"structure"`
  1500. // ID of the file system whose tags you want to modify (String). This operation
  1501. // modifies the tags only, not the file system.
  1502. //
  1503. // FileSystemId is a required field
  1504. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  1505. // Array of Tag objects to add. Each Tag object is a key-value pair.
  1506. //
  1507. // Tags is a required field
  1508. Tags []*Tag `type:"list" required:"true"`
  1509. }
  1510. // String returns the string representation
  1511. func (s CreateTagsInput) String() string {
  1512. return awsutil.Prettify(s)
  1513. }
  1514. // GoString returns the string representation
  1515. func (s CreateTagsInput) GoString() string {
  1516. return s.String()
  1517. }
  1518. // Validate inspects the fields of the type to determine if they are valid.
  1519. func (s *CreateTagsInput) Validate() error {
  1520. invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"}
  1521. if s.FileSystemId == nil {
  1522. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  1523. }
  1524. if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
  1525. invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
  1526. }
  1527. if s.Tags == nil {
  1528. invalidParams.Add(request.NewErrParamRequired("Tags"))
  1529. }
  1530. if s.Tags != nil {
  1531. for i, v := range s.Tags {
  1532. if v == nil {
  1533. continue
  1534. }
  1535. if err := v.Validate(); err != nil {
  1536. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  1537. }
  1538. }
  1539. }
  1540. if invalidParams.Len() > 0 {
  1541. return invalidParams
  1542. }
  1543. return nil
  1544. }
  1545. // SetFileSystemId sets the FileSystemId field's value.
  1546. func (s *CreateTagsInput) SetFileSystemId(v string) *CreateTagsInput {
  1547. s.FileSystemId = &v
  1548. return s
  1549. }
  1550. // SetTags sets the Tags field's value.
  1551. func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput {
  1552. s.Tags = v
  1553. return s
  1554. }
  1555. type CreateTagsOutput struct {
  1556. _ struct{} `type:"structure"`
  1557. }
  1558. // String returns the string representation
  1559. func (s CreateTagsOutput) String() string {
  1560. return awsutil.Prettify(s)
  1561. }
  1562. // GoString returns the string representation
  1563. func (s CreateTagsOutput) GoString() string {
  1564. return s.String()
  1565. }
  1566. type DeleteFileSystemInput struct {
  1567. _ struct{} `type:"structure"`
  1568. // ID of the file system you want to delete.
  1569. //
  1570. // FileSystemId is a required field
  1571. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  1572. }
  1573. // String returns the string representation
  1574. func (s DeleteFileSystemInput) String() string {
  1575. return awsutil.Prettify(s)
  1576. }
  1577. // GoString returns the string representation
  1578. func (s DeleteFileSystemInput) GoString() string {
  1579. return s.String()
  1580. }
  1581. // Validate inspects the fields of the type to determine if they are valid.
  1582. func (s *DeleteFileSystemInput) Validate() error {
  1583. invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"}
  1584. if s.FileSystemId == nil {
  1585. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  1586. }
  1587. if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
  1588. invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
  1589. }
  1590. if invalidParams.Len() > 0 {
  1591. return invalidParams
  1592. }
  1593. return nil
  1594. }
  1595. // SetFileSystemId sets the FileSystemId field's value.
  1596. func (s *DeleteFileSystemInput) SetFileSystemId(v string) *DeleteFileSystemInput {
  1597. s.FileSystemId = &v
  1598. return s
  1599. }
  1600. type DeleteFileSystemOutput struct {
  1601. _ struct{} `type:"structure"`
  1602. }
  1603. // String returns the string representation
  1604. func (s DeleteFileSystemOutput) String() string {
  1605. return awsutil.Prettify(s)
  1606. }
  1607. // GoString returns the string representation
  1608. func (s DeleteFileSystemOutput) GoString() string {
  1609. return s.String()
  1610. }
  1611. type DeleteMountTargetInput struct {
  1612. _ struct{} `type:"structure"`
  1613. // ID of the mount target to delete (String).
  1614. //
  1615. // MountTargetId is a required field
  1616. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  1617. }
  1618. // String returns the string representation
  1619. func (s DeleteMountTargetInput) String() string {
  1620. return awsutil.Prettify(s)
  1621. }
  1622. // GoString returns the string representation
  1623. func (s DeleteMountTargetInput) GoString() string {
  1624. return s.String()
  1625. }
  1626. // Validate inspects the fields of the type to determine if they are valid.
  1627. func (s *DeleteMountTargetInput) Validate() error {
  1628. invalidParams := request.ErrInvalidParams{Context: "DeleteMountTargetInput"}
  1629. if s.MountTargetId == nil {
  1630. invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
  1631. }
  1632. if s.MountTargetId != nil && len(*s.MountTargetId) < 1 {
  1633. invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1))
  1634. }
  1635. if invalidParams.Len() > 0 {
  1636. return invalidParams
  1637. }
  1638. return nil
  1639. }
  1640. // SetMountTargetId sets the MountTargetId field's value.
  1641. func (s *DeleteMountTargetInput) SetMountTargetId(v string) *DeleteMountTargetInput {
  1642. s.MountTargetId = &v
  1643. return s
  1644. }
  1645. type DeleteMountTargetOutput struct {
  1646. _ struct{} `type:"structure"`
  1647. }
  1648. // String returns the string representation
  1649. func (s DeleteMountTargetOutput) String() string {
  1650. return awsutil.Prettify(s)
  1651. }
  1652. // GoString returns the string representation
  1653. func (s DeleteMountTargetOutput) GoString() string {
  1654. return s.String()
  1655. }
  1656. type DeleteTagsInput struct {
  1657. _ struct{} `type:"structure"`
  1658. // ID of the file system whose tags you want to delete (String).
  1659. //
  1660. // FileSystemId is a required field
  1661. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  1662. // List of tag keys to delete.
  1663. //
  1664. // TagKeys is a required field
  1665. TagKeys []*string `type:"list" required:"true"`
  1666. }
  1667. // String returns the string representation
  1668. func (s DeleteTagsInput) String() string {
  1669. return awsutil.Prettify(s)
  1670. }
  1671. // GoString returns the string representation
  1672. func (s DeleteTagsInput) GoString() string {
  1673. return s.String()
  1674. }
  1675. // Validate inspects the fields of the type to determine if they are valid.
  1676. func (s *DeleteTagsInput) Validate() error {
  1677. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  1678. if s.FileSystemId == nil {
  1679. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  1680. }
  1681. if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
  1682. invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
  1683. }
  1684. if s.TagKeys == nil {
  1685. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  1686. }
  1687. if invalidParams.Len() > 0 {
  1688. return invalidParams
  1689. }
  1690. return nil
  1691. }
  1692. // SetFileSystemId sets the FileSystemId field's value.
  1693. func (s *DeleteTagsInput) SetFileSystemId(v string) *DeleteTagsInput {
  1694. s.FileSystemId = &v
  1695. return s
  1696. }
  1697. // SetTagKeys sets the TagKeys field's value.
  1698. func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput {
  1699. s.TagKeys = v
  1700. return s
  1701. }
  1702. type DeleteTagsOutput struct {
  1703. _ struct{} `type:"structure"`
  1704. }
  1705. // String returns the string representation
  1706. func (s DeleteTagsOutput) String() string {
  1707. return awsutil.Prettify(s)
  1708. }
  1709. // GoString returns the string representation
  1710. func (s DeleteTagsOutput) GoString() string {
  1711. return s.String()
  1712. }
  1713. type DescribeFileSystemsInput struct {
  1714. _ struct{} `type:"structure"`
  1715. // (Optional) Restricts the list to the file system with this creation token
  1716. // (String). You specify a creation token when you create an Amazon EFS file
  1717. // system.
  1718. CreationToken *string `location:"querystring" locationName:"CreationToken" min:"1" type:"string"`
  1719. // (Optional) ID of the file system whose description you want to retrieve (String).
  1720. FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
  1721. // (Optional) Opaque pagination token returned from a previous DescribeFileSystems
  1722. // operation (String). If present, specifies to continue the list from where
  1723. // the returning call had left off.
  1724. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  1725. // (Optional) Specifies the maximum number of file systems to return in the
  1726. // response (integer). This parameter value must be greater than 0. The number
  1727. // of items that Amazon EFS returns is the minimum of the MaxItems parameter
  1728. // specified in the request and the service's internal maximum number of items
  1729. // per page.
  1730. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  1731. }
  1732. // String returns the string representation
  1733. func (s DescribeFileSystemsInput) String() string {
  1734. return awsutil.Prettify(s)
  1735. }
  1736. // GoString returns the string representation
  1737. func (s DescribeFileSystemsInput) GoString() string {
  1738. return s.String()
  1739. }
  1740. // Validate inspects the fields of the type to determine if they are valid.
  1741. func (s *DescribeFileSystemsInput) Validate() error {
  1742. invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"}
  1743. if s.CreationToken != nil && len(*s.CreationToken) < 1 {
  1744. invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1))
  1745. }
  1746. if s.MaxItems != nil && *s.MaxItems < 1 {
  1747. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  1748. }
  1749. if invalidParams.Len() > 0 {
  1750. return invalidParams
  1751. }
  1752. return nil
  1753. }
  1754. // SetCreationToken sets the CreationToken field's value.
  1755. func (s *DescribeFileSystemsInput) SetCreationToken(v string) *DescribeFileSystemsInput {
  1756. s.CreationToken = &v
  1757. return s
  1758. }
  1759. // SetFileSystemId sets the FileSystemId field's value.
  1760. func (s *DescribeFileSystemsInput) SetFileSystemId(v string) *DescribeFileSystemsInput {
  1761. s.FileSystemId = &v
  1762. return s
  1763. }
  1764. // SetMarker sets the Marker field's value.
  1765. func (s *DescribeFileSystemsInput) SetMarker(v string) *DescribeFileSystemsInput {
  1766. s.Marker = &v
  1767. return s
  1768. }
  1769. // SetMaxItems sets the MaxItems field's value.
  1770. func (s *DescribeFileSystemsInput) SetMaxItems(v int64) *DescribeFileSystemsInput {
  1771. s.MaxItems = &v
  1772. return s
  1773. }
  1774. type DescribeFileSystemsOutput struct {
  1775. _ struct{} `type:"structure"`
  1776. // Array of file system descriptions.
  1777. FileSystems []*FileSystemDescription `type:"list"`
  1778. // Present if provided by caller in the request (String).
  1779. Marker *string `type:"string"`
  1780. // Present if there are more file systems than returned in the response (String).
  1781. // You can use the NextMarker in the subsequent request to fetch the descriptions.
  1782. NextMarker *string `type:"string"`
  1783. }
  1784. // String returns the string representation
  1785. func (s DescribeFileSystemsOutput) String() string {
  1786. return awsutil.Prettify(s)
  1787. }
  1788. // GoString returns the string representation
  1789. func (s DescribeFileSystemsOutput) GoString() string {
  1790. return s.String()
  1791. }
  1792. // SetFileSystems sets the FileSystems field's value.
  1793. func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystemDescription) *DescribeFileSystemsOutput {
  1794. s.FileSystems = v
  1795. return s
  1796. }
  1797. // SetMarker sets the Marker field's value.
  1798. func (s *DescribeFileSystemsOutput) SetMarker(v string) *DescribeFileSystemsOutput {
  1799. s.Marker = &v
  1800. return s
  1801. }
  1802. // SetNextMarker sets the NextMarker field's value.
  1803. func (s *DescribeFileSystemsOutput) SetNextMarker(v string) *DescribeFileSystemsOutput {
  1804. s.NextMarker = &v
  1805. return s
  1806. }
  1807. type DescribeMountTargetSecurityGroupsInput struct {
  1808. _ struct{} `type:"structure"`
  1809. // ID of the mount target whose security groups you want to retrieve.
  1810. //
  1811. // MountTargetId is a required field
  1812. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  1813. }
  1814. // String returns the string representation
  1815. func (s DescribeMountTargetSecurityGroupsInput) String() string {
  1816. return awsutil.Prettify(s)
  1817. }
  1818. // GoString returns the string representation
  1819. func (s DescribeMountTargetSecurityGroupsInput) GoString() string {
  1820. return s.String()
  1821. }
  1822. // Validate inspects the fields of the type to determine if they are valid.
  1823. func (s *DescribeMountTargetSecurityGroupsInput) Validate() error {
  1824. invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetSecurityGroupsInput"}
  1825. if s.MountTargetId == nil {
  1826. invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
  1827. }
  1828. if s.MountTargetId != nil && len(*s.MountTargetId) < 1 {
  1829. invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1))
  1830. }
  1831. if invalidParams.Len() > 0 {
  1832. return invalidParams
  1833. }
  1834. return nil
  1835. }
  1836. // SetMountTargetId sets the MountTargetId field's value.
  1837. func (s *DescribeMountTargetSecurityGroupsInput) SetMountTargetId(v string) *DescribeMountTargetSecurityGroupsInput {
  1838. s.MountTargetId = &v
  1839. return s
  1840. }
  1841. type DescribeMountTargetSecurityGroupsOutput struct {
  1842. _ struct{} `type:"structure"`
  1843. // Array of security groups.
  1844. //
  1845. // SecurityGroups is a required field
  1846. SecurityGroups []*string `type:"list" required:"true"`
  1847. }
  1848. // String returns the string representation
  1849. func (s DescribeMountTargetSecurityGroupsOutput) String() string {
  1850. return awsutil.Prettify(s)
  1851. }
  1852. // GoString returns the string representation
  1853. func (s DescribeMountTargetSecurityGroupsOutput) GoString() string {
  1854. return s.String()
  1855. }
  1856. // SetSecurityGroups sets the SecurityGroups field's value.
  1857. func (s *DescribeMountTargetSecurityGroupsOutput) SetSecurityGroups(v []*string) *DescribeMountTargetSecurityGroupsOutput {
  1858. s.SecurityGroups = v
  1859. return s
  1860. }
  1861. type DescribeMountTargetsInput struct {
  1862. _ struct{} `type:"structure"`
  1863. // (Optional) ID of the file system whose mount targets you want to list (String).
  1864. // It must be included in your request if MountTargetId is not included.
  1865. FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
  1866. // (Optional) Opaque pagination token returned from a previous DescribeMountTargets
  1867. // operation (String). If present, it specifies to continue the list from where
  1868. // the previous returning call left off.
  1869. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  1870. // (Optional) Maximum number of mount targets to return in the response. It
  1871. // must be an integer with a value greater than zero.
  1872. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  1873. // (Optional) ID of the mount target that you want to have described (String).
  1874. // It must be included in your request if FileSystemId is not included.
  1875. MountTargetId *string `location:"querystring" locationName:"MountTargetId" type:"string"`
  1876. }
  1877. // String returns the string representation
  1878. func (s DescribeMountTargetsInput) String() string {
  1879. return awsutil.Prettify(s)
  1880. }
  1881. // GoString returns the string representation
  1882. func (s DescribeMountTargetsInput) GoString() string {
  1883. return s.String()
  1884. }
  1885. // Validate inspects the fields of the type to determine if they are valid.
  1886. func (s *DescribeMountTargetsInput) Validate() error {
  1887. invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetsInput"}
  1888. if s.MaxItems != nil && *s.MaxItems < 1 {
  1889. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  1890. }
  1891. if invalidParams.Len() > 0 {
  1892. return invalidParams
  1893. }
  1894. return nil
  1895. }
  1896. // SetFileSystemId sets the FileSystemId field's value.
  1897. func (s *DescribeMountTargetsInput) SetFileSystemId(v string) *DescribeMountTargetsInput {
  1898. s.FileSystemId = &v
  1899. return s
  1900. }
  1901. // SetMarker sets the Marker field's value.
  1902. func (s *DescribeMountTargetsInput) SetMarker(v string) *DescribeMountTargetsInput {
  1903. s.Marker = &v
  1904. return s
  1905. }
  1906. // SetMaxItems sets the MaxItems field's value.
  1907. func (s *DescribeMountTargetsInput) SetMaxItems(v int64) *DescribeMountTargetsInput {
  1908. s.MaxItems = &v
  1909. return s
  1910. }
  1911. // SetMountTargetId sets the MountTargetId field's value.
  1912. func (s *DescribeMountTargetsInput) SetMountTargetId(v string) *DescribeMountTargetsInput {
  1913. s.MountTargetId = &v
  1914. return s
  1915. }
  1916. type DescribeMountTargetsOutput struct {
  1917. _ struct{} `type:"structure"`
  1918. // If the request included the Marker, the response returns that value in this
  1919. // field.
  1920. Marker *string `type:"string"`
  1921. // Returns the file system's mount targets as an array of MountTargetDescription
  1922. // objects.
  1923. MountTargets []*MountTargetDescription `type:"list"`
  1924. // If a value is present, there are more mount targets to return. In a subsequent
  1925. // request, you can provide Marker in your request with this value to retrieve
  1926. // the next set of mount targets.
  1927. NextMarker *string `type:"string"`
  1928. }
  1929. // String returns the string representation
  1930. func (s DescribeMountTargetsOutput) String() string {
  1931. return awsutil.Prettify(s)
  1932. }
  1933. // GoString returns the string representation
  1934. func (s DescribeMountTargetsOutput) GoString() string {
  1935. return s.String()
  1936. }
  1937. // SetMarker sets the Marker field's value.
  1938. func (s *DescribeMountTargetsOutput) SetMarker(v string) *DescribeMountTargetsOutput {
  1939. s.Marker = &v
  1940. return s
  1941. }
  1942. // SetMountTargets sets the MountTargets field's value.
  1943. func (s *DescribeMountTargetsOutput) SetMountTargets(v []*MountTargetDescription) *DescribeMountTargetsOutput {
  1944. s.MountTargets = v
  1945. return s
  1946. }
  1947. // SetNextMarker sets the NextMarker field's value.
  1948. func (s *DescribeMountTargetsOutput) SetNextMarker(v string) *DescribeMountTargetsOutput {
  1949. s.NextMarker = &v
  1950. return s
  1951. }
  1952. type DescribeTagsInput struct {
  1953. _ struct{} `type:"structure"`
  1954. // ID of the file system whose tag set you want to retrieve.
  1955. //
  1956. // FileSystemId is a required field
  1957. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  1958. // (Optional) Opaque pagination token returned from a previous DescribeTags
  1959. // operation (String). If present, it specifies to continue the list from where
  1960. // the previous call left off.
  1961. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  1962. // (Optional) Maximum number of file system tags to return in the response.
  1963. // It must be an integer with a value greater than zero.
  1964. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  1965. }
  1966. // String returns the string representation
  1967. func (s DescribeTagsInput) String() string {
  1968. return awsutil.Prettify(s)
  1969. }
  1970. // GoString returns the string representation
  1971. func (s DescribeTagsInput) GoString() string {
  1972. return s.String()
  1973. }
  1974. // Validate inspects the fields of the type to determine if they are valid.
  1975. func (s *DescribeTagsInput) Validate() error {
  1976. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  1977. if s.FileSystemId == nil {
  1978. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  1979. }
  1980. if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
  1981. invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
  1982. }
  1983. if s.MaxItems != nil && *s.MaxItems < 1 {
  1984. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  1985. }
  1986. if invalidParams.Len() > 0 {
  1987. return invalidParams
  1988. }
  1989. return nil
  1990. }
  1991. // SetFileSystemId sets the FileSystemId field's value.
  1992. func (s *DescribeTagsInput) SetFileSystemId(v string) *DescribeTagsInput {
  1993. s.FileSystemId = &v
  1994. return s
  1995. }
  1996. // SetMarker sets the Marker field's value.
  1997. func (s *DescribeTagsInput) SetMarker(v string) *DescribeTagsInput {
  1998. s.Marker = &v
  1999. return s
  2000. }
  2001. // SetMaxItems sets the MaxItems field's value.
  2002. func (s *DescribeTagsInput) SetMaxItems(v int64) *DescribeTagsInput {
  2003. s.MaxItems = &v
  2004. return s
  2005. }
  2006. type DescribeTagsOutput struct {
  2007. _ struct{} `type:"structure"`
  2008. // If the request included a Marker, the response returns that value in this
  2009. // field.
  2010. Marker *string `type:"string"`
  2011. // If a value is present, there are more tags to return. In a subsequent request,
  2012. // you can provide the value of NextMarker as the value of the Marker parameter
  2013. // in your next request to retrieve the next set of tags.
  2014. NextMarker *string `type:"string"`
  2015. // Returns tags associated with the file system as an array of Tag objects.
  2016. //
  2017. // Tags is a required field
  2018. Tags []*Tag `type:"list" required:"true"`
  2019. }
  2020. // String returns the string representation
  2021. func (s DescribeTagsOutput) String() string {
  2022. return awsutil.Prettify(s)
  2023. }
  2024. // GoString returns the string representation
  2025. func (s DescribeTagsOutput) GoString() string {
  2026. return s.String()
  2027. }
  2028. // SetMarker sets the Marker field's value.
  2029. func (s *DescribeTagsOutput) SetMarker(v string) *DescribeTagsOutput {
  2030. s.Marker = &v
  2031. return s
  2032. }
  2033. // SetNextMarker sets the NextMarker field's value.
  2034. func (s *DescribeTagsOutput) SetNextMarker(v string) *DescribeTagsOutput {
  2035. s.NextMarker = &v
  2036. return s
  2037. }
  2038. // SetTags sets the Tags field's value.
  2039. func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput {
  2040. s.Tags = v
  2041. return s
  2042. }
  2043. // Description of the file system.
  2044. type FileSystemDescription struct {
  2045. _ struct{} `type:"structure"`
  2046. // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).
  2047. //
  2048. // CreationTime is a required field
  2049. CreationTime *time.Time `type:"timestamp" required:"true"`
  2050. // Opaque string specified in the request.
  2051. //
  2052. // CreationToken is a required field
  2053. CreationToken *string `min:"1" type:"string" required:"true"`
  2054. // A Boolean value that, if true, indicates that the file system is encrypted.
  2055. Encrypted *bool `type:"boolean"`
  2056. // ID of the file system, assigned by Amazon EFS.
  2057. //
  2058. // FileSystemId is a required field
  2059. FileSystemId *string `type:"string" required:"true"`
  2060. // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK)
  2061. // that was used to protect the encrypted file system.
  2062. KmsKeyId *string `min:"1" type:"string"`
  2063. // Lifecycle phase of the file system.
  2064. //
  2065. // LifeCycleState is a required field
  2066. LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
  2067. // You can add tags to a file system, including a Name tag. For more information,
  2068. // see CreateTags. If the file system has a Name tag, Amazon EFS returns the
  2069. // value in this field.
  2070. Name *string `type:"string"`
  2071. // Current number of mount targets that the file system has. For more information,
  2072. // see CreateMountTarget.
  2073. //
  2074. // NumberOfMountTargets is a required field
  2075. NumberOfMountTargets *int64 `type:"integer" required:"true"`
  2076. // AWS account that created the file system. If the file system was created
  2077. // by an IAM user, the parent account to which the user belongs is the owner.
  2078. //
  2079. // OwnerId is a required field
  2080. OwnerId *string `type:"string" required:"true"`
  2081. // The PerformanceMode of the file system.
  2082. //
  2083. // PerformanceMode is a required field
  2084. PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"`
  2085. // The throughput, measured in MiB/s, that you want to provision for a file
  2086. // system. The limit on throughput is 1024 MiB/s. You can get these limits increased
  2087. // by contacting AWS Support. For more information, see Amazon EFS Limits That
  2088. // You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits)
  2089. // in the Amazon EFS User Guide.
  2090. ProvisionedThroughputInMibps *float64 `type:"double"`
  2091. // Latest known metered size (in bytes) of data stored in the file system, in
  2092. // its Value field, and the time at which that size was determined in its Timestamp
  2093. // field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z.
  2094. // The SizeInBytes value doesn't represent the size of a consistent snapshot
  2095. // of the file system, but it is eventually consistent when there are no writes
  2096. // to the file system. That is, SizeInBytes represents actual size only if the
  2097. // file system is not modified for a period longer than a couple of hours. Otherwise,
  2098. // the value is not the exact size that the file system was at any point in
  2099. // time.
  2100. //
  2101. // SizeInBytes is a required field
  2102. SizeInBytes *FileSystemSize `type:"structure" required:"true"`
  2103. // The throughput mode for a file system. There are two throughput modes to
  2104. // choose from for your file system: bursting and provisioned. You can decrease
  2105. // your file system's throughput in Provisioned Throughput mode or change between
  2106. // the throughput modes as long as it’s been more than 24 hours since the last
  2107. // decrease or throughput mode change.
  2108. ThroughputMode *string `type:"string" enum:"ThroughputMode"`
  2109. }
  2110. // String returns the string representation
  2111. func (s FileSystemDescription) String() string {
  2112. return awsutil.Prettify(s)
  2113. }
  2114. // GoString returns the string representation
  2115. func (s FileSystemDescription) GoString() string {
  2116. return s.String()
  2117. }
  2118. // SetCreationTime sets the CreationTime field's value.
  2119. func (s *FileSystemDescription) SetCreationTime(v time.Time) *FileSystemDescription {
  2120. s.CreationTime = &v
  2121. return s
  2122. }
  2123. // SetCreationToken sets the CreationToken field's value.
  2124. func (s *FileSystemDescription) SetCreationToken(v string) *FileSystemDescription {
  2125. s.CreationToken = &v
  2126. return s
  2127. }
  2128. // SetEncrypted sets the Encrypted field's value.
  2129. func (s *FileSystemDescription) SetEncrypted(v bool) *FileSystemDescription {
  2130. s.Encrypted = &v
  2131. return s
  2132. }
  2133. // SetFileSystemId sets the FileSystemId field's value.
  2134. func (s *FileSystemDescription) SetFileSystemId(v string) *FileSystemDescription {
  2135. s.FileSystemId = &v
  2136. return s
  2137. }
  2138. // SetKmsKeyId sets the KmsKeyId field's value.
  2139. func (s *FileSystemDescription) SetKmsKeyId(v string) *FileSystemDescription {
  2140. s.KmsKeyId = &v
  2141. return s
  2142. }
  2143. // SetLifeCycleState sets the LifeCycleState field's value.
  2144. func (s *FileSystemDescription) SetLifeCycleState(v string) *FileSystemDescription {
  2145. s.LifeCycleState = &v
  2146. return s
  2147. }
  2148. // SetName sets the Name field's value.
  2149. func (s *FileSystemDescription) SetName(v string) *FileSystemDescription {
  2150. s.Name = &v
  2151. return s
  2152. }
  2153. // SetNumberOfMountTargets sets the NumberOfMountTargets field's value.
  2154. func (s *FileSystemDescription) SetNumberOfMountTargets(v int64) *FileSystemDescription {
  2155. s.NumberOfMountTargets = &v
  2156. return s
  2157. }
  2158. // SetOwnerId sets the OwnerId field's value.
  2159. func (s *FileSystemDescription) SetOwnerId(v string) *FileSystemDescription {
  2160. s.OwnerId = &v
  2161. return s
  2162. }
  2163. // SetPerformanceMode sets the PerformanceMode field's value.
  2164. func (s *FileSystemDescription) SetPerformanceMode(v string) *FileSystemDescription {
  2165. s.PerformanceMode = &v
  2166. return s
  2167. }
  2168. // SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
  2169. func (s *FileSystemDescription) SetProvisionedThroughputInMibps(v float64) *FileSystemDescription {
  2170. s.ProvisionedThroughputInMibps = &v
  2171. return s
  2172. }
  2173. // SetSizeInBytes sets the SizeInBytes field's value.
  2174. func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDescription {
  2175. s.SizeInBytes = v
  2176. return s
  2177. }
  2178. // SetThroughputMode sets the ThroughputMode field's value.
  2179. func (s *FileSystemDescription) SetThroughputMode(v string) *FileSystemDescription {
  2180. s.ThroughputMode = &v
  2181. return s
  2182. }
  2183. // Latest known metered size (in bytes) of data stored in the file system, in
  2184. // its Value field, and the time at which that size was determined in its Timestamp
  2185. // field. Note that the value does not represent the size of a consistent snapshot
  2186. // of the file system, but it is eventually consistent when there are no writes
  2187. // to the file system. That is, the value will represent the actual size only
  2188. // if the file system is not modified for a period longer than a couple of hours.
  2189. // Otherwise, the value is not necessarily the exact size the file system was
  2190. // at any instant in time.
  2191. type FileSystemSize struct {
  2192. _ struct{} `type:"structure"`
  2193. // Time at which the size of data, returned in the Value field, was determined.
  2194. // The value is the integer number of seconds since 1970-01-01T00:00:00Z.
  2195. Timestamp *time.Time `type:"timestamp"`
  2196. // Latest known metered size (in bytes) of data stored in the file system.
  2197. //
  2198. // Value is a required field
  2199. Value *int64 `type:"long" required:"true"`
  2200. }
  2201. // String returns the string representation
  2202. func (s FileSystemSize) String() string {
  2203. return awsutil.Prettify(s)
  2204. }
  2205. // GoString returns the string representation
  2206. func (s FileSystemSize) GoString() string {
  2207. return s.String()
  2208. }
  2209. // SetTimestamp sets the Timestamp field's value.
  2210. func (s *FileSystemSize) SetTimestamp(v time.Time) *FileSystemSize {
  2211. s.Timestamp = &v
  2212. return s
  2213. }
  2214. // SetValue sets the Value field's value.
  2215. func (s *FileSystemSize) SetValue(v int64) *FileSystemSize {
  2216. s.Value = &v
  2217. return s
  2218. }
  2219. type ModifyMountTargetSecurityGroupsInput struct {
  2220. _ struct{} `type:"structure"`
  2221. // ID of the mount target whose security groups you want to modify.
  2222. //
  2223. // MountTargetId is a required field
  2224. MountTargetId *string `location:"uri" locationName:"MountTargetId" type:"string" required:"true"`
  2225. // Array of up to five VPC security group IDs.
  2226. SecurityGroups []*string `type:"list"`
  2227. }
  2228. // String returns the string representation
  2229. func (s ModifyMountTargetSecurityGroupsInput) String() string {
  2230. return awsutil.Prettify(s)
  2231. }
  2232. // GoString returns the string representation
  2233. func (s ModifyMountTargetSecurityGroupsInput) GoString() string {
  2234. return s.String()
  2235. }
  2236. // Validate inspects the fields of the type to determine if they are valid.
  2237. func (s *ModifyMountTargetSecurityGroupsInput) Validate() error {
  2238. invalidParams := request.ErrInvalidParams{Context: "ModifyMountTargetSecurityGroupsInput"}
  2239. if s.MountTargetId == nil {
  2240. invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
  2241. }
  2242. if s.MountTargetId != nil && len(*s.MountTargetId) < 1 {
  2243. invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1))
  2244. }
  2245. if invalidParams.Len() > 0 {
  2246. return invalidParams
  2247. }
  2248. return nil
  2249. }
  2250. // SetMountTargetId sets the MountTargetId field's value.
  2251. func (s *ModifyMountTargetSecurityGroupsInput) SetMountTargetId(v string) *ModifyMountTargetSecurityGroupsInput {
  2252. s.MountTargetId = &v
  2253. return s
  2254. }
  2255. // SetSecurityGroups sets the SecurityGroups field's value.
  2256. func (s *ModifyMountTargetSecurityGroupsInput) SetSecurityGroups(v []*string) *ModifyMountTargetSecurityGroupsInput {
  2257. s.SecurityGroups = v
  2258. return s
  2259. }
  2260. type ModifyMountTargetSecurityGroupsOutput struct {
  2261. _ struct{} `type:"structure"`
  2262. }
  2263. // String returns the string representation
  2264. func (s ModifyMountTargetSecurityGroupsOutput) String() string {
  2265. return awsutil.Prettify(s)
  2266. }
  2267. // GoString returns the string representation
  2268. func (s ModifyMountTargetSecurityGroupsOutput) GoString() string {
  2269. return s.String()
  2270. }
  2271. // Provides a description of a mount target.
  2272. type MountTargetDescription struct {
  2273. _ struct{} `type:"structure"`
  2274. // ID of the file system for which the mount target is intended.
  2275. //
  2276. // FileSystemId is a required field
  2277. FileSystemId *string `type:"string" required:"true"`
  2278. // Address at which the file system may be mounted via the mount target.
  2279. IpAddress *string `type:"string"`
  2280. // Lifecycle state of the mount target.
  2281. //
  2282. // LifeCycleState is a required field
  2283. LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
  2284. // System-assigned mount target ID.
  2285. //
  2286. // MountTargetId is a required field
  2287. MountTargetId *string `type:"string" required:"true"`
  2288. // ID of the network interface that Amazon EFS created when it created the mount
  2289. // target.
  2290. NetworkInterfaceId *string `type:"string"`
  2291. // AWS account ID that owns the resource.
  2292. OwnerId *string `type:"string"`
  2293. // ID of the mount target's subnet.
  2294. //
  2295. // SubnetId is a required field
  2296. SubnetId *string `type:"string" required:"true"`
  2297. }
  2298. // String returns the string representation
  2299. func (s MountTargetDescription) String() string {
  2300. return awsutil.Prettify(s)
  2301. }
  2302. // GoString returns the string representation
  2303. func (s MountTargetDescription) GoString() string {
  2304. return s.String()
  2305. }
  2306. // SetFileSystemId sets the FileSystemId field's value.
  2307. func (s *MountTargetDescription) SetFileSystemId(v string) *MountTargetDescription {
  2308. s.FileSystemId = &v
  2309. return s
  2310. }
  2311. // SetIpAddress sets the IpAddress field's value.
  2312. func (s *MountTargetDescription) SetIpAddress(v string) *MountTargetDescription {
  2313. s.IpAddress = &v
  2314. return s
  2315. }
  2316. // SetLifeCycleState sets the LifeCycleState field's value.
  2317. func (s *MountTargetDescription) SetLifeCycleState(v string) *MountTargetDescription {
  2318. s.LifeCycleState = &v
  2319. return s
  2320. }
  2321. // SetMountTargetId sets the MountTargetId field's value.
  2322. func (s *MountTargetDescription) SetMountTargetId(v string) *MountTargetDescription {
  2323. s.MountTargetId = &v
  2324. return s
  2325. }
  2326. // SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
  2327. func (s *MountTargetDescription) SetNetworkInterfaceId(v string) *MountTargetDescription {
  2328. s.NetworkInterfaceId = &v
  2329. return s
  2330. }
  2331. // SetOwnerId sets the OwnerId field's value.
  2332. func (s *MountTargetDescription) SetOwnerId(v string) *MountTargetDescription {
  2333. s.OwnerId = &v
  2334. return s
  2335. }
  2336. // SetSubnetId sets the SubnetId field's value.
  2337. func (s *MountTargetDescription) SetSubnetId(v string) *MountTargetDescription {
  2338. s.SubnetId = &v
  2339. return s
  2340. }
  2341. // A tag is a key-value pair. Allowed characters: letters, whitespace, and numbers,
  2342. // representable in UTF-8, and the following characters: + - = . _ : /
  2343. type Tag struct {
  2344. _ struct{} `type:"structure"`
  2345. // Tag key (String). The key can't start with aws:.
  2346. //
  2347. // Key is a required field
  2348. Key *string `min:"1" type:"string" required:"true"`
  2349. // Value of the tag key.
  2350. //
  2351. // Value is a required field
  2352. Value *string `type:"string" required:"true"`
  2353. }
  2354. // String returns the string representation
  2355. func (s Tag) String() string {
  2356. return awsutil.Prettify(s)
  2357. }
  2358. // GoString returns the string representation
  2359. func (s Tag) GoString() string {
  2360. return s.String()
  2361. }
  2362. // Validate inspects the fields of the type to determine if they are valid.
  2363. func (s *Tag) Validate() error {
  2364. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  2365. if s.Key == nil {
  2366. invalidParams.Add(request.NewErrParamRequired("Key"))
  2367. }
  2368. if s.Key != nil && len(*s.Key) < 1 {
  2369. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  2370. }
  2371. if s.Value == nil {
  2372. invalidParams.Add(request.NewErrParamRequired("Value"))
  2373. }
  2374. if invalidParams.Len() > 0 {
  2375. return invalidParams
  2376. }
  2377. return nil
  2378. }
  2379. // SetKey sets the Key field's value.
  2380. func (s *Tag) SetKey(v string) *Tag {
  2381. s.Key = &v
  2382. return s
  2383. }
  2384. // SetValue sets the Value field's value.
  2385. func (s *Tag) SetValue(v string) *Tag {
  2386. s.Value = &v
  2387. return s
  2388. }
  2389. type UpdateFileSystemInput struct {
  2390. _ struct{} `type:"structure"`
  2391. // The ID of the file system that you want to update.
  2392. //
  2393. // FileSystemId is a required field
  2394. FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
  2395. // (Optional) The amount of throughput, in MiB/s, that you want to provision
  2396. // for your file system. If you're not updating the amount of provisioned throughput
  2397. // for your file system, you don't need to provide this value in your request.
  2398. ProvisionedThroughputInMibps *float64 `type:"double"`
  2399. // (Optional) The throughput mode that you want your file system to use. If
  2400. // you're not updating your throughput mode, you don't need to provide this
  2401. // value in your request.
  2402. ThroughputMode *string `type:"string" enum:"ThroughputMode"`
  2403. }
  2404. // String returns the string representation
  2405. func (s UpdateFileSystemInput) String() string {
  2406. return awsutil.Prettify(s)
  2407. }
  2408. // GoString returns the string representation
  2409. func (s UpdateFileSystemInput) GoString() string {
  2410. return s.String()
  2411. }
  2412. // Validate inspects the fields of the type to determine if they are valid.
  2413. func (s *UpdateFileSystemInput) Validate() error {
  2414. invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"}
  2415. if s.FileSystemId == nil {
  2416. invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
  2417. }
  2418. if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
  2419. invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
  2420. }
  2421. if invalidParams.Len() > 0 {
  2422. return invalidParams
  2423. }
  2424. return nil
  2425. }
  2426. // SetFileSystemId sets the FileSystemId field's value.
  2427. func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput {
  2428. s.FileSystemId = &v
  2429. return s
  2430. }
  2431. // SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
  2432. func (s *UpdateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemInput {
  2433. s.ProvisionedThroughputInMibps = &v
  2434. return s
  2435. }
  2436. // SetThroughputMode sets the ThroughputMode field's value.
  2437. func (s *UpdateFileSystemInput) SetThroughputMode(v string) *UpdateFileSystemInput {
  2438. s.ThroughputMode = &v
  2439. return s
  2440. }
  2441. // Description of the file system.
  2442. type UpdateFileSystemOutput struct {
  2443. _ struct{} `type:"structure"`
  2444. // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).
  2445. //
  2446. // CreationTime is a required field
  2447. CreationTime *time.Time `type:"timestamp" required:"true"`
  2448. // Opaque string specified in the request.
  2449. //
  2450. // CreationToken is a required field
  2451. CreationToken *string `min:"1" type:"string" required:"true"`
  2452. // A Boolean value that, if true, indicates that the file system is encrypted.
  2453. Encrypted *bool `type:"boolean"`
  2454. // ID of the file system, assigned by Amazon EFS.
  2455. //
  2456. // FileSystemId is a required field
  2457. FileSystemId *string `type:"string" required:"true"`
  2458. // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK)
  2459. // that was used to protect the encrypted file system.
  2460. KmsKeyId *string `min:"1" type:"string"`
  2461. // Lifecycle phase of the file system.
  2462. //
  2463. // LifeCycleState is a required field
  2464. LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
  2465. // You can add tags to a file system, including a Name tag. For more information,
  2466. // see CreateTags. If the file system has a Name tag, Amazon EFS returns the
  2467. // value in this field.
  2468. Name *string `type:"string"`
  2469. // Current number of mount targets that the file system has. For more information,
  2470. // see CreateMountTarget.
  2471. //
  2472. // NumberOfMountTargets is a required field
  2473. NumberOfMountTargets *int64 `type:"integer" required:"true"`
  2474. // AWS account that created the file system. If the file system was created
  2475. // by an IAM user, the parent account to which the user belongs is the owner.
  2476. //
  2477. // OwnerId is a required field
  2478. OwnerId *string `type:"string" required:"true"`
  2479. // The PerformanceMode of the file system.
  2480. //
  2481. // PerformanceMode is a required field
  2482. PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"`
  2483. // The throughput, measured in MiB/s, that you want to provision for a file
  2484. // system. The limit on throughput is 1024 MiB/s. You can get these limits increased
  2485. // by contacting AWS Support. For more information, see Amazon EFS Limits That
  2486. // You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits)
  2487. // in the Amazon EFS User Guide.
  2488. ProvisionedThroughputInMibps *float64 `type:"double"`
  2489. // Latest known metered size (in bytes) of data stored in the file system, in
  2490. // its Value field, and the time at which that size was determined in its Timestamp
  2491. // field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z.
  2492. // The SizeInBytes value doesn't represent the size of a consistent snapshot
  2493. // of the file system, but it is eventually consistent when there are no writes
  2494. // to the file system. That is, SizeInBytes represents actual size only if the
  2495. // file system is not modified for a period longer than a couple of hours. Otherwise,
  2496. // the value is not the exact size that the file system was at any point in
  2497. // time.
  2498. //
  2499. // SizeInBytes is a required field
  2500. SizeInBytes *FileSystemSize `type:"structure" required:"true"`
  2501. // The throughput mode for a file system. There are two throughput modes to
  2502. // choose from for your file system: bursting and provisioned. You can decrease
  2503. // your file system's throughput in Provisioned Throughput mode or change between
  2504. // the throughput modes as long as it’s been more than 24 hours since the last
  2505. // decrease or throughput mode change.
  2506. ThroughputMode *string `type:"string" enum:"ThroughputMode"`
  2507. }
  2508. // String returns the string representation
  2509. func (s UpdateFileSystemOutput) String() string {
  2510. return awsutil.Prettify(s)
  2511. }
  2512. // GoString returns the string representation
  2513. func (s UpdateFileSystemOutput) GoString() string {
  2514. return s.String()
  2515. }
  2516. // SetCreationTime sets the CreationTime field's value.
  2517. func (s *UpdateFileSystemOutput) SetCreationTime(v time.Time) *UpdateFileSystemOutput {
  2518. s.CreationTime = &v
  2519. return s
  2520. }
  2521. // SetCreationToken sets the CreationToken field's value.
  2522. func (s *UpdateFileSystemOutput) SetCreationToken(v string) *UpdateFileSystemOutput {
  2523. s.CreationToken = &v
  2524. return s
  2525. }
  2526. // SetEncrypted sets the Encrypted field's value.
  2527. func (s *UpdateFileSystemOutput) SetEncrypted(v bool) *UpdateFileSystemOutput {
  2528. s.Encrypted = &v
  2529. return s
  2530. }
  2531. // SetFileSystemId sets the FileSystemId field's value.
  2532. func (s *UpdateFileSystemOutput) SetFileSystemId(v string) *UpdateFileSystemOutput {
  2533. s.FileSystemId = &v
  2534. return s
  2535. }
  2536. // SetKmsKeyId sets the KmsKeyId field's value.
  2537. func (s *UpdateFileSystemOutput) SetKmsKeyId(v string) *UpdateFileSystemOutput {
  2538. s.KmsKeyId = &v
  2539. return s
  2540. }
  2541. // SetLifeCycleState sets the LifeCycleState field's value.
  2542. func (s *UpdateFileSystemOutput) SetLifeCycleState(v string) *UpdateFileSystemOutput {
  2543. s.LifeCycleState = &v
  2544. return s
  2545. }
  2546. // SetName sets the Name field's value.
  2547. func (s *UpdateFileSystemOutput) SetName(v string) *UpdateFileSystemOutput {
  2548. s.Name = &v
  2549. return s
  2550. }
  2551. // SetNumberOfMountTargets sets the NumberOfMountTargets field's value.
  2552. func (s *UpdateFileSystemOutput) SetNumberOfMountTargets(v int64) *UpdateFileSystemOutput {
  2553. s.NumberOfMountTargets = &v
  2554. return s
  2555. }
  2556. // SetOwnerId sets the OwnerId field's value.
  2557. func (s *UpdateFileSystemOutput) SetOwnerId(v string) *UpdateFileSystemOutput {
  2558. s.OwnerId = &v
  2559. return s
  2560. }
  2561. // SetPerformanceMode sets the PerformanceMode field's value.
  2562. func (s *UpdateFileSystemOutput) SetPerformanceMode(v string) *UpdateFileSystemOutput {
  2563. s.PerformanceMode = &v
  2564. return s
  2565. }
  2566. // SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
  2567. func (s *UpdateFileSystemOutput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemOutput {
  2568. s.ProvisionedThroughputInMibps = &v
  2569. return s
  2570. }
  2571. // SetSizeInBytes sets the SizeInBytes field's value.
  2572. func (s *UpdateFileSystemOutput) SetSizeInBytes(v *FileSystemSize) *UpdateFileSystemOutput {
  2573. s.SizeInBytes = v
  2574. return s
  2575. }
  2576. // SetThroughputMode sets the ThroughputMode field's value.
  2577. func (s *UpdateFileSystemOutput) SetThroughputMode(v string) *UpdateFileSystemOutput {
  2578. s.ThroughputMode = &v
  2579. return s
  2580. }
  2581. const (
  2582. // LifeCycleStateCreating is a LifeCycleState enum value
  2583. LifeCycleStateCreating = "creating"
  2584. // LifeCycleStateAvailable is a LifeCycleState enum value
  2585. LifeCycleStateAvailable = "available"
  2586. // LifeCycleStateUpdating is a LifeCycleState enum value
  2587. LifeCycleStateUpdating = "updating"
  2588. // LifeCycleStateDeleting is a LifeCycleState enum value
  2589. LifeCycleStateDeleting = "deleting"
  2590. // LifeCycleStateDeleted is a LifeCycleState enum value
  2591. LifeCycleStateDeleted = "deleted"
  2592. )
  2593. const (
  2594. // PerformanceModeGeneralPurpose is a PerformanceMode enum value
  2595. PerformanceModeGeneralPurpose = "generalPurpose"
  2596. // PerformanceModeMaxIo is a PerformanceMode enum value
  2597. PerformanceModeMaxIo = "maxIO"
  2598. )
  2599. const (
  2600. // ThroughputModeBursting is a ThroughputMode enum value
  2601. ThroughputModeBursting = "bursting"
  2602. // ThroughputModeProvisioned is a ThroughputMode enum value
  2603. ThroughputModeProvisioned = "provisioned"
  2604. )