api.go 128 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package transfer
  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/jsonrpc"
  11. )
  12. const opCreateServer = "CreateServer"
  13. // CreateServerRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateServer 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 CreateServer for more information on using the CreateServer
  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 CreateServerRequest method.
  29. // req, resp := client.CreateServerRequest(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/transfer-2018-11-05/CreateServer
  37. func (c *Transfer) CreateServerRequest(input *CreateServerInput) (req *request.Request, output *CreateServerOutput) {
  38. op := &request.Operation{
  39. Name: opCreateServer,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &CreateServerInput{}
  45. }
  46. output = &CreateServerOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateServer API operation for AWS Transfer for SFTP.
  51. //
  52. // Instantiates an autoscaling virtual server based on Secure File Transfer
  53. // Protocol (SFTP) in AWS. The call returns the ServerId property assigned by
  54. // the service to the newly created server. Reference this ServerId property
  55. // when you make updates to your server, or work with users.
  56. //
  57. // The response returns the ServerId value for the newly created server.
  58. //
  59. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  60. // with awserr.Error's Code and Message methods to get detailed information about
  61. // the error.
  62. //
  63. // See the AWS API reference guide for AWS Transfer for SFTP's
  64. // API operation CreateServer for usage and error information.
  65. //
  66. // Returned Error Codes:
  67. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  68. // The request has failed because the AWS Transfer for SFTP service is not available.
  69. //
  70. // * ErrCodeInternalServiceError "InternalServiceError"
  71. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  72. // service.
  73. //
  74. // * ErrCodeInvalidRequestException "InvalidRequestException"
  75. // This exception is thrown when the client submits a malformed request.
  76. //
  77. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer
  78. func (c *Transfer) CreateServer(input *CreateServerInput) (*CreateServerOutput, error) {
  79. req, out := c.CreateServerRequest(input)
  80. return out, req.Send()
  81. }
  82. // CreateServerWithContext is the same as CreateServer with the addition of
  83. // the ability to pass a context and additional request options.
  84. //
  85. // See CreateServer for details on how to use this API operation.
  86. //
  87. // The context must be non-nil and will be used for request cancellation. If
  88. // the context is nil a panic will occur. In the future the SDK may create
  89. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  90. // for more information on using Contexts.
  91. func (c *Transfer) CreateServerWithContext(ctx aws.Context, input *CreateServerInput, opts ...request.Option) (*CreateServerOutput, error) {
  92. req, out := c.CreateServerRequest(input)
  93. req.SetContext(ctx)
  94. req.ApplyOptions(opts...)
  95. return out, req.Send()
  96. }
  97. const opCreateUser = "CreateUser"
  98. // CreateUserRequest generates a "aws/request.Request" representing the
  99. // client's request for the CreateUser operation. The "output" return
  100. // value will be populated with the request's response once the request completes
  101. // successfully.
  102. //
  103. // Use "Send" method on the returned Request to send the API call to the service.
  104. // the "output" return value is not valid until after Send returns without error.
  105. //
  106. // See CreateUser for more information on using the CreateUser
  107. // API call, and error handling.
  108. //
  109. // This method is useful when you want to inject custom logic or configuration
  110. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  111. //
  112. //
  113. // // Example sending a request using the CreateUserRequest method.
  114. // req, resp := client.CreateUserRequest(params)
  115. //
  116. // err := req.Send()
  117. // if err == nil { // resp is now filled
  118. // fmt.Println(resp)
  119. // }
  120. //
  121. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser
  122. func (c *Transfer) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) {
  123. op := &request.Operation{
  124. Name: opCreateUser,
  125. HTTPMethod: "POST",
  126. HTTPPath: "/",
  127. }
  128. if input == nil {
  129. input = &CreateUserInput{}
  130. }
  131. output = &CreateUserOutput{}
  132. req = c.newRequest(op, input, output)
  133. return
  134. }
  135. // CreateUser API operation for AWS Transfer for SFTP.
  136. //
  137. // Adds a user and associate them with an existing Secure File Transfer Protocol
  138. // (SFTP) server. Using parameters for CreateUser, you can specify the user
  139. // name, set the home directory, store the user's public key, and assign the
  140. // user's AWS Identity and Access Management (IAM) role. You can also optionally
  141. // add a scope-down policy, and assign metadata with tags that can be used to
  142. // group and search for users.
  143. //
  144. // The response returns the UserName and ServerId values of the new user for
  145. // that server.
  146. //
  147. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  148. // with awserr.Error's Code and Message methods to get detailed information about
  149. // the error.
  150. //
  151. // See the AWS API reference guide for AWS Transfer for SFTP's
  152. // API operation CreateUser for usage and error information.
  153. //
  154. // Returned Error Codes:
  155. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  156. // The request has failed because the AWS Transfer for SFTP service is not available.
  157. //
  158. // * ErrCodeInternalServiceError "InternalServiceError"
  159. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  160. // service.
  161. //
  162. // * ErrCodeInvalidRequestException "InvalidRequestException"
  163. // This exception is thrown when the client submits a malformed request.
  164. //
  165. // * ErrCodeResourceExistsException "ResourceExistsException"
  166. // The requested resource does not exist.
  167. //
  168. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  169. // This exception is thrown when a resource is not found by the AWS Transfer
  170. // for SFTP service.
  171. //
  172. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser
  173. func (c *Transfer) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) {
  174. req, out := c.CreateUserRequest(input)
  175. return out, req.Send()
  176. }
  177. // CreateUserWithContext is the same as CreateUser with the addition of
  178. // the ability to pass a context and additional request options.
  179. //
  180. // See CreateUser for details on how to use this API operation.
  181. //
  182. // The context must be non-nil and will be used for request cancellation. If
  183. // the context is nil a panic will occur. In the future the SDK may create
  184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  185. // for more information on using Contexts.
  186. func (c *Transfer) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) {
  187. req, out := c.CreateUserRequest(input)
  188. req.SetContext(ctx)
  189. req.ApplyOptions(opts...)
  190. return out, req.Send()
  191. }
  192. const opDeleteServer = "DeleteServer"
  193. // DeleteServerRequest generates a "aws/request.Request" representing the
  194. // client's request for the DeleteServer operation. The "output" return
  195. // value will be populated with the request's response once the request completes
  196. // successfully.
  197. //
  198. // Use "Send" method on the returned Request to send the API call to the service.
  199. // the "output" return value is not valid until after Send returns without error.
  200. //
  201. // See DeleteServer for more information on using the DeleteServer
  202. // API call, and error handling.
  203. //
  204. // This method is useful when you want to inject custom logic or configuration
  205. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  206. //
  207. //
  208. // // Example sending a request using the DeleteServerRequest method.
  209. // req, resp := client.DeleteServerRequest(params)
  210. //
  211. // err := req.Send()
  212. // if err == nil { // resp is now filled
  213. // fmt.Println(resp)
  214. // }
  215. //
  216. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer
  217. func (c *Transfer) DeleteServerRequest(input *DeleteServerInput) (req *request.Request, output *DeleteServerOutput) {
  218. op := &request.Operation{
  219. Name: opDeleteServer,
  220. HTTPMethod: "POST",
  221. HTTPPath: "/",
  222. }
  223. if input == nil {
  224. input = &DeleteServerInput{}
  225. }
  226. output = &DeleteServerOutput{}
  227. req = c.newRequest(op, input, output)
  228. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  229. return
  230. }
  231. // DeleteServer API operation for AWS Transfer for SFTP.
  232. //
  233. // Deletes the Secure File Transfer Protocol (SFTP) server that you specify.
  234. // If you used SERVICE_MANAGED as your IdentityProviderType, you need to delete
  235. // all users associated with this server before deleting the server itself
  236. //
  237. // No response returns from this call.
  238. //
  239. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  240. // with awserr.Error's Code and Message methods to get detailed information about
  241. // the error.
  242. //
  243. // See the AWS API reference guide for AWS Transfer for SFTP's
  244. // API operation DeleteServer for usage and error information.
  245. //
  246. // Returned Error Codes:
  247. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  248. // The request has failed because the AWS Transfer for SFTP service is not available.
  249. //
  250. // * ErrCodeInternalServiceError "InternalServiceError"
  251. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  252. // service.
  253. //
  254. // * ErrCodeInvalidRequestException "InvalidRequestException"
  255. // This exception is thrown when the client submits a malformed request.
  256. //
  257. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  258. // This exception is thrown when a resource is not found by the AWS Transfer
  259. // for SFTP service.
  260. //
  261. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer
  262. func (c *Transfer) DeleteServer(input *DeleteServerInput) (*DeleteServerOutput, error) {
  263. req, out := c.DeleteServerRequest(input)
  264. return out, req.Send()
  265. }
  266. // DeleteServerWithContext is the same as DeleteServer with the addition of
  267. // the ability to pass a context and additional request options.
  268. //
  269. // See DeleteServer for details on how to use this API operation.
  270. //
  271. // The context must be non-nil and will be used for request cancellation. If
  272. // the context is nil a panic will occur. In the future the SDK may create
  273. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  274. // for more information on using Contexts.
  275. func (c *Transfer) DeleteServerWithContext(ctx aws.Context, input *DeleteServerInput, opts ...request.Option) (*DeleteServerOutput, error) {
  276. req, out := c.DeleteServerRequest(input)
  277. req.SetContext(ctx)
  278. req.ApplyOptions(opts...)
  279. return out, req.Send()
  280. }
  281. const opDeleteSshPublicKey = "DeleteSshPublicKey"
  282. // DeleteSshPublicKeyRequest generates a "aws/request.Request" representing the
  283. // client's request for the DeleteSshPublicKey operation. The "output" return
  284. // value will be populated with the request's response once the request completes
  285. // successfully.
  286. //
  287. // Use "Send" method on the returned Request to send the API call to the service.
  288. // the "output" return value is not valid until after Send returns without error.
  289. //
  290. // See DeleteSshPublicKey for more information on using the DeleteSshPublicKey
  291. // API call, and error handling.
  292. //
  293. // This method is useful when you want to inject custom logic or configuration
  294. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  295. //
  296. //
  297. // // Example sending a request using the DeleteSshPublicKeyRequest method.
  298. // req, resp := client.DeleteSshPublicKeyRequest(params)
  299. //
  300. // err := req.Send()
  301. // if err == nil { // resp is now filled
  302. // fmt.Println(resp)
  303. // }
  304. //
  305. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey
  306. func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (req *request.Request, output *DeleteSshPublicKeyOutput) {
  307. op := &request.Operation{
  308. Name: opDeleteSshPublicKey,
  309. HTTPMethod: "POST",
  310. HTTPPath: "/",
  311. }
  312. if input == nil {
  313. input = &DeleteSshPublicKeyInput{}
  314. }
  315. output = &DeleteSshPublicKeyOutput{}
  316. req = c.newRequest(op, input, output)
  317. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  318. return
  319. }
  320. // DeleteSshPublicKey API operation for AWS Transfer for SFTP.
  321. //
  322. // Deletes a user's Secure Shell (SSH) public key.
  323. //
  324. // No response is returned from this call.
  325. //
  326. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  327. // with awserr.Error's Code and Message methods to get detailed information about
  328. // the error.
  329. //
  330. // See the AWS API reference guide for AWS Transfer for SFTP's
  331. // API operation DeleteSshPublicKey for usage and error information.
  332. //
  333. // Returned Error Codes:
  334. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  335. // The request has failed because the AWS Transfer for SFTP service is not available.
  336. //
  337. // * ErrCodeInternalServiceError "InternalServiceError"
  338. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  339. // service.
  340. //
  341. // * ErrCodeInvalidRequestException "InvalidRequestException"
  342. // This exception is thrown when the client submits a malformed request.
  343. //
  344. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  345. // This exception is thrown when a resource is not found by the AWS Transfer
  346. // for SFTP service.
  347. //
  348. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey
  349. func (c *Transfer) DeleteSshPublicKey(input *DeleteSshPublicKeyInput) (*DeleteSshPublicKeyOutput, error) {
  350. req, out := c.DeleteSshPublicKeyRequest(input)
  351. return out, req.Send()
  352. }
  353. // DeleteSshPublicKeyWithContext is the same as DeleteSshPublicKey with the addition of
  354. // the ability to pass a context and additional request options.
  355. //
  356. // See DeleteSshPublicKey for details on how to use this API operation.
  357. //
  358. // The context must be non-nil and will be used for request cancellation. If
  359. // the context is nil a panic will occur. In the future the SDK may create
  360. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  361. // for more information on using Contexts.
  362. func (c *Transfer) DeleteSshPublicKeyWithContext(ctx aws.Context, input *DeleteSshPublicKeyInput, opts ...request.Option) (*DeleteSshPublicKeyOutput, error) {
  363. req, out := c.DeleteSshPublicKeyRequest(input)
  364. req.SetContext(ctx)
  365. req.ApplyOptions(opts...)
  366. return out, req.Send()
  367. }
  368. const opDeleteUser = "DeleteUser"
  369. // DeleteUserRequest generates a "aws/request.Request" representing the
  370. // client's request for the DeleteUser operation. The "output" return
  371. // value will be populated with the request's response once the request completes
  372. // successfully.
  373. //
  374. // Use "Send" method on the returned Request to send the API call to the service.
  375. // the "output" return value is not valid until after Send returns without error.
  376. //
  377. // See DeleteUser for more information on using the DeleteUser
  378. // API call, and error handling.
  379. //
  380. // This method is useful when you want to inject custom logic or configuration
  381. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  382. //
  383. //
  384. // // Example sending a request using the DeleteUserRequest method.
  385. // req, resp := client.DeleteUserRequest(params)
  386. //
  387. // err := req.Send()
  388. // if err == nil { // resp is now filled
  389. // fmt.Println(resp)
  390. // }
  391. //
  392. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser
  393. func (c *Transfer) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) {
  394. op := &request.Operation{
  395. Name: opDeleteUser,
  396. HTTPMethod: "POST",
  397. HTTPPath: "/",
  398. }
  399. if input == nil {
  400. input = &DeleteUserInput{}
  401. }
  402. output = &DeleteUserOutput{}
  403. req = c.newRequest(op, input, output)
  404. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  405. return
  406. }
  407. // DeleteUser API operation for AWS Transfer for SFTP.
  408. //
  409. // Deletes the user belonging to the server you specify.
  410. //
  411. // No response returns from this call.
  412. //
  413. // When you delete a user from a server, the user's information is lost.
  414. //
  415. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  416. // with awserr.Error's Code and Message methods to get detailed information about
  417. // the error.
  418. //
  419. // See the AWS API reference guide for AWS Transfer for SFTP's
  420. // API operation DeleteUser for usage and error information.
  421. //
  422. // Returned Error Codes:
  423. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  424. // The request has failed because the AWS Transfer for SFTP service is not available.
  425. //
  426. // * ErrCodeInternalServiceError "InternalServiceError"
  427. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  428. // service.
  429. //
  430. // * ErrCodeInvalidRequestException "InvalidRequestException"
  431. // This exception is thrown when the client submits a malformed request.
  432. //
  433. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  434. // This exception is thrown when a resource is not found by the AWS Transfer
  435. // for SFTP service.
  436. //
  437. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser
  438. func (c *Transfer) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) {
  439. req, out := c.DeleteUserRequest(input)
  440. return out, req.Send()
  441. }
  442. // DeleteUserWithContext is the same as DeleteUser with the addition of
  443. // the ability to pass a context and additional request options.
  444. //
  445. // See DeleteUser for details on how to use this API operation.
  446. //
  447. // The context must be non-nil and will be used for request cancellation. If
  448. // the context is nil a panic will occur. In the future the SDK may create
  449. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  450. // for more information on using Contexts.
  451. func (c *Transfer) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) {
  452. req, out := c.DeleteUserRequest(input)
  453. req.SetContext(ctx)
  454. req.ApplyOptions(opts...)
  455. return out, req.Send()
  456. }
  457. const opDescribeServer = "DescribeServer"
  458. // DescribeServerRequest generates a "aws/request.Request" representing the
  459. // client's request for the DescribeServer operation. The "output" return
  460. // value will be populated with the request's response once the request completes
  461. // successfully.
  462. //
  463. // Use "Send" method on the returned Request to send the API call to the service.
  464. // the "output" return value is not valid until after Send returns without error.
  465. //
  466. // See DescribeServer for more information on using the DescribeServer
  467. // API call, and error handling.
  468. //
  469. // This method is useful when you want to inject custom logic or configuration
  470. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  471. //
  472. //
  473. // // Example sending a request using the DescribeServerRequest method.
  474. // req, resp := client.DescribeServerRequest(params)
  475. //
  476. // err := req.Send()
  477. // if err == nil { // resp is now filled
  478. // fmt.Println(resp)
  479. // }
  480. //
  481. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer
  482. func (c *Transfer) DescribeServerRequest(input *DescribeServerInput) (req *request.Request, output *DescribeServerOutput) {
  483. op := &request.Operation{
  484. Name: opDescribeServer,
  485. HTTPMethod: "POST",
  486. HTTPPath: "/",
  487. }
  488. if input == nil {
  489. input = &DescribeServerInput{}
  490. }
  491. output = &DescribeServerOutput{}
  492. req = c.newRequest(op, input, output)
  493. return
  494. }
  495. // DescribeServer API operation for AWS Transfer for SFTP.
  496. //
  497. // Describes the server that you specify by passing the ServerId parameter.
  498. //
  499. // The response contains a description of the server's properties.
  500. //
  501. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  502. // with awserr.Error's Code and Message methods to get detailed information about
  503. // the error.
  504. //
  505. // See the AWS API reference guide for AWS Transfer for SFTP's
  506. // API operation DescribeServer for usage and error information.
  507. //
  508. // Returned Error Codes:
  509. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  510. // The request has failed because the AWS Transfer for SFTP service is not available.
  511. //
  512. // * ErrCodeInternalServiceError "InternalServiceError"
  513. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  514. // service.
  515. //
  516. // * ErrCodeInvalidRequestException "InvalidRequestException"
  517. // This exception is thrown when the client submits a malformed request.
  518. //
  519. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  520. // This exception is thrown when a resource is not found by the AWS Transfer
  521. // for SFTP service.
  522. //
  523. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer
  524. func (c *Transfer) DescribeServer(input *DescribeServerInput) (*DescribeServerOutput, error) {
  525. req, out := c.DescribeServerRequest(input)
  526. return out, req.Send()
  527. }
  528. // DescribeServerWithContext is the same as DescribeServer with the addition of
  529. // the ability to pass a context and additional request options.
  530. //
  531. // See DescribeServer for details on how to use this API operation.
  532. //
  533. // The context must be non-nil and will be used for request cancellation. If
  534. // the context is nil a panic will occur. In the future the SDK may create
  535. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  536. // for more information on using Contexts.
  537. func (c *Transfer) DescribeServerWithContext(ctx aws.Context, input *DescribeServerInput, opts ...request.Option) (*DescribeServerOutput, error) {
  538. req, out := c.DescribeServerRequest(input)
  539. req.SetContext(ctx)
  540. req.ApplyOptions(opts...)
  541. return out, req.Send()
  542. }
  543. const opDescribeUser = "DescribeUser"
  544. // DescribeUserRequest generates a "aws/request.Request" representing the
  545. // client's request for the DescribeUser operation. The "output" return
  546. // value will be populated with the request's response once the request completes
  547. // successfully.
  548. //
  549. // Use "Send" method on the returned Request to send the API call to the service.
  550. // the "output" return value is not valid until after Send returns without error.
  551. //
  552. // See DescribeUser for more information on using the DescribeUser
  553. // API call, and error handling.
  554. //
  555. // This method is useful when you want to inject custom logic or configuration
  556. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  557. //
  558. //
  559. // // Example sending a request using the DescribeUserRequest method.
  560. // req, resp := client.DescribeUserRequest(params)
  561. //
  562. // err := req.Send()
  563. // if err == nil { // resp is now filled
  564. // fmt.Println(resp)
  565. // }
  566. //
  567. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser
  568. func (c *Transfer) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserOutput) {
  569. op := &request.Operation{
  570. Name: opDescribeUser,
  571. HTTPMethod: "POST",
  572. HTTPPath: "/",
  573. }
  574. if input == nil {
  575. input = &DescribeUserInput{}
  576. }
  577. output = &DescribeUserOutput{}
  578. req = c.newRequest(op, input, output)
  579. return
  580. }
  581. // DescribeUser API operation for AWS Transfer for SFTP.
  582. //
  583. // Describes the user assigned to a specific server, as identified by its ServerId
  584. // property.
  585. //
  586. // The response from this call returns the properties of the user associated
  587. // with the ServerId value that was specified.
  588. //
  589. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  590. // with awserr.Error's Code and Message methods to get detailed information about
  591. // the error.
  592. //
  593. // See the AWS API reference guide for AWS Transfer for SFTP's
  594. // API operation DescribeUser for usage and error information.
  595. //
  596. // Returned Error Codes:
  597. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  598. // The request has failed because the AWS Transfer for SFTP service is not available.
  599. //
  600. // * ErrCodeInternalServiceError "InternalServiceError"
  601. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  602. // service.
  603. //
  604. // * ErrCodeInvalidRequestException "InvalidRequestException"
  605. // This exception is thrown when the client submits a malformed request.
  606. //
  607. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  608. // This exception is thrown when a resource is not found by the AWS Transfer
  609. // for SFTP service.
  610. //
  611. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser
  612. func (c *Transfer) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) {
  613. req, out := c.DescribeUserRequest(input)
  614. return out, req.Send()
  615. }
  616. // DescribeUserWithContext is the same as DescribeUser with the addition of
  617. // the ability to pass a context and additional request options.
  618. //
  619. // See DescribeUser for details on how to use this API operation.
  620. //
  621. // The context must be non-nil and will be used for request cancellation. If
  622. // the context is nil a panic will occur. In the future the SDK may create
  623. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  624. // for more information on using Contexts.
  625. func (c *Transfer) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserOutput, error) {
  626. req, out := c.DescribeUserRequest(input)
  627. req.SetContext(ctx)
  628. req.ApplyOptions(opts...)
  629. return out, req.Send()
  630. }
  631. const opImportSshPublicKey = "ImportSshPublicKey"
  632. // ImportSshPublicKeyRequest generates a "aws/request.Request" representing the
  633. // client's request for the ImportSshPublicKey operation. The "output" return
  634. // value will be populated with the request's response once the request completes
  635. // successfully.
  636. //
  637. // Use "Send" method on the returned Request to send the API call to the service.
  638. // the "output" return value is not valid until after Send returns without error.
  639. //
  640. // See ImportSshPublicKey for more information on using the ImportSshPublicKey
  641. // API call, and error handling.
  642. //
  643. // This method is useful when you want to inject custom logic or configuration
  644. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  645. //
  646. //
  647. // // Example sending a request using the ImportSshPublicKeyRequest method.
  648. // req, resp := client.ImportSshPublicKeyRequest(params)
  649. //
  650. // err := req.Send()
  651. // if err == nil { // resp is now filled
  652. // fmt.Println(resp)
  653. // }
  654. //
  655. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey
  656. func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (req *request.Request, output *ImportSshPublicKeyOutput) {
  657. op := &request.Operation{
  658. Name: opImportSshPublicKey,
  659. HTTPMethod: "POST",
  660. HTTPPath: "/",
  661. }
  662. if input == nil {
  663. input = &ImportSshPublicKeyInput{}
  664. }
  665. output = &ImportSshPublicKeyOutput{}
  666. req = c.newRequest(op, input, output)
  667. return
  668. }
  669. // ImportSshPublicKey API operation for AWS Transfer for SFTP.
  670. //
  671. // Adds a Secure Shell (SSH) public key to a user account identified by a UserName
  672. // value assigned to a specific server, identified by ServerId.
  673. //
  674. // The response returns the UserName value, the ServerId value, and the name
  675. // of the SshPublicKeyId.
  676. //
  677. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  678. // with awserr.Error's Code and Message methods to get detailed information about
  679. // the error.
  680. //
  681. // See the AWS API reference guide for AWS Transfer for SFTP's
  682. // API operation ImportSshPublicKey for usage and error information.
  683. //
  684. // Returned Error Codes:
  685. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  686. // The request has failed because the AWS Transfer for SFTP service is not available.
  687. //
  688. // * ErrCodeInternalServiceError "InternalServiceError"
  689. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  690. // service.
  691. //
  692. // * ErrCodeInvalidRequestException "InvalidRequestException"
  693. // This exception is thrown when the client submits a malformed request.
  694. //
  695. // * ErrCodeResourceExistsException "ResourceExistsException"
  696. // The requested resource does not exist.
  697. //
  698. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  699. // This exception is thrown when a resource is not found by the AWS Transfer
  700. // for SFTP service.
  701. //
  702. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey
  703. func (c *Transfer) ImportSshPublicKey(input *ImportSshPublicKeyInput) (*ImportSshPublicKeyOutput, error) {
  704. req, out := c.ImportSshPublicKeyRequest(input)
  705. return out, req.Send()
  706. }
  707. // ImportSshPublicKeyWithContext is the same as ImportSshPublicKey with the addition of
  708. // the ability to pass a context and additional request options.
  709. //
  710. // See ImportSshPublicKey for details on how to use this API operation.
  711. //
  712. // The context must be non-nil and will be used for request cancellation. If
  713. // the context is nil a panic will occur. In the future the SDK may create
  714. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  715. // for more information on using Contexts.
  716. func (c *Transfer) ImportSshPublicKeyWithContext(ctx aws.Context, input *ImportSshPublicKeyInput, opts ...request.Option) (*ImportSshPublicKeyOutput, error) {
  717. req, out := c.ImportSshPublicKeyRequest(input)
  718. req.SetContext(ctx)
  719. req.ApplyOptions(opts...)
  720. return out, req.Send()
  721. }
  722. const opListServers = "ListServers"
  723. // ListServersRequest generates a "aws/request.Request" representing the
  724. // client's request for the ListServers operation. The "output" return
  725. // value will be populated with the request's response once the request completes
  726. // successfully.
  727. //
  728. // Use "Send" method on the returned Request to send the API call to the service.
  729. // the "output" return value is not valid until after Send returns without error.
  730. //
  731. // See ListServers for more information on using the ListServers
  732. // API call, and error handling.
  733. //
  734. // This method is useful when you want to inject custom logic or configuration
  735. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  736. //
  737. //
  738. // // Example sending a request using the ListServersRequest method.
  739. // req, resp := client.ListServersRequest(params)
  740. //
  741. // err := req.Send()
  742. // if err == nil { // resp is now filled
  743. // fmt.Println(resp)
  744. // }
  745. //
  746. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers
  747. func (c *Transfer) ListServersRequest(input *ListServersInput) (req *request.Request, output *ListServersOutput) {
  748. op := &request.Operation{
  749. Name: opListServers,
  750. HTTPMethod: "POST",
  751. HTTPPath: "/",
  752. }
  753. if input == nil {
  754. input = &ListServersInput{}
  755. }
  756. output = &ListServersOutput{}
  757. req = c.newRequest(op, input, output)
  758. return
  759. }
  760. // ListServers API operation for AWS Transfer for SFTP.
  761. //
  762. // Lists the Secure File Transfer Protocol (SFTP) servers that are associated
  763. // with your AWS account.
  764. //
  765. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  766. // with awserr.Error's Code and Message methods to get detailed information about
  767. // the error.
  768. //
  769. // See the AWS API reference guide for AWS Transfer for SFTP's
  770. // API operation ListServers for usage and error information.
  771. //
  772. // Returned Error Codes:
  773. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  774. // The request has failed because the AWS Transfer for SFTP service is not available.
  775. //
  776. // * ErrCodeInternalServiceError "InternalServiceError"
  777. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  778. // service.
  779. //
  780. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  781. // The NextToken parameter that was passed is invalid.
  782. //
  783. // * ErrCodeInvalidRequestException "InvalidRequestException"
  784. // This exception is thrown when the client submits a malformed request.
  785. //
  786. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers
  787. func (c *Transfer) ListServers(input *ListServersInput) (*ListServersOutput, error) {
  788. req, out := c.ListServersRequest(input)
  789. return out, req.Send()
  790. }
  791. // ListServersWithContext is the same as ListServers with the addition of
  792. // the ability to pass a context and additional request options.
  793. //
  794. // See ListServers for details on how to use this API operation.
  795. //
  796. // The context must be non-nil and will be used for request cancellation. If
  797. // the context is nil a panic will occur. In the future the SDK may create
  798. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  799. // for more information on using Contexts.
  800. func (c *Transfer) ListServersWithContext(ctx aws.Context, input *ListServersInput, opts ...request.Option) (*ListServersOutput, error) {
  801. req, out := c.ListServersRequest(input)
  802. req.SetContext(ctx)
  803. req.ApplyOptions(opts...)
  804. return out, req.Send()
  805. }
  806. const opListTagsForResource = "ListTagsForResource"
  807. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  808. // client's request for the ListTagsForResource operation. The "output" return
  809. // value will be populated with the request's response once the request completes
  810. // successfully.
  811. //
  812. // Use "Send" method on the returned Request to send the API call to the service.
  813. // the "output" return value is not valid until after Send returns without error.
  814. //
  815. // See ListTagsForResource for more information on using the ListTagsForResource
  816. // API call, and error handling.
  817. //
  818. // This method is useful when you want to inject custom logic or configuration
  819. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  820. //
  821. //
  822. // // Example sending a request using the ListTagsForResourceRequest method.
  823. // req, resp := client.ListTagsForResourceRequest(params)
  824. //
  825. // err := req.Send()
  826. // if err == nil { // resp is now filled
  827. // fmt.Println(resp)
  828. // }
  829. //
  830. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource
  831. func (c *Transfer) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  832. op := &request.Operation{
  833. Name: opListTagsForResource,
  834. HTTPMethod: "POST",
  835. HTTPPath: "/",
  836. }
  837. if input == nil {
  838. input = &ListTagsForResourceInput{}
  839. }
  840. output = &ListTagsForResourceOutput{}
  841. req = c.newRequest(op, input, output)
  842. return
  843. }
  844. // ListTagsForResource API operation for AWS Transfer for SFTP.
  845. //
  846. // Lists all of the tags associated with the Amazon Resource Number (ARN) you
  847. // specify. The resource can be a user, server, or role.
  848. //
  849. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  850. // with awserr.Error's Code and Message methods to get detailed information about
  851. // the error.
  852. //
  853. // See the AWS API reference guide for AWS Transfer for SFTP's
  854. // API operation ListTagsForResource for usage and error information.
  855. //
  856. // Returned Error Codes:
  857. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  858. // The request has failed because the AWS Transfer for SFTP service is not available.
  859. //
  860. // * ErrCodeInternalServiceError "InternalServiceError"
  861. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  862. // service.
  863. //
  864. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  865. // The NextToken parameter that was passed is invalid.
  866. //
  867. // * ErrCodeInvalidRequestException "InvalidRequestException"
  868. // This exception is thrown when the client submits a malformed request.
  869. //
  870. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource
  871. func (c *Transfer) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  872. req, out := c.ListTagsForResourceRequest(input)
  873. return out, req.Send()
  874. }
  875. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  876. // the ability to pass a context and additional request options.
  877. //
  878. // See ListTagsForResource for details on how to use this API operation.
  879. //
  880. // The context must be non-nil and will be used for request cancellation. If
  881. // the context is nil a panic will occur. In the future the SDK may create
  882. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  883. // for more information on using Contexts.
  884. func (c *Transfer) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  885. req, out := c.ListTagsForResourceRequest(input)
  886. req.SetContext(ctx)
  887. req.ApplyOptions(opts...)
  888. return out, req.Send()
  889. }
  890. const opListUsers = "ListUsers"
  891. // ListUsersRequest generates a "aws/request.Request" representing the
  892. // client's request for the ListUsers operation. The "output" return
  893. // value will be populated with the request's response once the request completes
  894. // successfully.
  895. //
  896. // Use "Send" method on the returned Request to send the API call to the service.
  897. // the "output" return value is not valid until after Send returns without error.
  898. //
  899. // See ListUsers for more information on using the ListUsers
  900. // API call, and error handling.
  901. //
  902. // This method is useful when you want to inject custom logic or configuration
  903. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  904. //
  905. //
  906. // // Example sending a request using the ListUsersRequest method.
  907. // req, resp := client.ListUsersRequest(params)
  908. //
  909. // err := req.Send()
  910. // if err == nil { // resp is now filled
  911. // fmt.Println(resp)
  912. // }
  913. //
  914. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers
  915. func (c *Transfer) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) {
  916. op := &request.Operation{
  917. Name: opListUsers,
  918. HTTPMethod: "POST",
  919. HTTPPath: "/",
  920. }
  921. if input == nil {
  922. input = &ListUsersInput{}
  923. }
  924. output = &ListUsersOutput{}
  925. req = c.newRequest(op, input, output)
  926. return
  927. }
  928. // ListUsers API operation for AWS Transfer for SFTP.
  929. //
  930. // Lists the users for the server that you specify by passing the ServerId parameter.
  931. //
  932. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  933. // with awserr.Error's Code and Message methods to get detailed information about
  934. // the error.
  935. //
  936. // See the AWS API reference guide for AWS Transfer for SFTP's
  937. // API operation ListUsers for usage and error information.
  938. //
  939. // Returned Error Codes:
  940. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  941. // The request has failed because the AWS Transfer for SFTP service is not available.
  942. //
  943. // * ErrCodeInternalServiceError "InternalServiceError"
  944. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  945. // service.
  946. //
  947. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  948. // The NextToken parameter that was passed is invalid.
  949. //
  950. // * ErrCodeInvalidRequestException "InvalidRequestException"
  951. // This exception is thrown when the client submits a malformed request.
  952. //
  953. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  954. // This exception is thrown when a resource is not found by the AWS Transfer
  955. // for SFTP service.
  956. //
  957. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers
  958. func (c *Transfer) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) {
  959. req, out := c.ListUsersRequest(input)
  960. return out, req.Send()
  961. }
  962. // ListUsersWithContext is the same as ListUsers with the addition of
  963. // the ability to pass a context and additional request options.
  964. //
  965. // See ListUsers for details on how to use this API operation.
  966. //
  967. // The context must be non-nil and will be used for request cancellation. If
  968. // the context is nil a panic will occur. In the future the SDK may create
  969. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  970. // for more information on using Contexts.
  971. func (c *Transfer) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) {
  972. req, out := c.ListUsersRequest(input)
  973. req.SetContext(ctx)
  974. req.ApplyOptions(opts...)
  975. return out, req.Send()
  976. }
  977. const opStartServer = "StartServer"
  978. // StartServerRequest generates a "aws/request.Request" representing the
  979. // client's request for the StartServer operation. The "output" return
  980. // value will be populated with the request's response once the request completes
  981. // successfully.
  982. //
  983. // Use "Send" method on the returned Request to send the API call to the service.
  984. // the "output" return value is not valid until after Send returns without error.
  985. //
  986. // See StartServer for more information on using the StartServer
  987. // API call, and error handling.
  988. //
  989. // This method is useful when you want to inject custom logic or configuration
  990. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  991. //
  992. //
  993. // // Example sending a request using the StartServerRequest method.
  994. // req, resp := client.StartServerRequest(params)
  995. //
  996. // err := req.Send()
  997. // if err == nil { // resp is now filled
  998. // fmt.Println(resp)
  999. // }
  1000. //
  1001. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer
  1002. func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Request, output *StartServerOutput) {
  1003. op := &request.Operation{
  1004. Name: opStartServer,
  1005. HTTPMethod: "POST",
  1006. HTTPPath: "/",
  1007. }
  1008. if input == nil {
  1009. input = &StartServerInput{}
  1010. }
  1011. output = &StartServerOutput{}
  1012. req = c.newRequest(op, input, output)
  1013. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1014. return
  1015. }
  1016. // StartServer API operation for AWS Transfer for SFTP.
  1017. //
  1018. // Changes the state of a Secure File Transfer Protocol (SFTP) server from OFFLINE
  1019. // to ONLINE. It has no impact on an SFTP server that is already ONLINE. An
  1020. // ONLINE server can accept and process file transfer jobs.
  1021. //
  1022. // The state of STARTING indicates that the server is in an intermediate state,
  1023. // either not fully able to respond, or not fully online. The values of START_FAILED
  1024. // can indicate an error condition.
  1025. //
  1026. // No response is returned from this call.
  1027. //
  1028. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1029. // with awserr.Error's Code and Message methods to get detailed information about
  1030. // the error.
  1031. //
  1032. // See the AWS API reference guide for AWS Transfer for SFTP's
  1033. // API operation StartServer for usage and error information.
  1034. //
  1035. // Returned Error Codes:
  1036. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1037. // The request has failed because the AWS Transfer for SFTP service is not available.
  1038. //
  1039. // * ErrCodeInternalServiceError "InternalServiceError"
  1040. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  1041. // service.
  1042. //
  1043. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1044. // This exception is thrown when the client submits a malformed request.
  1045. //
  1046. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1047. // This exception is thrown when a resource is not found by the AWS Transfer
  1048. // for SFTP service.
  1049. //
  1050. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer
  1051. func (c *Transfer) StartServer(input *StartServerInput) (*StartServerOutput, error) {
  1052. req, out := c.StartServerRequest(input)
  1053. return out, req.Send()
  1054. }
  1055. // StartServerWithContext is the same as StartServer with the addition of
  1056. // the ability to pass a context and additional request options.
  1057. //
  1058. // See StartServer for details on how to use this API operation.
  1059. //
  1060. // The context must be non-nil and will be used for request cancellation. If
  1061. // the context is nil a panic will occur. In the future the SDK may create
  1062. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1063. // for more information on using Contexts.
  1064. func (c *Transfer) StartServerWithContext(ctx aws.Context, input *StartServerInput, opts ...request.Option) (*StartServerOutput, error) {
  1065. req, out := c.StartServerRequest(input)
  1066. req.SetContext(ctx)
  1067. req.ApplyOptions(opts...)
  1068. return out, req.Send()
  1069. }
  1070. const opStopServer = "StopServer"
  1071. // StopServerRequest generates a "aws/request.Request" representing the
  1072. // client's request for the StopServer operation. The "output" return
  1073. // value will be populated with the request's response once the request completes
  1074. // successfully.
  1075. //
  1076. // Use "Send" method on the returned Request to send the API call to the service.
  1077. // the "output" return value is not valid until after Send returns without error.
  1078. //
  1079. // See StopServer for more information on using the StopServer
  1080. // API call, and error handling.
  1081. //
  1082. // This method is useful when you want to inject custom logic or configuration
  1083. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1084. //
  1085. //
  1086. // // Example sending a request using the StopServerRequest method.
  1087. // req, resp := client.StopServerRequest(params)
  1088. //
  1089. // err := req.Send()
  1090. // if err == nil { // resp is now filled
  1091. // fmt.Println(resp)
  1092. // }
  1093. //
  1094. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer
  1095. func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Request, output *StopServerOutput) {
  1096. op := &request.Operation{
  1097. Name: opStopServer,
  1098. HTTPMethod: "POST",
  1099. HTTPPath: "/",
  1100. }
  1101. if input == nil {
  1102. input = &StopServerInput{}
  1103. }
  1104. output = &StopServerOutput{}
  1105. req = c.newRequest(op, input, output)
  1106. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1107. return
  1108. }
  1109. // StopServer API operation for AWS Transfer for SFTP.
  1110. //
  1111. // Changes the state of an SFTP server from ONLINE to OFFLINE. An OFFLINE server
  1112. // cannot accept and process file transfer jobs. Information tied to your server
  1113. // such as server and user properties are not affected by stopping your server.
  1114. // Stopping a server will not reduce or impact your Secure File Transfer Protocol
  1115. // (SFTP) endpoint billing.
  1116. //
  1117. // The states of STOPPING indicates that the server is in an intermediate state,
  1118. // either not fully able to respond, or not fully offline. The values of STOP_FAILED
  1119. // can indicate an error condition.
  1120. //
  1121. // No response is returned from this call.
  1122. //
  1123. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1124. // with awserr.Error's Code and Message methods to get detailed information about
  1125. // the error.
  1126. //
  1127. // See the AWS API reference guide for AWS Transfer for SFTP's
  1128. // API operation StopServer for usage and error information.
  1129. //
  1130. // Returned Error Codes:
  1131. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1132. // The request has failed because the AWS Transfer for SFTP service is not available.
  1133. //
  1134. // * ErrCodeInternalServiceError "InternalServiceError"
  1135. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  1136. // service.
  1137. //
  1138. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1139. // This exception is thrown when the client submits a malformed request.
  1140. //
  1141. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1142. // This exception is thrown when a resource is not found by the AWS Transfer
  1143. // for SFTP service.
  1144. //
  1145. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer
  1146. func (c *Transfer) StopServer(input *StopServerInput) (*StopServerOutput, error) {
  1147. req, out := c.StopServerRequest(input)
  1148. return out, req.Send()
  1149. }
  1150. // StopServerWithContext is the same as StopServer with the addition of
  1151. // the ability to pass a context and additional request options.
  1152. //
  1153. // See StopServer for details on how to use this API operation.
  1154. //
  1155. // The context must be non-nil and will be used for request cancellation. If
  1156. // the context is nil a panic will occur. In the future the SDK may create
  1157. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1158. // for more information on using Contexts.
  1159. func (c *Transfer) StopServerWithContext(ctx aws.Context, input *StopServerInput, opts ...request.Option) (*StopServerOutput, error) {
  1160. req, out := c.StopServerRequest(input)
  1161. req.SetContext(ctx)
  1162. req.ApplyOptions(opts...)
  1163. return out, req.Send()
  1164. }
  1165. const opTagResource = "TagResource"
  1166. // TagResourceRequest generates a "aws/request.Request" representing the
  1167. // client's request for the TagResource operation. The "output" return
  1168. // value will be populated with the request's response once the request completes
  1169. // successfully.
  1170. //
  1171. // Use "Send" method on the returned Request to send the API call to the service.
  1172. // the "output" return value is not valid until after Send returns without error.
  1173. //
  1174. // See TagResource for more information on using the TagResource
  1175. // API call, and error handling.
  1176. //
  1177. // This method is useful when you want to inject custom logic or configuration
  1178. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1179. //
  1180. //
  1181. // // Example sending a request using the TagResourceRequest method.
  1182. // req, resp := client.TagResourceRequest(params)
  1183. //
  1184. // err := req.Send()
  1185. // if err == nil { // resp is now filled
  1186. // fmt.Println(resp)
  1187. // }
  1188. //
  1189. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource
  1190. func (c *Transfer) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  1191. op := &request.Operation{
  1192. Name: opTagResource,
  1193. HTTPMethod: "POST",
  1194. HTTPPath: "/",
  1195. }
  1196. if input == nil {
  1197. input = &TagResourceInput{}
  1198. }
  1199. output = &TagResourceOutput{}
  1200. req = c.newRequest(op, input, output)
  1201. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1202. return
  1203. }
  1204. // TagResource API operation for AWS Transfer for SFTP.
  1205. //
  1206. // Attaches a key-value pair to a resource, as identified by its Amazon Resource
  1207. // Name (ARN). Resources are users, servers, roles, and other entities.
  1208. //
  1209. // There is no response returned from this call.
  1210. //
  1211. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1212. // with awserr.Error's Code and Message methods to get detailed information about
  1213. // the error.
  1214. //
  1215. // See the AWS API reference guide for AWS Transfer for SFTP's
  1216. // API operation TagResource for usage and error information.
  1217. //
  1218. // Returned Error Codes:
  1219. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1220. // The request has failed because the AWS Transfer for SFTP service is not available.
  1221. //
  1222. // * ErrCodeInternalServiceError "InternalServiceError"
  1223. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  1224. // service.
  1225. //
  1226. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1227. // This exception is thrown when the client submits a malformed request.
  1228. //
  1229. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource
  1230. func (c *Transfer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  1231. req, out := c.TagResourceRequest(input)
  1232. return out, req.Send()
  1233. }
  1234. // TagResourceWithContext is the same as TagResource with the addition of
  1235. // the ability to pass a context and additional request options.
  1236. //
  1237. // See TagResource for details on how to use this API operation.
  1238. //
  1239. // The context must be non-nil and will be used for request cancellation. If
  1240. // the context is nil a panic will occur. In the future the SDK may create
  1241. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1242. // for more information on using Contexts.
  1243. func (c *Transfer) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  1244. req, out := c.TagResourceRequest(input)
  1245. req.SetContext(ctx)
  1246. req.ApplyOptions(opts...)
  1247. return out, req.Send()
  1248. }
  1249. const opTestIdentityProvider = "TestIdentityProvider"
  1250. // TestIdentityProviderRequest generates a "aws/request.Request" representing the
  1251. // client's request for the TestIdentityProvider operation. The "output" return
  1252. // value will be populated with the request's response once the request completes
  1253. // successfully.
  1254. //
  1255. // Use "Send" method on the returned Request to send the API call to the service.
  1256. // the "output" return value is not valid until after Send returns without error.
  1257. //
  1258. // See TestIdentityProvider for more information on using the TestIdentityProvider
  1259. // API call, and error handling.
  1260. //
  1261. // This method is useful when you want to inject custom logic or configuration
  1262. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1263. //
  1264. //
  1265. // // Example sending a request using the TestIdentityProviderRequest method.
  1266. // req, resp := client.TestIdentityProviderRequest(params)
  1267. //
  1268. // err := req.Send()
  1269. // if err == nil { // resp is now filled
  1270. // fmt.Println(resp)
  1271. // }
  1272. //
  1273. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider
  1274. func (c *Transfer) TestIdentityProviderRequest(input *TestIdentityProviderInput) (req *request.Request, output *TestIdentityProviderOutput) {
  1275. op := &request.Operation{
  1276. Name: opTestIdentityProvider,
  1277. HTTPMethod: "POST",
  1278. HTTPPath: "/",
  1279. }
  1280. if input == nil {
  1281. input = &TestIdentityProviderInput{}
  1282. }
  1283. output = &TestIdentityProviderOutput{}
  1284. req = c.newRequest(op, input, output)
  1285. return
  1286. }
  1287. // TestIdentityProvider API operation for AWS Transfer for SFTP.
  1288. //
  1289. // If the IdentityProviderType of the server is API_Gateway, tests whether your
  1290. // API Gateway is set up successfully. We highly recommend that you call this
  1291. // method to test your authentication method as soon as you create your server.
  1292. // By doing so, you can troubleshoot issues with the API Gateway integration
  1293. // to ensure that your users can successfully use the service.
  1294. //
  1295. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1296. // with awserr.Error's Code and Message methods to get detailed information about
  1297. // the error.
  1298. //
  1299. // See the AWS API reference guide for AWS Transfer for SFTP's
  1300. // API operation TestIdentityProvider for usage and error information.
  1301. //
  1302. // Returned Error Codes:
  1303. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1304. // The request has failed because the AWS Transfer for SFTP service is not available.
  1305. //
  1306. // * ErrCodeInternalServiceError "InternalServiceError"
  1307. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  1308. // service.
  1309. //
  1310. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1311. // This exception is thrown when the client submits a malformed request.
  1312. //
  1313. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1314. // This exception is thrown when a resource is not found by the AWS Transfer
  1315. // for SFTP service.
  1316. //
  1317. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider
  1318. func (c *Transfer) TestIdentityProvider(input *TestIdentityProviderInput) (*TestIdentityProviderOutput, error) {
  1319. req, out := c.TestIdentityProviderRequest(input)
  1320. return out, req.Send()
  1321. }
  1322. // TestIdentityProviderWithContext is the same as TestIdentityProvider with the addition of
  1323. // the ability to pass a context and additional request options.
  1324. //
  1325. // See TestIdentityProvider for details on how to use this API operation.
  1326. //
  1327. // The context must be non-nil and will be used for request cancellation. If
  1328. // the context is nil a panic will occur. In the future the SDK may create
  1329. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1330. // for more information on using Contexts.
  1331. func (c *Transfer) TestIdentityProviderWithContext(ctx aws.Context, input *TestIdentityProviderInput, opts ...request.Option) (*TestIdentityProviderOutput, error) {
  1332. req, out := c.TestIdentityProviderRequest(input)
  1333. req.SetContext(ctx)
  1334. req.ApplyOptions(opts...)
  1335. return out, req.Send()
  1336. }
  1337. const opUntagResource = "UntagResource"
  1338. // UntagResourceRequest generates a "aws/request.Request" representing the
  1339. // client's request for the UntagResource operation. The "output" return
  1340. // value will be populated with the request's response once the request completes
  1341. // successfully.
  1342. //
  1343. // Use "Send" method on the returned Request to send the API call to the service.
  1344. // the "output" return value is not valid until after Send returns without error.
  1345. //
  1346. // See UntagResource for more information on using the UntagResource
  1347. // API call, and error handling.
  1348. //
  1349. // This method is useful when you want to inject custom logic or configuration
  1350. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1351. //
  1352. //
  1353. // // Example sending a request using the UntagResourceRequest method.
  1354. // req, resp := client.UntagResourceRequest(params)
  1355. //
  1356. // err := req.Send()
  1357. // if err == nil { // resp is now filled
  1358. // fmt.Println(resp)
  1359. // }
  1360. //
  1361. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource
  1362. func (c *Transfer) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  1363. op := &request.Operation{
  1364. Name: opUntagResource,
  1365. HTTPMethod: "POST",
  1366. HTTPPath: "/",
  1367. }
  1368. if input == nil {
  1369. input = &UntagResourceInput{}
  1370. }
  1371. output = &UntagResourceOutput{}
  1372. req = c.newRequest(op, input, output)
  1373. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1374. return
  1375. }
  1376. // UntagResource API operation for AWS Transfer for SFTP.
  1377. //
  1378. // Detaches a key-value pair from a resource, as identified by its Amazon Resource
  1379. // Name (ARN). Resources are users, servers, roles, and other entities.
  1380. //
  1381. // No response is returned from this call.
  1382. //
  1383. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1384. // with awserr.Error's Code and Message methods to get detailed information about
  1385. // the error.
  1386. //
  1387. // See the AWS API reference guide for AWS Transfer for SFTP's
  1388. // API operation UntagResource for usage and error information.
  1389. //
  1390. // Returned Error Codes:
  1391. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1392. // The request has failed because the AWS Transfer for SFTP service is not available.
  1393. //
  1394. // * ErrCodeInternalServiceError "InternalServiceError"
  1395. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  1396. // service.
  1397. //
  1398. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1399. // This exception is thrown when the client submits a malformed request.
  1400. //
  1401. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource
  1402. func (c *Transfer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  1403. req, out := c.UntagResourceRequest(input)
  1404. return out, req.Send()
  1405. }
  1406. // UntagResourceWithContext is the same as UntagResource with the addition of
  1407. // the ability to pass a context and additional request options.
  1408. //
  1409. // See UntagResource for details on how to use this API operation.
  1410. //
  1411. // The context must be non-nil and will be used for request cancellation. If
  1412. // the context is nil a panic will occur. In the future the SDK may create
  1413. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1414. // for more information on using Contexts.
  1415. func (c *Transfer) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  1416. req, out := c.UntagResourceRequest(input)
  1417. req.SetContext(ctx)
  1418. req.ApplyOptions(opts...)
  1419. return out, req.Send()
  1420. }
  1421. const opUpdateServer = "UpdateServer"
  1422. // UpdateServerRequest generates a "aws/request.Request" representing the
  1423. // client's request for the UpdateServer operation. The "output" return
  1424. // value will be populated with the request's response once the request completes
  1425. // successfully.
  1426. //
  1427. // Use "Send" method on the returned Request to send the API call to the service.
  1428. // the "output" return value is not valid until after Send returns without error.
  1429. //
  1430. // See UpdateServer for more information on using the UpdateServer
  1431. // API call, and error handling.
  1432. //
  1433. // This method is useful when you want to inject custom logic or configuration
  1434. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1435. //
  1436. //
  1437. // // Example sending a request using the UpdateServerRequest method.
  1438. // req, resp := client.UpdateServerRequest(params)
  1439. //
  1440. // err := req.Send()
  1441. // if err == nil { // resp is now filled
  1442. // fmt.Println(resp)
  1443. // }
  1444. //
  1445. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer
  1446. func (c *Transfer) UpdateServerRequest(input *UpdateServerInput) (req *request.Request, output *UpdateServerOutput) {
  1447. op := &request.Operation{
  1448. Name: opUpdateServer,
  1449. HTTPMethod: "POST",
  1450. HTTPPath: "/",
  1451. }
  1452. if input == nil {
  1453. input = &UpdateServerInput{}
  1454. }
  1455. output = &UpdateServerOutput{}
  1456. req = c.newRequest(op, input, output)
  1457. return
  1458. }
  1459. // UpdateServer API operation for AWS Transfer for SFTP.
  1460. //
  1461. // Updates the server properties after that server has been created.
  1462. //
  1463. // The UpdateServer call returns the ServerId of the Secure File Transfer Protocol
  1464. // (SFTP) server you updated.
  1465. //
  1466. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1467. // with awserr.Error's Code and Message methods to get detailed information about
  1468. // the error.
  1469. //
  1470. // See the AWS API reference guide for AWS Transfer for SFTP's
  1471. // API operation UpdateServer for usage and error information.
  1472. //
  1473. // Returned Error Codes:
  1474. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1475. // The request has failed because the AWS Transfer for SFTP service is not available.
  1476. //
  1477. // * ErrCodeInternalServiceError "InternalServiceError"
  1478. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  1479. // service.
  1480. //
  1481. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1482. // This exception is thrown when the client submits a malformed request.
  1483. //
  1484. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1485. // This exception is thrown when a resource is not found by the AWS Transfer
  1486. // for SFTP service.
  1487. //
  1488. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer
  1489. func (c *Transfer) UpdateServer(input *UpdateServerInput) (*UpdateServerOutput, error) {
  1490. req, out := c.UpdateServerRequest(input)
  1491. return out, req.Send()
  1492. }
  1493. // UpdateServerWithContext is the same as UpdateServer with the addition of
  1494. // the ability to pass a context and additional request options.
  1495. //
  1496. // See UpdateServer for details on how to use this API operation.
  1497. //
  1498. // The context must be non-nil and will be used for request cancellation. If
  1499. // the context is nil a panic will occur. In the future the SDK may create
  1500. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1501. // for more information on using Contexts.
  1502. func (c *Transfer) UpdateServerWithContext(ctx aws.Context, input *UpdateServerInput, opts ...request.Option) (*UpdateServerOutput, error) {
  1503. req, out := c.UpdateServerRequest(input)
  1504. req.SetContext(ctx)
  1505. req.ApplyOptions(opts...)
  1506. return out, req.Send()
  1507. }
  1508. const opUpdateUser = "UpdateUser"
  1509. // UpdateUserRequest generates a "aws/request.Request" representing the
  1510. // client's request for the UpdateUser operation. The "output" return
  1511. // value will be populated with the request's response once the request completes
  1512. // successfully.
  1513. //
  1514. // Use "Send" method on the returned Request to send the API call to the service.
  1515. // the "output" return value is not valid until after Send returns without error.
  1516. //
  1517. // See UpdateUser for more information on using the UpdateUser
  1518. // API call, and error handling.
  1519. //
  1520. // This method is useful when you want to inject custom logic or configuration
  1521. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1522. //
  1523. //
  1524. // // Example sending a request using the UpdateUserRequest method.
  1525. // req, resp := client.UpdateUserRequest(params)
  1526. //
  1527. // err := req.Send()
  1528. // if err == nil { // resp is now filled
  1529. // fmt.Println(resp)
  1530. // }
  1531. //
  1532. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser
  1533. func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, output *UpdateUserOutput) {
  1534. op := &request.Operation{
  1535. Name: opUpdateUser,
  1536. HTTPMethod: "POST",
  1537. HTTPPath: "/",
  1538. }
  1539. if input == nil {
  1540. input = &UpdateUserInput{}
  1541. }
  1542. output = &UpdateUserOutput{}
  1543. req = c.newRequest(op, input, output)
  1544. return
  1545. }
  1546. // UpdateUser API operation for AWS Transfer for SFTP.
  1547. //
  1548. // Assigns new properties to a user. Parameters you pass modify any or all of
  1549. // the following: the home directory, role, and policy for the UserName and
  1550. // ServerId you specify.
  1551. //
  1552. // The response returns the ServerId and the UserName for the updated user.
  1553. //
  1554. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1555. // with awserr.Error's Code and Message methods to get detailed information about
  1556. // the error.
  1557. //
  1558. // See the AWS API reference guide for AWS Transfer for SFTP's
  1559. // API operation UpdateUser for usage and error information.
  1560. //
  1561. // Returned Error Codes:
  1562. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1563. // The request has failed because the AWS Transfer for SFTP service is not available.
  1564. //
  1565. // * ErrCodeInternalServiceError "InternalServiceError"
  1566. // This exception is thrown when an error occurs in the AWS Transfer for SFTP
  1567. // service.
  1568. //
  1569. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1570. // This exception is thrown when the client submits a malformed request.
  1571. //
  1572. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1573. // This exception is thrown when a resource is not found by the AWS Transfer
  1574. // for SFTP service.
  1575. //
  1576. // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser
  1577. func (c *Transfer) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) {
  1578. req, out := c.UpdateUserRequest(input)
  1579. return out, req.Send()
  1580. }
  1581. // UpdateUserWithContext is the same as UpdateUser with the addition of
  1582. // the ability to pass a context and additional request options.
  1583. //
  1584. // See UpdateUser for details on how to use this API operation.
  1585. //
  1586. // The context must be non-nil and will be used for request cancellation. If
  1587. // the context is nil a panic will occur. In the future the SDK may create
  1588. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1589. // for more information on using Contexts.
  1590. func (c *Transfer) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput, opts ...request.Option) (*UpdateUserOutput, error) {
  1591. req, out := c.UpdateUserRequest(input)
  1592. req.SetContext(ctx)
  1593. req.ApplyOptions(opts...)
  1594. return out, req.Send()
  1595. }
  1596. type CreateServerInput struct {
  1597. _ struct{} `type:"structure"`
  1598. // An array containing all of the information required to call a customer-supplied
  1599. // authentication API. This parameter is not required when the IdentityProviderType
  1600. // value of server that is created uses the SERVICE_MANAGED authentication method.
  1601. IdentityProviderDetails *IdentityProviderDetails `type:"structure"`
  1602. // The mode of authentication enabled for this service. The default value is
  1603. // SERVICE_MANAGED, which allows you to store and access SFTP user credentials
  1604. // within the service. An IdentityProviderType value of API_GATEWAY indicates
  1605. // that user authentication requires a call to an API Gateway endpoint URL provided
  1606. // by you to integrate an identity provider of your choice.
  1607. IdentityProviderType *string `type:"string" enum:"IdentityProviderType"`
  1608. // A value that allows the service to write your SFTP users’ activity to your
  1609. // Amazon CloudWatch logs for monitoring and auditing purposes.
  1610. LoggingRole *string `type:"string"`
  1611. // Key-value pairs that can be used to group and search for servers.
  1612. Tags []*Tag `min:"1" type:"list"`
  1613. }
  1614. // String returns the string representation
  1615. func (s CreateServerInput) String() string {
  1616. return awsutil.Prettify(s)
  1617. }
  1618. // GoString returns the string representation
  1619. func (s CreateServerInput) GoString() string {
  1620. return s.String()
  1621. }
  1622. // Validate inspects the fields of the type to determine if they are valid.
  1623. func (s *CreateServerInput) Validate() error {
  1624. invalidParams := request.ErrInvalidParams{Context: "CreateServerInput"}
  1625. if s.Tags != nil && len(s.Tags) < 1 {
  1626. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  1627. }
  1628. if s.Tags != nil {
  1629. for i, v := range s.Tags {
  1630. if v == nil {
  1631. continue
  1632. }
  1633. if err := v.Validate(); err != nil {
  1634. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  1635. }
  1636. }
  1637. }
  1638. if invalidParams.Len() > 0 {
  1639. return invalidParams
  1640. }
  1641. return nil
  1642. }
  1643. // SetIdentityProviderDetails sets the IdentityProviderDetails field's value.
  1644. func (s *CreateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *CreateServerInput {
  1645. s.IdentityProviderDetails = v
  1646. return s
  1647. }
  1648. // SetIdentityProviderType sets the IdentityProviderType field's value.
  1649. func (s *CreateServerInput) SetIdentityProviderType(v string) *CreateServerInput {
  1650. s.IdentityProviderType = &v
  1651. return s
  1652. }
  1653. // SetLoggingRole sets the LoggingRole field's value.
  1654. func (s *CreateServerInput) SetLoggingRole(v string) *CreateServerInput {
  1655. s.LoggingRole = &v
  1656. return s
  1657. }
  1658. // SetTags sets the Tags field's value.
  1659. func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput {
  1660. s.Tags = v
  1661. return s
  1662. }
  1663. type CreateServerOutput struct {
  1664. _ struct{} `type:"structure"`
  1665. // The service-assigned ID of the SFTP server that is created.
  1666. //
  1667. // ServerId is a required field
  1668. ServerId *string `type:"string" required:"true"`
  1669. }
  1670. // String returns the string representation
  1671. func (s CreateServerOutput) String() string {
  1672. return awsutil.Prettify(s)
  1673. }
  1674. // GoString returns the string representation
  1675. func (s CreateServerOutput) GoString() string {
  1676. return s.String()
  1677. }
  1678. // SetServerId sets the ServerId field's value.
  1679. func (s *CreateServerOutput) SetServerId(v string) *CreateServerOutput {
  1680. s.ServerId = &v
  1681. return s
  1682. }
  1683. type CreateUserInput struct {
  1684. _ struct{} `type:"structure"`
  1685. // The landing directory (folder) for a user when they log in to the server
  1686. // using their SFTP client. An example is /home/username.
  1687. HomeDirectory *string `type:"string"`
  1688. // A scope-down policy for your user so you can use the same IAM role across
  1689. // multiple users. This policy scopes down user access to portions of their
  1690. // Amazon S3 bucket. Variables you can use inside this policy include ${Transfer:UserName},
  1691. // ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.
  1692. Policy *string `type:"string"`
  1693. // The IAM role that controls your user’s access to your Amazon S3 bucket. The
  1694. // policies attached to this role will determine the level of access you want
  1695. // to provide your users when transferring files into and out of your Amazon
  1696. // S3 bucket or buckets. The IAM role should also contain a trust relationship
  1697. // that allows the SFTP server to access your resources when servicing your
  1698. // SFTP user’s transfer requests.
  1699. //
  1700. // Role is a required field
  1701. Role *string `type:"string" required:"true"`
  1702. // A system-assigned unique identifier for an SFTP server instance. This is
  1703. // the specific SFTP server that you added your user to.
  1704. //
  1705. // ServerId is a required field
  1706. ServerId *string `type:"string" required:"true"`
  1707. // The public portion of the Secure Shall (SSH) key used to authenticate the
  1708. // user to the SFTP server.
  1709. SshPublicKeyBody *string `type:"string"`
  1710. // Key-value pairs that can be used to group and search for users. Tags are
  1711. // metadata attached to users for any purpose.
  1712. Tags []*Tag `min:"1" type:"list"`
  1713. // A unique string that identifies a user and is associated with a server as
  1714. // specified by the ServerId.
  1715. //
  1716. // UserName is a required field
  1717. UserName *string `type:"string" required:"true"`
  1718. }
  1719. // String returns the string representation
  1720. func (s CreateUserInput) String() string {
  1721. return awsutil.Prettify(s)
  1722. }
  1723. // GoString returns the string representation
  1724. func (s CreateUserInput) GoString() string {
  1725. return s.String()
  1726. }
  1727. // Validate inspects the fields of the type to determine if they are valid.
  1728. func (s *CreateUserInput) Validate() error {
  1729. invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"}
  1730. if s.Role == nil {
  1731. invalidParams.Add(request.NewErrParamRequired("Role"))
  1732. }
  1733. if s.ServerId == nil {
  1734. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  1735. }
  1736. if s.Tags != nil && len(s.Tags) < 1 {
  1737. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  1738. }
  1739. if s.UserName == nil {
  1740. invalidParams.Add(request.NewErrParamRequired("UserName"))
  1741. }
  1742. if s.Tags != nil {
  1743. for i, v := range s.Tags {
  1744. if v == nil {
  1745. continue
  1746. }
  1747. if err := v.Validate(); err != nil {
  1748. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  1749. }
  1750. }
  1751. }
  1752. if invalidParams.Len() > 0 {
  1753. return invalidParams
  1754. }
  1755. return nil
  1756. }
  1757. // SetHomeDirectory sets the HomeDirectory field's value.
  1758. func (s *CreateUserInput) SetHomeDirectory(v string) *CreateUserInput {
  1759. s.HomeDirectory = &v
  1760. return s
  1761. }
  1762. // SetPolicy sets the Policy field's value.
  1763. func (s *CreateUserInput) SetPolicy(v string) *CreateUserInput {
  1764. s.Policy = &v
  1765. return s
  1766. }
  1767. // SetRole sets the Role field's value.
  1768. func (s *CreateUserInput) SetRole(v string) *CreateUserInput {
  1769. s.Role = &v
  1770. return s
  1771. }
  1772. // SetServerId sets the ServerId field's value.
  1773. func (s *CreateUserInput) SetServerId(v string) *CreateUserInput {
  1774. s.ServerId = &v
  1775. return s
  1776. }
  1777. // SetSshPublicKeyBody sets the SshPublicKeyBody field's value.
  1778. func (s *CreateUserInput) SetSshPublicKeyBody(v string) *CreateUserInput {
  1779. s.SshPublicKeyBody = &v
  1780. return s
  1781. }
  1782. // SetTags sets the Tags field's value.
  1783. func (s *CreateUserInput) SetTags(v []*Tag) *CreateUserInput {
  1784. s.Tags = v
  1785. return s
  1786. }
  1787. // SetUserName sets the UserName field's value.
  1788. func (s *CreateUserInput) SetUserName(v string) *CreateUserInput {
  1789. s.UserName = &v
  1790. return s
  1791. }
  1792. type CreateUserOutput struct {
  1793. _ struct{} `type:"structure"`
  1794. // The ID of the SFTP server that the user is attached to.
  1795. //
  1796. // ServerId is a required field
  1797. ServerId *string `type:"string" required:"true"`
  1798. // A unique string that identifies a user account associated with an SFTP server.
  1799. //
  1800. // UserName is a required field
  1801. UserName *string `type:"string" required:"true"`
  1802. }
  1803. // String returns the string representation
  1804. func (s CreateUserOutput) String() string {
  1805. return awsutil.Prettify(s)
  1806. }
  1807. // GoString returns the string representation
  1808. func (s CreateUserOutput) GoString() string {
  1809. return s.String()
  1810. }
  1811. // SetServerId sets the ServerId field's value.
  1812. func (s *CreateUserOutput) SetServerId(v string) *CreateUserOutput {
  1813. s.ServerId = &v
  1814. return s
  1815. }
  1816. // SetUserName sets the UserName field's value.
  1817. func (s *CreateUserOutput) SetUserName(v string) *CreateUserOutput {
  1818. s.UserName = &v
  1819. return s
  1820. }
  1821. type DeleteServerInput struct {
  1822. _ struct{} `type:"structure"`
  1823. // A unique system-assigned identifier for an SFTP server instance.
  1824. //
  1825. // ServerId is a required field
  1826. ServerId *string `type:"string" required:"true"`
  1827. }
  1828. // String returns the string representation
  1829. func (s DeleteServerInput) String() string {
  1830. return awsutil.Prettify(s)
  1831. }
  1832. // GoString returns the string representation
  1833. func (s DeleteServerInput) GoString() string {
  1834. return s.String()
  1835. }
  1836. // Validate inspects the fields of the type to determine if they are valid.
  1837. func (s *DeleteServerInput) Validate() error {
  1838. invalidParams := request.ErrInvalidParams{Context: "DeleteServerInput"}
  1839. if s.ServerId == nil {
  1840. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  1841. }
  1842. if invalidParams.Len() > 0 {
  1843. return invalidParams
  1844. }
  1845. return nil
  1846. }
  1847. // SetServerId sets the ServerId field's value.
  1848. func (s *DeleteServerInput) SetServerId(v string) *DeleteServerInput {
  1849. s.ServerId = &v
  1850. return s
  1851. }
  1852. type DeleteServerOutput struct {
  1853. _ struct{} `type:"structure"`
  1854. }
  1855. // String returns the string representation
  1856. func (s DeleteServerOutput) String() string {
  1857. return awsutil.Prettify(s)
  1858. }
  1859. // GoString returns the string representation
  1860. func (s DeleteServerOutput) GoString() string {
  1861. return s.String()
  1862. }
  1863. type DeleteSshPublicKeyInput struct {
  1864. _ struct{} `type:"structure"`
  1865. // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP)
  1866. // server instance that has the user assigned to it.
  1867. //
  1868. // ServerId is a required field
  1869. ServerId *string `type:"string" required:"true"`
  1870. // A unique identifier used to reference your user’s specific SSH key.
  1871. //
  1872. // SshPublicKeyId is a required field
  1873. SshPublicKeyId *string `type:"string" required:"true"`
  1874. // A unique string that identifies a user whose public key is being deleted.
  1875. //
  1876. // UserName is a required field
  1877. UserName *string `type:"string" required:"true"`
  1878. }
  1879. // String returns the string representation
  1880. func (s DeleteSshPublicKeyInput) String() string {
  1881. return awsutil.Prettify(s)
  1882. }
  1883. // GoString returns the string representation
  1884. func (s DeleteSshPublicKeyInput) GoString() string {
  1885. return s.String()
  1886. }
  1887. // Validate inspects the fields of the type to determine if they are valid.
  1888. func (s *DeleteSshPublicKeyInput) Validate() error {
  1889. invalidParams := request.ErrInvalidParams{Context: "DeleteSshPublicKeyInput"}
  1890. if s.ServerId == nil {
  1891. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  1892. }
  1893. if s.SshPublicKeyId == nil {
  1894. invalidParams.Add(request.NewErrParamRequired("SshPublicKeyId"))
  1895. }
  1896. if s.UserName == nil {
  1897. invalidParams.Add(request.NewErrParamRequired("UserName"))
  1898. }
  1899. if invalidParams.Len() > 0 {
  1900. return invalidParams
  1901. }
  1902. return nil
  1903. }
  1904. // SetServerId sets the ServerId field's value.
  1905. func (s *DeleteSshPublicKeyInput) SetServerId(v string) *DeleteSshPublicKeyInput {
  1906. s.ServerId = &v
  1907. return s
  1908. }
  1909. // SetSshPublicKeyId sets the SshPublicKeyId field's value.
  1910. func (s *DeleteSshPublicKeyInput) SetSshPublicKeyId(v string) *DeleteSshPublicKeyInput {
  1911. s.SshPublicKeyId = &v
  1912. return s
  1913. }
  1914. // SetUserName sets the UserName field's value.
  1915. func (s *DeleteSshPublicKeyInput) SetUserName(v string) *DeleteSshPublicKeyInput {
  1916. s.UserName = &v
  1917. return s
  1918. }
  1919. type DeleteSshPublicKeyOutput struct {
  1920. _ struct{} `type:"structure"`
  1921. }
  1922. // String returns the string representation
  1923. func (s DeleteSshPublicKeyOutput) String() string {
  1924. return awsutil.Prettify(s)
  1925. }
  1926. // GoString returns the string representation
  1927. func (s DeleteSshPublicKeyOutput) GoString() string {
  1928. return s.String()
  1929. }
  1930. type DeleteUserInput struct {
  1931. _ struct{} `type:"structure"`
  1932. // A system-assigned unique identifier for an SFTP server instance that has
  1933. // the user assigned to it.
  1934. //
  1935. // ServerId is a required field
  1936. ServerId *string `type:"string" required:"true"`
  1937. // A unique string that identifies a user that is being deleted from the server.
  1938. //
  1939. // UserName is a required field
  1940. UserName *string `type:"string" required:"true"`
  1941. }
  1942. // String returns the string representation
  1943. func (s DeleteUserInput) String() string {
  1944. return awsutil.Prettify(s)
  1945. }
  1946. // GoString returns the string representation
  1947. func (s DeleteUserInput) GoString() string {
  1948. return s.String()
  1949. }
  1950. // Validate inspects the fields of the type to determine if they are valid.
  1951. func (s *DeleteUserInput) Validate() error {
  1952. invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"}
  1953. if s.ServerId == nil {
  1954. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  1955. }
  1956. if s.UserName == nil {
  1957. invalidParams.Add(request.NewErrParamRequired("UserName"))
  1958. }
  1959. if invalidParams.Len() > 0 {
  1960. return invalidParams
  1961. }
  1962. return nil
  1963. }
  1964. // SetServerId sets the ServerId field's value.
  1965. func (s *DeleteUserInput) SetServerId(v string) *DeleteUserInput {
  1966. s.ServerId = &v
  1967. return s
  1968. }
  1969. // SetUserName sets the UserName field's value.
  1970. func (s *DeleteUserInput) SetUserName(v string) *DeleteUserInput {
  1971. s.UserName = &v
  1972. return s
  1973. }
  1974. type DeleteUserOutput struct {
  1975. _ struct{} `type:"structure"`
  1976. }
  1977. // String returns the string representation
  1978. func (s DeleteUserOutput) String() string {
  1979. return awsutil.Prettify(s)
  1980. }
  1981. // GoString returns the string representation
  1982. func (s DeleteUserOutput) GoString() string {
  1983. return s.String()
  1984. }
  1985. type DescribeServerInput struct {
  1986. _ struct{} `type:"structure"`
  1987. // A system-assigned unique identifier for an SFTP server.
  1988. //
  1989. // ServerId is a required field
  1990. ServerId *string `type:"string" required:"true"`
  1991. }
  1992. // String returns the string representation
  1993. func (s DescribeServerInput) String() string {
  1994. return awsutil.Prettify(s)
  1995. }
  1996. // GoString returns the string representation
  1997. func (s DescribeServerInput) GoString() string {
  1998. return s.String()
  1999. }
  2000. // Validate inspects the fields of the type to determine if they are valid.
  2001. func (s *DescribeServerInput) Validate() error {
  2002. invalidParams := request.ErrInvalidParams{Context: "DescribeServerInput"}
  2003. if s.ServerId == nil {
  2004. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  2005. }
  2006. if invalidParams.Len() > 0 {
  2007. return invalidParams
  2008. }
  2009. return nil
  2010. }
  2011. // SetServerId sets the ServerId field's value.
  2012. func (s *DescribeServerInput) SetServerId(v string) *DescribeServerInput {
  2013. s.ServerId = &v
  2014. return s
  2015. }
  2016. type DescribeServerOutput struct {
  2017. _ struct{} `type:"structure"`
  2018. // An array containing the properties of the server with the ServerID you specified.
  2019. //
  2020. // Server is a required field
  2021. Server *DescribedServer `type:"structure" required:"true"`
  2022. }
  2023. // String returns the string representation
  2024. func (s DescribeServerOutput) String() string {
  2025. return awsutil.Prettify(s)
  2026. }
  2027. // GoString returns the string representation
  2028. func (s DescribeServerOutput) GoString() string {
  2029. return s.String()
  2030. }
  2031. // SetServer sets the Server field's value.
  2032. func (s *DescribeServerOutput) SetServer(v *DescribedServer) *DescribeServerOutput {
  2033. s.Server = v
  2034. return s
  2035. }
  2036. type DescribeUserInput struct {
  2037. _ struct{} `type:"structure"`
  2038. // A system-assigned unique identifier for an SFTP server that has this user
  2039. // assigned.
  2040. //
  2041. // ServerId is a required field
  2042. ServerId *string `type:"string" required:"true"`
  2043. // The name of the user assigned to one or more servers. User names are part
  2044. // of the sign-in credentials to use the AWS Transfer service and perform file
  2045. // transfer tasks.
  2046. //
  2047. // UserName is a required field
  2048. UserName *string `type:"string" required:"true"`
  2049. }
  2050. // String returns the string representation
  2051. func (s DescribeUserInput) String() string {
  2052. return awsutil.Prettify(s)
  2053. }
  2054. // GoString returns the string representation
  2055. func (s DescribeUserInput) GoString() string {
  2056. return s.String()
  2057. }
  2058. // Validate inspects the fields of the type to determine if they are valid.
  2059. func (s *DescribeUserInput) Validate() error {
  2060. invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"}
  2061. if s.ServerId == nil {
  2062. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  2063. }
  2064. if s.UserName == nil {
  2065. invalidParams.Add(request.NewErrParamRequired("UserName"))
  2066. }
  2067. if invalidParams.Len() > 0 {
  2068. return invalidParams
  2069. }
  2070. return nil
  2071. }
  2072. // SetServerId sets the ServerId field's value.
  2073. func (s *DescribeUserInput) SetServerId(v string) *DescribeUserInput {
  2074. s.ServerId = &v
  2075. return s
  2076. }
  2077. // SetUserName sets the UserName field's value.
  2078. func (s *DescribeUserInput) SetUserName(v string) *DescribeUserInput {
  2079. s.UserName = &v
  2080. return s
  2081. }
  2082. type DescribeUserOutput struct {
  2083. _ struct{} `type:"structure"`
  2084. // A system-assigned unique identifier for an SFTP server that has this user
  2085. // assigned.
  2086. //
  2087. // ServerId is a required field
  2088. ServerId *string `type:"string" required:"true"`
  2089. // An array containing the properties of the user account for the ServerID value
  2090. // that you specified.
  2091. //
  2092. // User is a required field
  2093. User *DescribedUser `type:"structure" required:"true"`
  2094. }
  2095. // String returns the string representation
  2096. func (s DescribeUserOutput) String() string {
  2097. return awsutil.Prettify(s)
  2098. }
  2099. // GoString returns the string representation
  2100. func (s DescribeUserOutput) GoString() string {
  2101. return s.String()
  2102. }
  2103. // SetServerId sets the ServerId field's value.
  2104. func (s *DescribeUserOutput) SetServerId(v string) *DescribeUserOutput {
  2105. s.ServerId = &v
  2106. return s
  2107. }
  2108. // SetUser sets the User field's value.
  2109. func (s *DescribeUserOutput) SetUser(v *DescribedUser) *DescribeUserOutput {
  2110. s.User = v
  2111. return s
  2112. }
  2113. // Describe the properties of the server that was specified. Information returned
  2114. // includes: the server Amazon Resource Name (ARN), the authentication configuration
  2115. // and type, the logging role, server Id and state, and assigned tags or metadata.
  2116. type DescribedServer struct {
  2117. _ struct{} `type:"structure"`
  2118. // Specifies the unique Amazon Resource Name (ARN) for the server to be described.
  2119. //
  2120. // Arn is a required field
  2121. Arn *string `min:"20" type:"string" required:"true"`
  2122. // Specifies information to call a customer-supplied authentication API. This
  2123. // field is not populated when the IdentityProviderType of the server is SERVICE_MANAGED>.
  2124. IdentityProviderDetails *IdentityProviderDetails `type:"structure"`
  2125. // This property defines the mode of authentication method enabled for this
  2126. // service. A value of SERVICE_MANAGED, means that you are using this Server
  2127. // to store and access SFTP user credentials within the service. A value of
  2128. // API_GATEWAY indicates that you have integrated an API Gateway endpoint that
  2129. // will be invoked for authenticating your user into the service.
  2130. IdentityProviderType *string `type:"string" enum:"IdentityProviderType"`
  2131. // This property is an AWS Identity and Access Management (IAM) entity that
  2132. // allows the server to turn on Amazon CloudWatch logging for Amazon S3 events.
  2133. // When set, user activity can be view in your CloudWatch logs.
  2134. LoggingRole *string `type:"string"`
  2135. // This property is a unique system assigned identifier for the SFTP server
  2136. // that you instantiate.
  2137. ServerId *string `type:"string"`
  2138. // The condition of the SFTP server for the server that was described. A value
  2139. // of ONLINE indicates that the server can accept jobs and transfer files. A
  2140. // State value of OFFLINE means that the server cannot perform file transfer
  2141. // operations.
  2142. //
  2143. // The states of STARTING and STOPPING indicated that the server is in an intermediate
  2144. // state, either not fully able to respond, or not fully offline. The values
  2145. // of START_FAILED or STOP_FAILED can indicate an error condition.
  2146. State *string `type:"string" enum:"State"`
  2147. // This property contains the key-value pairs that you can use to search for
  2148. // and group servers that were assigned to the server that was described.
  2149. Tags []*Tag `min:"1" type:"list"`
  2150. // The number of users that are assigned to the SFTP server you specified with
  2151. // the ServerId.
  2152. UserCount *int64 `type:"integer"`
  2153. }
  2154. // String returns the string representation
  2155. func (s DescribedServer) String() string {
  2156. return awsutil.Prettify(s)
  2157. }
  2158. // GoString returns the string representation
  2159. func (s DescribedServer) GoString() string {
  2160. return s.String()
  2161. }
  2162. // SetArn sets the Arn field's value.
  2163. func (s *DescribedServer) SetArn(v string) *DescribedServer {
  2164. s.Arn = &v
  2165. return s
  2166. }
  2167. // SetIdentityProviderDetails sets the IdentityProviderDetails field's value.
  2168. func (s *DescribedServer) SetIdentityProviderDetails(v *IdentityProviderDetails) *DescribedServer {
  2169. s.IdentityProviderDetails = v
  2170. return s
  2171. }
  2172. // SetIdentityProviderType sets the IdentityProviderType field's value.
  2173. func (s *DescribedServer) SetIdentityProviderType(v string) *DescribedServer {
  2174. s.IdentityProviderType = &v
  2175. return s
  2176. }
  2177. // SetLoggingRole sets the LoggingRole field's value.
  2178. func (s *DescribedServer) SetLoggingRole(v string) *DescribedServer {
  2179. s.LoggingRole = &v
  2180. return s
  2181. }
  2182. // SetServerId sets the ServerId field's value.
  2183. func (s *DescribedServer) SetServerId(v string) *DescribedServer {
  2184. s.ServerId = &v
  2185. return s
  2186. }
  2187. // SetState sets the State field's value.
  2188. func (s *DescribedServer) SetState(v string) *DescribedServer {
  2189. s.State = &v
  2190. return s
  2191. }
  2192. // SetTags sets the Tags field's value.
  2193. func (s *DescribedServer) SetTags(v []*Tag) *DescribedServer {
  2194. s.Tags = v
  2195. return s
  2196. }
  2197. // SetUserCount sets the UserCount field's value.
  2198. func (s *DescribedServer) SetUserCount(v int64) *DescribedServer {
  2199. s.UserCount = &v
  2200. return s
  2201. }
  2202. // Returns properties of the user that you wish to describe.
  2203. type DescribedUser struct {
  2204. _ struct{} `type:"structure"`
  2205. // This property contains the unique Amazon Resource Name (ARN) for the user
  2206. // that was requested to be described.
  2207. //
  2208. // Arn is a required field
  2209. Arn *string `min:"20" type:"string" required:"true"`
  2210. // This property specifies the landing directory (or folder) which is the location
  2211. // that files are written to or read from in an Amazon S3 bucket for the described
  2212. // user. An example would be: /bucket_name/home/username.
  2213. HomeDirectory *string `type:"string"`
  2214. // Specifies the name of the policy in use for the described user.
  2215. Policy *string `type:"string"`
  2216. // This property specifies the IAM role that controls your user’s access to
  2217. // your Amazon S3 bucket. The policies attached to this role will determine
  2218. // the level of access you want to provide your users when transferring files
  2219. // into and out of your Amazon S3 bucket or buckets. The IAM role should also
  2220. // contain a trust relationship that allows the SFTP server to access your resources
  2221. // when servicing your SFTP user’s transfer requests.
  2222. Role *string `type:"string"`
  2223. // This property contains the public key portion of the Secure Shell (SSH) keys
  2224. // stored for the described user.
  2225. SshPublicKeys []*SshPublicKey `type:"list"`
  2226. // This property contains the key-value pairs for the user requested. Tag can
  2227. // be used to search for and group users for a variety of purposes.
  2228. Tags []*Tag `min:"1" type:"list"`
  2229. // This property is the name of the user that was requested to be described.
  2230. // User names are used for authentication purposes. This is the string that
  2231. // will be used by your user when they log in to your SFTP server.
  2232. UserName *string `type:"string"`
  2233. }
  2234. // String returns the string representation
  2235. func (s DescribedUser) String() string {
  2236. return awsutil.Prettify(s)
  2237. }
  2238. // GoString returns the string representation
  2239. func (s DescribedUser) GoString() string {
  2240. return s.String()
  2241. }
  2242. // SetArn sets the Arn field's value.
  2243. func (s *DescribedUser) SetArn(v string) *DescribedUser {
  2244. s.Arn = &v
  2245. return s
  2246. }
  2247. // SetHomeDirectory sets the HomeDirectory field's value.
  2248. func (s *DescribedUser) SetHomeDirectory(v string) *DescribedUser {
  2249. s.HomeDirectory = &v
  2250. return s
  2251. }
  2252. // SetPolicy sets the Policy field's value.
  2253. func (s *DescribedUser) SetPolicy(v string) *DescribedUser {
  2254. s.Policy = &v
  2255. return s
  2256. }
  2257. // SetRole sets the Role field's value.
  2258. func (s *DescribedUser) SetRole(v string) *DescribedUser {
  2259. s.Role = &v
  2260. return s
  2261. }
  2262. // SetSshPublicKeys sets the SshPublicKeys field's value.
  2263. func (s *DescribedUser) SetSshPublicKeys(v []*SshPublicKey) *DescribedUser {
  2264. s.SshPublicKeys = v
  2265. return s
  2266. }
  2267. // SetTags sets the Tags field's value.
  2268. func (s *DescribedUser) SetTags(v []*Tag) *DescribedUser {
  2269. s.Tags = v
  2270. return s
  2271. }
  2272. // SetUserName sets the UserName field's value.
  2273. func (s *DescribedUser) SetUserName(v string) *DescribedUser {
  2274. s.UserName = &v
  2275. return s
  2276. }
  2277. // Returns information related to the type of user authentication that is in
  2278. // use for a server's users. A server can only have one method of authentication.
  2279. type IdentityProviderDetails struct {
  2280. _ struct{} `type:"structure"`
  2281. // The Role parameter provides the type of InvocationRole used to authenticate
  2282. // the user account.
  2283. InvocationRole *string `type:"string"`
  2284. // The IdentityProviderDetail parameter contains the location of the service
  2285. // endpoint used to authenticate users.
  2286. Url *string `type:"string"`
  2287. }
  2288. // String returns the string representation
  2289. func (s IdentityProviderDetails) String() string {
  2290. return awsutil.Prettify(s)
  2291. }
  2292. // GoString returns the string representation
  2293. func (s IdentityProviderDetails) GoString() string {
  2294. return s.String()
  2295. }
  2296. // SetInvocationRole sets the InvocationRole field's value.
  2297. func (s *IdentityProviderDetails) SetInvocationRole(v string) *IdentityProviderDetails {
  2298. s.InvocationRole = &v
  2299. return s
  2300. }
  2301. // SetUrl sets the Url field's value.
  2302. func (s *IdentityProviderDetails) SetUrl(v string) *IdentityProviderDetails {
  2303. s.Url = &v
  2304. return s
  2305. }
  2306. type ImportSshPublicKeyInput struct {
  2307. _ struct{} `type:"structure"`
  2308. // A system-assigned unique identifier for an SFTP server.
  2309. //
  2310. // ServerId is a required field
  2311. ServerId *string `type:"string" required:"true"`
  2312. // The public key portion of an SSH key pair.
  2313. //
  2314. // SshPublicKeyBody is a required field
  2315. SshPublicKeyBody *string `type:"string" required:"true"`
  2316. // The name of the user account that is assigned to one or more servers.
  2317. //
  2318. // UserName is a required field
  2319. UserName *string `type:"string" required:"true"`
  2320. }
  2321. // String returns the string representation
  2322. func (s ImportSshPublicKeyInput) String() string {
  2323. return awsutil.Prettify(s)
  2324. }
  2325. // GoString returns the string representation
  2326. func (s ImportSshPublicKeyInput) GoString() string {
  2327. return s.String()
  2328. }
  2329. // Validate inspects the fields of the type to determine if they are valid.
  2330. func (s *ImportSshPublicKeyInput) Validate() error {
  2331. invalidParams := request.ErrInvalidParams{Context: "ImportSshPublicKeyInput"}
  2332. if s.ServerId == nil {
  2333. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  2334. }
  2335. if s.SshPublicKeyBody == nil {
  2336. invalidParams.Add(request.NewErrParamRequired("SshPublicKeyBody"))
  2337. }
  2338. if s.UserName == nil {
  2339. invalidParams.Add(request.NewErrParamRequired("UserName"))
  2340. }
  2341. if invalidParams.Len() > 0 {
  2342. return invalidParams
  2343. }
  2344. return nil
  2345. }
  2346. // SetServerId sets the ServerId field's value.
  2347. func (s *ImportSshPublicKeyInput) SetServerId(v string) *ImportSshPublicKeyInput {
  2348. s.ServerId = &v
  2349. return s
  2350. }
  2351. // SetSshPublicKeyBody sets the SshPublicKeyBody field's value.
  2352. func (s *ImportSshPublicKeyInput) SetSshPublicKeyBody(v string) *ImportSshPublicKeyInput {
  2353. s.SshPublicKeyBody = &v
  2354. return s
  2355. }
  2356. // SetUserName sets the UserName field's value.
  2357. func (s *ImportSshPublicKeyInput) SetUserName(v string) *ImportSshPublicKeyInput {
  2358. s.UserName = &v
  2359. return s
  2360. }
  2361. // This response identifies the user, server they belong to, and the identifier
  2362. // of the SSH public key associated with that user. A user can have more than
  2363. // one key on each server that they are associate with.
  2364. type ImportSshPublicKeyOutput struct {
  2365. _ struct{} `type:"structure"`
  2366. // A system-assigned unique identifier for an SFTP server.
  2367. //
  2368. // ServerId is a required field
  2369. ServerId *string `type:"string" required:"true"`
  2370. // This identifier is the name given to a public key by the system that was
  2371. // imported.
  2372. //
  2373. // SshPublicKeyId is a required field
  2374. SshPublicKeyId *string `type:"string" required:"true"`
  2375. // A user name assigned to the ServerID value that you specified.
  2376. //
  2377. // UserName is a required field
  2378. UserName *string `type:"string" required:"true"`
  2379. }
  2380. // String returns the string representation
  2381. func (s ImportSshPublicKeyOutput) String() string {
  2382. return awsutil.Prettify(s)
  2383. }
  2384. // GoString returns the string representation
  2385. func (s ImportSshPublicKeyOutput) GoString() string {
  2386. return s.String()
  2387. }
  2388. // SetServerId sets the ServerId field's value.
  2389. func (s *ImportSshPublicKeyOutput) SetServerId(v string) *ImportSshPublicKeyOutput {
  2390. s.ServerId = &v
  2391. return s
  2392. }
  2393. // SetSshPublicKeyId sets the SshPublicKeyId field's value.
  2394. func (s *ImportSshPublicKeyOutput) SetSshPublicKeyId(v string) *ImportSshPublicKeyOutput {
  2395. s.SshPublicKeyId = &v
  2396. return s
  2397. }
  2398. // SetUserName sets the UserName field's value.
  2399. func (s *ImportSshPublicKeyOutput) SetUserName(v string) *ImportSshPublicKeyOutput {
  2400. s.UserName = &v
  2401. return s
  2402. }
  2403. type ListServersInput struct {
  2404. _ struct{} `type:"structure"`
  2405. // Specifies the number of servers to return as a response to the ListServers
  2406. // query.
  2407. MaxResults *int64 `min:"1" type:"integer"`
  2408. // When additional results are obtained from the ListServers command, a NextToken
  2409. // parameter is returned in the output. You can then pass the NextToken parameter
  2410. // in a subsequent command to continue listing additional servers.
  2411. NextToken *string `min:"1" type:"string"`
  2412. }
  2413. // String returns the string representation
  2414. func (s ListServersInput) String() string {
  2415. return awsutil.Prettify(s)
  2416. }
  2417. // GoString returns the string representation
  2418. func (s ListServersInput) GoString() string {
  2419. return s.String()
  2420. }
  2421. // Validate inspects the fields of the type to determine if they are valid.
  2422. func (s *ListServersInput) Validate() error {
  2423. invalidParams := request.ErrInvalidParams{Context: "ListServersInput"}
  2424. if s.MaxResults != nil && *s.MaxResults < 1 {
  2425. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2426. }
  2427. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2428. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2429. }
  2430. if invalidParams.Len() > 0 {
  2431. return invalidParams
  2432. }
  2433. return nil
  2434. }
  2435. // SetMaxResults sets the MaxResults field's value.
  2436. func (s *ListServersInput) SetMaxResults(v int64) *ListServersInput {
  2437. s.MaxResults = &v
  2438. return s
  2439. }
  2440. // SetNextToken sets the NextToken field's value.
  2441. func (s *ListServersInput) SetNextToken(v string) *ListServersInput {
  2442. s.NextToken = &v
  2443. return s
  2444. }
  2445. type ListServersOutput struct {
  2446. _ struct{} `type:"structure"`
  2447. // When you can get additional results from the ListServers operation, a NextToken
  2448. // parameter is returned in the output. In a following command, you can pass
  2449. // in the NextToken parameter to continue listing additional servers.
  2450. NextToken *string `min:"1" type:"string"`
  2451. // An array of servers that were listed.
  2452. //
  2453. // Servers is a required field
  2454. Servers []*ListedServer `type:"list" required:"true"`
  2455. }
  2456. // String returns the string representation
  2457. func (s ListServersOutput) String() string {
  2458. return awsutil.Prettify(s)
  2459. }
  2460. // GoString returns the string representation
  2461. func (s ListServersOutput) GoString() string {
  2462. return s.String()
  2463. }
  2464. // SetNextToken sets the NextToken field's value.
  2465. func (s *ListServersOutput) SetNextToken(v string) *ListServersOutput {
  2466. s.NextToken = &v
  2467. return s
  2468. }
  2469. // SetServers sets the Servers field's value.
  2470. func (s *ListServersOutput) SetServers(v []*ListedServer) *ListServersOutput {
  2471. s.Servers = v
  2472. return s
  2473. }
  2474. type ListTagsForResourceInput struct {
  2475. _ struct{} `type:"structure"`
  2476. // Requests the tags associated with a particular Amazon Resource Name (ARN).
  2477. // An ARN is an identifier for a specific AWS resource, such as a server, user,
  2478. // or role.
  2479. //
  2480. // Arn is a required field
  2481. Arn *string `min:"20" type:"string" required:"true"`
  2482. MaxResults *int64 `min:"1" type:"integer"`
  2483. NextToken *string `min:"1" type:"string"`
  2484. }
  2485. // String returns the string representation
  2486. func (s ListTagsForResourceInput) String() string {
  2487. return awsutil.Prettify(s)
  2488. }
  2489. // GoString returns the string representation
  2490. func (s ListTagsForResourceInput) GoString() string {
  2491. return s.String()
  2492. }
  2493. // Validate inspects the fields of the type to determine if they are valid.
  2494. func (s *ListTagsForResourceInput) Validate() error {
  2495. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  2496. if s.Arn == nil {
  2497. invalidParams.Add(request.NewErrParamRequired("Arn"))
  2498. }
  2499. if s.Arn != nil && len(*s.Arn) < 20 {
  2500. invalidParams.Add(request.NewErrParamMinLen("Arn", 20))
  2501. }
  2502. if s.MaxResults != nil && *s.MaxResults < 1 {
  2503. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2504. }
  2505. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2506. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2507. }
  2508. if invalidParams.Len() > 0 {
  2509. return invalidParams
  2510. }
  2511. return nil
  2512. }
  2513. // SetArn sets the Arn field's value.
  2514. func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput {
  2515. s.Arn = &v
  2516. return s
  2517. }
  2518. // SetMaxResults sets the MaxResults field's value.
  2519. func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput {
  2520. s.MaxResults = &v
  2521. return s
  2522. }
  2523. // SetNextToken sets the NextToken field's value.
  2524. func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
  2525. s.NextToken = &v
  2526. return s
  2527. }
  2528. type ListTagsForResourceOutput struct {
  2529. _ struct{} `type:"structure"`
  2530. // This value is the ARN you specified to list the tags of.
  2531. Arn *string `min:"20" type:"string"`
  2532. NextToken *string `min:"1" type:"string"`
  2533. // Key-value pairs that are assigned to a resource, usually for the purpose
  2534. // of grouping and searching for items. Tags are metadata that you define that
  2535. // you can use for any purpose.
  2536. Tags []*Tag `min:"1" type:"list"`
  2537. }
  2538. // String returns the string representation
  2539. func (s ListTagsForResourceOutput) String() string {
  2540. return awsutil.Prettify(s)
  2541. }
  2542. // GoString returns the string representation
  2543. func (s ListTagsForResourceOutput) GoString() string {
  2544. return s.String()
  2545. }
  2546. // SetArn sets the Arn field's value.
  2547. func (s *ListTagsForResourceOutput) SetArn(v string) *ListTagsForResourceOutput {
  2548. s.Arn = &v
  2549. return s
  2550. }
  2551. // SetNextToken sets the NextToken field's value.
  2552. func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
  2553. s.NextToken = &v
  2554. return s
  2555. }
  2556. // SetTags sets the Tags field's value.
  2557. func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
  2558. s.Tags = v
  2559. return s
  2560. }
  2561. type ListUsersInput struct {
  2562. _ struct{} `type:"structure"`
  2563. // Specifies the number of users to return as a response to the ListUsers request.
  2564. MaxResults *int64 `min:"1" type:"integer"`
  2565. // When you can get additional results from the ListUsersListUsers call, a NextToken
  2566. // parameter is returned in the output. You can then pass in a subsequent command
  2567. // the NextToken parameter to continue listing additional users.
  2568. NextToken *string `min:"1" type:"string"`
  2569. // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP)
  2570. // server that has users are assigned to it.
  2571. //
  2572. // ServerId is a required field
  2573. ServerId *string `type:"string" required:"true"`
  2574. }
  2575. // String returns the string representation
  2576. func (s ListUsersInput) String() string {
  2577. return awsutil.Prettify(s)
  2578. }
  2579. // GoString returns the string representation
  2580. func (s ListUsersInput) GoString() string {
  2581. return s.String()
  2582. }
  2583. // Validate inspects the fields of the type to determine if they are valid.
  2584. func (s *ListUsersInput) Validate() error {
  2585. invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"}
  2586. if s.MaxResults != nil && *s.MaxResults < 1 {
  2587. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2588. }
  2589. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2590. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2591. }
  2592. if s.ServerId == nil {
  2593. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  2594. }
  2595. if invalidParams.Len() > 0 {
  2596. return invalidParams
  2597. }
  2598. return nil
  2599. }
  2600. // SetMaxResults sets the MaxResults field's value.
  2601. func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput {
  2602. s.MaxResults = &v
  2603. return s
  2604. }
  2605. // SetNextToken sets the NextToken field's value.
  2606. func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput {
  2607. s.NextToken = &v
  2608. return s
  2609. }
  2610. // SetServerId sets the ServerId field's value.
  2611. func (s *ListUsersInput) SetServerId(v string) *ListUsersInput {
  2612. s.ServerId = &v
  2613. return s
  2614. }
  2615. type ListUsersOutput struct {
  2616. _ struct{} `type:"structure"`
  2617. // When you can get additional results from the ListUsers call, a NextToken
  2618. // parameter is returned in the output. You can then pass in a subsequent command
  2619. // the NextToken parameter to continue listing additional users.
  2620. NextToken *string `min:"1" type:"string"`
  2621. // A system-assigned unique identifier for an SFTP server that the users are
  2622. // assigned to.
  2623. //
  2624. // ServerId is a required field
  2625. ServerId *string `type:"string" required:"true"`
  2626. // Returns the user accounts and their properties for the ServerId value that
  2627. // you specify.
  2628. //
  2629. // Users is a required field
  2630. Users []*ListedUser `type:"list" required:"true"`
  2631. }
  2632. // String returns the string representation
  2633. func (s ListUsersOutput) String() string {
  2634. return awsutil.Prettify(s)
  2635. }
  2636. // GoString returns the string representation
  2637. func (s ListUsersOutput) GoString() string {
  2638. return s.String()
  2639. }
  2640. // SetNextToken sets the NextToken field's value.
  2641. func (s *ListUsersOutput) SetNextToken(v string) *ListUsersOutput {
  2642. s.NextToken = &v
  2643. return s
  2644. }
  2645. // SetServerId sets the ServerId field's value.
  2646. func (s *ListUsersOutput) SetServerId(v string) *ListUsersOutput {
  2647. s.ServerId = &v
  2648. return s
  2649. }
  2650. // SetUsers sets the Users field's value.
  2651. func (s *ListUsersOutput) SetUsers(v []*ListedUser) *ListUsersOutput {
  2652. s.Users = v
  2653. return s
  2654. }
  2655. // Returns properties of the server that was specified.
  2656. type ListedServer struct {
  2657. _ struct{} `type:"structure"`
  2658. // The unique Amazon Resource Name (ARN) for the server to be listed.
  2659. //
  2660. // Arn is a required field
  2661. Arn *string `min:"20" type:"string" required:"true"`
  2662. // The authentication method used to validate a user for the server that was
  2663. // specified. listed. This can include Secure Shell (SSH), user name and password
  2664. // combinations, or your own custom authentication method. Valid values include
  2665. // SERVICE_MANAGED or API_GATEWAY.
  2666. IdentityProviderType *string `type:"string" enum:"IdentityProviderType"`
  2667. // The AWS Identity and Access Management entity that allows the server to turn
  2668. // on Amazon CloudWatch logging.
  2669. LoggingRole *string `type:"string"`
  2670. // This value is the unique system assigned identifier for the SFTP servers
  2671. // that were listed.
  2672. ServerId *string `type:"string"`
  2673. // This property describes the condition of the SFTP server for the server that
  2674. // was described. A value of ONLINE> indicates that the server can accept jobs
  2675. // and transfer files. A State value of OFFLINE means that the server cannot
  2676. // perform file transfer operations.
  2677. //
  2678. // The states of STARTING and STOPPING indicated that the server is in an intermediate
  2679. // state, either not fully able to respond, or not fully offline. The values
  2680. // of START_FAILED or STOP_FAILED can indicate an error condition.
  2681. State *string `type:"string" enum:"State"`
  2682. // This property is a numeric value that indicates the number of users that
  2683. // are assigned to the SFTP server you specified with the ServerId.
  2684. UserCount *int64 `type:"integer"`
  2685. }
  2686. // String returns the string representation
  2687. func (s ListedServer) String() string {
  2688. return awsutil.Prettify(s)
  2689. }
  2690. // GoString returns the string representation
  2691. func (s ListedServer) GoString() string {
  2692. return s.String()
  2693. }
  2694. // SetArn sets the Arn field's value.
  2695. func (s *ListedServer) SetArn(v string) *ListedServer {
  2696. s.Arn = &v
  2697. return s
  2698. }
  2699. // SetIdentityProviderType sets the IdentityProviderType field's value.
  2700. func (s *ListedServer) SetIdentityProviderType(v string) *ListedServer {
  2701. s.IdentityProviderType = &v
  2702. return s
  2703. }
  2704. // SetLoggingRole sets the LoggingRole field's value.
  2705. func (s *ListedServer) SetLoggingRole(v string) *ListedServer {
  2706. s.LoggingRole = &v
  2707. return s
  2708. }
  2709. // SetServerId sets the ServerId field's value.
  2710. func (s *ListedServer) SetServerId(v string) *ListedServer {
  2711. s.ServerId = &v
  2712. return s
  2713. }
  2714. // SetState sets the State field's value.
  2715. func (s *ListedServer) SetState(v string) *ListedServer {
  2716. s.State = &v
  2717. return s
  2718. }
  2719. // SetUserCount sets the UserCount field's value.
  2720. func (s *ListedServer) SetUserCount(v int64) *ListedServer {
  2721. s.UserCount = &v
  2722. return s
  2723. }
  2724. // Returns properties of the user that you specify.
  2725. type ListedUser struct {
  2726. _ struct{} `type:"structure"`
  2727. // This property is the unique Amazon Resource Name (ARN) for the user that
  2728. // you wish to learn about.
  2729. //
  2730. // Arn is a required field
  2731. Arn *string `min:"20" type:"string" required:"true"`
  2732. // This value specifies the location that files are written to or read from
  2733. // an Amazon S3 bucket for the user you specify by their ARN.
  2734. HomeDirectory *string `type:"string"`
  2735. // The role in use by this user. A role is an AWS Identity and Access Management
  2736. // (IAM) entity that in this case allows the SFTP server to act on a user's
  2737. // behalf. It allows the server to inherit the trust relationship that enables
  2738. // that user to perform file operations to their Amazon S3 bucket.
  2739. Role *string `type:"string"`
  2740. // This value is the number of SSH public keys stored for the user you specified.
  2741. SshPublicKeyCount *int64 `type:"integer"`
  2742. // The name of the user whose ARN was specified. User names are used for authentication
  2743. // purposes.
  2744. UserName *string `type:"string"`
  2745. }
  2746. // String returns the string representation
  2747. func (s ListedUser) String() string {
  2748. return awsutil.Prettify(s)
  2749. }
  2750. // GoString returns the string representation
  2751. func (s ListedUser) GoString() string {
  2752. return s.String()
  2753. }
  2754. // SetArn sets the Arn field's value.
  2755. func (s *ListedUser) SetArn(v string) *ListedUser {
  2756. s.Arn = &v
  2757. return s
  2758. }
  2759. // SetHomeDirectory sets the HomeDirectory field's value.
  2760. func (s *ListedUser) SetHomeDirectory(v string) *ListedUser {
  2761. s.HomeDirectory = &v
  2762. return s
  2763. }
  2764. // SetRole sets the Role field's value.
  2765. func (s *ListedUser) SetRole(v string) *ListedUser {
  2766. s.Role = &v
  2767. return s
  2768. }
  2769. // SetSshPublicKeyCount sets the SshPublicKeyCount field's value.
  2770. func (s *ListedUser) SetSshPublicKeyCount(v int64) *ListedUser {
  2771. s.SshPublicKeyCount = &v
  2772. return s
  2773. }
  2774. // SetUserName sets the UserName field's value.
  2775. func (s *ListedUser) SetUserName(v string) *ListedUser {
  2776. s.UserName = &v
  2777. return s
  2778. }
  2779. // Provides information about the public Secure Shell (SSH) key that is associated
  2780. // with a user account for a specific server (as identified by ServerId). The
  2781. // information returned includes the date the key was imported, the public key
  2782. // contents, and the public key ID. A user can store more than one SSH public
  2783. // key associated with their user name on a specific SFTP server.
  2784. type SshPublicKey struct {
  2785. _ struct{} `type:"structure"`
  2786. // The date that the public key was added to the user account.
  2787. //
  2788. // DateImported is a required field
  2789. DateImported *time.Time `type:"timestamp" required:"true"`
  2790. // The content of the SSH public key as specified by the PublicKeyId.
  2791. //
  2792. // SshPublicKeyBody is a required field
  2793. SshPublicKeyBody *string `type:"string" required:"true"`
  2794. // The SshPublicKeyId parameter contains the identifier of the public key.
  2795. //
  2796. // SshPublicKeyId is a required field
  2797. SshPublicKeyId *string `type:"string" required:"true"`
  2798. }
  2799. // String returns the string representation
  2800. func (s SshPublicKey) String() string {
  2801. return awsutil.Prettify(s)
  2802. }
  2803. // GoString returns the string representation
  2804. func (s SshPublicKey) GoString() string {
  2805. return s.String()
  2806. }
  2807. // SetDateImported sets the DateImported field's value.
  2808. func (s *SshPublicKey) SetDateImported(v time.Time) *SshPublicKey {
  2809. s.DateImported = &v
  2810. return s
  2811. }
  2812. // SetSshPublicKeyBody sets the SshPublicKeyBody field's value.
  2813. func (s *SshPublicKey) SetSshPublicKeyBody(v string) *SshPublicKey {
  2814. s.SshPublicKeyBody = &v
  2815. return s
  2816. }
  2817. // SetSshPublicKeyId sets the SshPublicKeyId field's value.
  2818. func (s *SshPublicKey) SetSshPublicKeyId(v string) *SshPublicKey {
  2819. s.SshPublicKeyId = &v
  2820. return s
  2821. }
  2822. type StartServerInput struct {
  2823. _ struct{} `type:"structure"`
  2824. // A system-assigned unique identifier for an SFTP server that you start.
  2825. //
  2826. // ServerId is a required field
  2827. ServerId *string `type:"string" required:"true"`
  2828. }
  2829. // String returns the string representation
  2830. func (s StartServerInput) String() string {
  2831. return awsutil.Prettify(s)
  2832. }
  2833. // GoString returns the string representation
  2834. func (s StartServerInput) GoString() string {
  2835. return s.String()
  2836. }
  2837. // Validate inspects the fields of the type to determine if they are valid.
  2838. func (s *StartServerInput) Validate() error {
  2839. invalidParams := request.ErrInvalidParams{Context: "StartServerInput"}
  2840. if s.ServerId == nil {
  2841. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  2842. }
  2843. if invalidParams.Len() > 0 {
  2844. return invalidParams
  2845. }
  2846. return nil
  2847. }
  2848. // SetServerId sets the ServerId field's value.
  2849. func (s *StartServerInput) SetServerId(v string) *StartServerInput {
  2850. s.ServerId = &v
  2851. return s
  2852. }
  2853. type StartServerOutput struct {
  2854. _ struct{} `type:"structure"`
  2855. }
  2856. // String returns the string representation
  2857. func (s StartServerOutput) String() string {
  2858. return awsutil.Prettify(s)
  2859. }
  2860. // GoString returns the string representation
  2861. func (s StartServerOutput) GoString() string {
  2862. return s.String()
  2863. }
  2864. type StopServerInput struct {
  2865. _ struct{} `type:"structure"`
  2866. // A system-assigned unique identifier for an SFTP server that you stopped.
  2867. //
  2868. // ServerId is a required field
  2869. ServerId *string `type:"string" required:"true"`
  2870. }
  2871. // String returns the string representation
  2872. func (s StopServerInput) String() string {
  2873. return awsutil.Prettify(s)
  2874. }
  2875. // GoString returns the string representation
  2876. func (s StopServerInput) GoString() string {
  2877. return s.String()
  2878. }
  2879. // Validate inspects the fields of the type to determine if they are valid.
  2880. func (s *StopServerInput) Validate() error {
  2881. invalidParams := request.ErrInvalidParams{Context: "StopServerInput"}
  2882. if s.ServerId == nil {
  2883. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  2884. }
  2885. if invalidParams.Len() > 0 {
  2886. return invalidParams
  2887. }
  2888. return nil
  2889. }
  2890. // SetServerId sets the ServerId field's value.
  2891. func (s *StopServerInput) SetServerId(v string) *StopServerInput {
  2892. s.ServerId = &v
  2893. return s
  2894. }
  2895. type StopServerOutput struct {
  2896. _ struct{} `type:"structure"`
  2897. }
  2898. // String returns the string representation
  2899. func (s StopServerOutput) String() string {
  2900. return awsutil.Prettify(s)
  2901. }
  2902. // GoString returns the string representation
  2903. func (s StopServerOutput) GoString() string {
  2904. return s.String()
  2905. }
  2906. // Creates a key-value pair for a specific resource. Tags are metadata that
  2907. // you can use to search for and group a resource for various purposes. You
  2908. // can apply tags to servers, users, and roles. A tag key can take more than
  2909. // one value. For example, to group servers for accounting purposes, you might
  2910. // create a tag called Group and assign the values Research and Accounting to
  2911. // that group.
  2912. type Tag struct {
  2913. _ struct{} `type:"structure"`
  2914. // The name assigned to the tag that you create.
  2915. //
  2916. // Key is a required field
  2917. Key *string `type:"string" required:"true"`
  2918. // This property contains one or more values that you assigned to the key name
  2919. // you create.
  2920. //
  2921. // Value is a required field
  2922. Value *string `type:"string" required:"true"`
  2923. }
  2924. // String returns the string representation
  2925. func (s Tag) String() string {
  2926. return awsutil.Prettify(s)
  2927. }
  2928. // GoString returns the string representation
  2929. func (s Tag) GoString() string {
  2930. return s.String()
  2931. }
  2932. // Validate inspects the fields of the type to determine if they are valid.
  2933. func (s *Tag) Validate() error {
  2934. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  2935. if s.Key == nil {
  2936. invalidParams.Add(request.NewErrParamRequired("Key"))
  2937. }
  2938. if s.Value == nil {
  2939. invalidParams.Add(request.NewErrParamRequired("Value"))
  2940. }
  2941. if invalidParams.Len() > 0 {
  2942. return invalidParams
  2943. }
  2944. return nil
  2945. }
  2946. // SetKey sets the Key field's value.
  2947. func (s *Tag) SetKey(v string) *Tag {
  2948. s.Key = &v
  2949. return s
  2950. }
  2951. // SetValue sets the Value field's value.
  2952. func (s *Tag) SetValue(v string) *Tag {
  2953. s.Value = &v
  2954. return s
  2955. }
  2956. type TagResourceInput struct {
  2957. _ struct{} `type:"structure"`
  2958. // An Amazon Resource Name (ARN) for a specific AWS resource, such as a server,
  2959. // user, or role.
  2960. //
  2961. // Arn is a required field
  2962. Arn *string `min:"20" type:"string" required:"true"`
  2963. // Key-value pairs assigned to ARNs that you can use to group and search for
  2964. // resources by type. You can attach this metadata to user accounts for any
  2965. // purpose.
  2966. //
  2967. // Tags is a required field
  2968. Tags []*Tag `min:"1" type:"list" required:"true"`
  2969. }
  2970. // String returns the string representation
  2971. func (s TagResourceInput) String() string {
  2972. return awsutil.Prettify(s)
  2973. }
  2974. // GoString returns the string representation
  2975. func (s TagResourceInput) GoString() string {
  2976. return s.String()
  2977. }
  2978. // Validate inspects the fields of the type to determine if they are valid.
  2979. func (s *TagResourceInput) Validate() error {
  2980. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  2981. if s.Arn == nil {
  2982. invalidParams.Add(request.NewErrParamRequired("Arn"))
  2983. }
  2984. if s.Arn != nil && len(*s.Arn) < 20 {
  2985. invalidParams.Add(request.NewErrParamMinLen("Arn", 20))
  2986. }
  2987. if s.Tags == nil {
  2988. invalidParams.Add(request.NewErrParamRequired("Tags"))
  2989. }
  2990. if s.Tags != nil && len(s.Tags) < 1 {
  2991. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  2992. }
  2993. if s.Tags != nil {
  2994. for i, v := range s.Tags {
  2995. if v == nil {
  2996. continue
  2997. }
  2998. if err := v.Validate(); err != nil {
  2999. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3000. }
  3001. }
  3002. }
  3003. if invalidParams.Len() > 0 {
  3004. return invalidParams
  3005. }
  3006. return nil
  3007. }
  3008. // SetArn sets the Arn field's value.
  3009. func (s *TagResourceInput) SetArn(v string) *TagResourceInput {
  3010. s.Arn = &v
  3011. return s
  3012. }
  3013. // SetTags sets the Tags field's value.
  3014. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  3015. s.Tags = v
  3016. return s
  3017. }
  3018. type TagResourceOutput struct {
  3019. _ struct{} `type:"structure"`
  3020. }
  3021. // String returns the string representation
  3022. func (s TagResourceOutput) String() string {
  3023. return awsutil.Prettify(s)
  3024. }
  3025. // GoString returns the string representation
  3026. func (s TagResourceOutput) GoString() string {
  3027. return s.String()
  3028. }
  3029. type TestIdentityProviderInput struct {
  3030. _ struct{} `type:"structure"`
  3031. // A system assigned identifier for a specific server. That server's user authentication
  3032. // method is tested with a user name and password.
  3033. //
  3034. // ServerId is a required field
  3035. ServerId *string `type:"string" required:"true"`
  3036. // This request parameter is name of the user account to be tested.
  3037. //
  3038. // UserName is a required field
  3039. UserName *string `type:"string" required:"true"`
  3040. // The password of the user account to be tested.
  3041. UserPassword *string `type:"string"`
  3042. }
  3043. // String returns the string representation
  3044. func (s TestIdentityProviderInput) String() string {
  3045. return awsutil.Prettify(s)
  3046. }
  3047. // GoString returns the string representation
  3048. func (s TestIdentityProviderInput) GoString() string {
  3049. return s.String()
  3050. }
  3051. // Validate inspects the fields of the type to determine if they are valid.
  3052. func (s *TestIdentityProviderInput) Validate() error {
  3053. invalidParams := request.ErrInvalidParams{Context: "TestIdentityProviderInput"}
  3054. if s.ServerId == nil {
  3055. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  3056. }
  3057. if s.UserName == nil {
  3058. invalidParams.Add(request.NewErrParamRequired("UserName"))
  3059. }
  3060. if invalidParams.Len() > 0 {
  3061. return invalidParams
  3062. }
  3063. return nil
  3064. }
  3065. // SetServerId sets the ServerId field's value.
  3066. func (s *TestIdentityProviderInput) SetServerId(v string) *TestIdentityProviderInput {
  3067. s.ServerId = &v
  3068. return s
  3069. }
  3070. // SetUserName sets the UserName field's value.
  3071. func (s *TestIdentityProviderInput) SetUserName(v string) *TestIdentityProviderInput {
  3072. s.UserName = &v
  3073. return s
  3074. }
  3075. // SetUserPassword sets the UserPassword field's value.
  3076. func (s *TestIdentityProviderInput) SetUserPassword(v string) *TestIdentityProviderInput {
  3077. s.UserPassword = &v
  3078. return s
  3079. }
  3080. type TestIdentityProviderOutput struct {
  3081. _ struct{} `type:"structure"`
  3082. // The result of the authorization test as a message.
  3083. Message *string `type:"string"`
  3084. // The HTTP status code that is the response from your API Gateway.
  3085. //
  3086. // StatusCode is a required field
  3087. StatusCode *int64 `type:"integer" required:"true"`
  3088. // The endpoint of the service used to authenticate a user.
  3089. //
  3090. // Url is a required field
  3091. Url *string `type:"string" required:"true"`
  3092. }
  3093. // String returns the string representation
  3094. func (s TestIdentityProviderOutput) String() string {
  3095. return awsutil.Prettify(s)
  3096. }
  3097. // GoString returns the string representation
  3098. func (s TestIdentityProviderOutput) GoString() string {
  3099. return s.String()
  3100. }
  3101. // SetMessage sets the Message field's value.
  3102. func (s *TestIdentityProviderOutput) SetMessage(v string) *TestIdentityProviderOutput {
  3103. s.Message = &v
  3104. return s
  3105. }
  3106. // SetStatusCode sets the StatusCode field's value.
  3107. func (s *TestIdentityProviderOutput) SetStatusCode(v int64) *TestIdentityProviderOutput {
  3108. s.StatusCode = &v
  3109. return s
  3110. }
  3111. // SetUrl sets the Url field's value.
  3112. func (s *TestIdentityProviderOutput) SetUrl(v string) *TestIdentityProviderOutput {
  3113. s.Url = &v
  3114. return s
  3115. }
  3116. type UntagResourceInput struct {
  3117. _ struct{} `type:"structure"`
  3118. // This is the value of the resource that will have the tag removed. An Amazon
  3119. // Resource Name (ARN) is an identifier for a specific AWS resource, such as
  3120. // a server, user, or role.
  3121. //
  3122. // Arn is a required field
  3123. Arn *string `min:"20" type:"string" required:"true"`
  3124. // TagKeys are key-value pairs assigned to ARNs that can be used to group and
  3125. // search for resources by type. This metadata can be attached to resources
  3126. // for any purpose.
  3127. //
  3128. // TagKeys is a required field
  3129. TagKeys []*string `min:"1" type:"list" required:"true"`
  3130. }
  3131. // String returns the string representation
  3132. func (s UntagResourceInput) String() string {
  3133. return awsutil.Prettify(s)
  3134. }
  3135. // GoString returns the string representation
  3136. func (s UntagResourceInput) GoString() string {
  3137. return s.String()
  3138. }
  3139. // Validate inspects the fields of the type to determine if they are valid.
  3140. func (s *UntagResourceInput) Validate() error {
  3141. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  3142. if s.Arn == nil {
  3143. invalidParams.Add(request.NewErrParamRequired("Arn"))
  3144. }
  3145. if s.Arn != nil && len(*s.Arn) < 20 {
  3146. invalidParams.Add(request.NewErrParamMinLen("Arn", 20))
  3147. }
  3148. if s.TagKeys == nil {
  3149. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  3150. }
  3151. if s.TagKeys != nil && len(s.TagKeys) < 1 {
  3152. invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
  3153. }
  3154. if invalidParams.Len() > 0 {
  3155. return invalidParams
  3156. }
  3157. return nil
  3158. }
  3159. // SetArn sets the Arn field's value.
  3160. func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput {
  3161. s.Arn = &v
  3162. return s
  3163. }
  3164. // SetTagKeys sets the TagKeys field's value.
  3165. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  3166. s.TagKeys = v
  3167. return s
  3168. }
  3169. type UntagResourceOutput struct {
  3170. _ struct{} `type:"structure"`
  3171. }
  3172. // String returns the string representation
  3173. func (s UntagResourceOutput) String() string {
  3174. return awsutil.Prettify(s)
  3175. }
  3176. // GoString returns the string representation
  3177. func (s UntagResourceOutput) GoString() string {
  3178. return s.String()
  3179. }
  3180. type UpdateServerInput struct {
  3181. _ struct{} `type:"structure"`
  3182. // This response parameter is an array containing all of the information required
  3183. // to call a customer's authentication API method.
  3184. IdentityProviderDetails *IdentityProviderDetails `type:"structure"`
  3185. // Changes the AWS Identity and Access Management (IAM) role that allows Amazon
  3186. // S3 events to be logged in Amazon CloudWatch, turning logging on or off.
  3187. LoggingRole *string `type:"string"`
  3188. // A system-assigned unique identifier for an SFTP server instance that the
  3189. // user account is assigned to.
  3190. //
  3191. // ServerId is a required field
  3192. ServerId *string `type:"string" required:"true"`
  3193. }
  3194. // String returns the string representation
  3195. func (s UpdateServerInput) String() string {
  3196. return awsutil.Prettify(s)
  3197. }
  3198. // GoString returns the string representation
  3199. func (s UpdateServerInput) GoString() string {
  3200. return s.String()
  3201. }
  3202. // Validate inspects the fields of the type to determine if they are valid.
  3203. func (s *UpdateServerInput) Validate() error {
  3204. invalidParams := request.ErrInvalidParams{Context: "UpdateServerInput"}
  3205. if s.ServerId == nil {
  3206. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  3207. }
  3208. if invalidParams.Len() > 0 {
  3209. return invalidParams
  3210. }
  3211. return nil
  3212. }
  3213. // SetIdentityProviderDetails sets the IdentityProviderDetails field's value.
  3214. func (s *UpdateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *UpdateServerInput {
  3215. s.IdentityProviderDetails = v
  3216. return s
  3217. }
  3218. // SetLoggingRole sets the LoggingRole field's value.
  3219. func (s *UpdateServerInput) SetLoggingRole(v string) *UpdateServerInput {
  3220. s.LoggingRole = &v
  3221. return s
  3222. }
  3223. // SetServerId sets the ServerId field's value.
  3224. func (s *UpdateServerInput) SetServerId(v string) *UpdateServerInput {
  3225. s.ServerId = &v
  3226. return s
  3227. }
  3228. type UpdateServerOutput struct {
  3229. _ struct{} `type:"structure"`
  3230. // A system-assigned unique identifier for an SFTP server that the user account
  3231. // is assigned to.
  3232. //
  3233. // ServerId is a required field
  3234. ServerId *string `type:"string" required:"true"`
  3235. }
  3236. // String returns the string representation
  3237. func (s UpdateServerOutput) String() string {
  3238. return awsutil.Prettify(s)
  3239. }
  3240. // GoString returns the string representation
  3241. func (s UpdateServerOutput) GoString() string {
  3242. return s.String()
  3243. }
  3244. // SetServerId sets the ServerId field's value.
  3245. func (s *UpdateServerOutput) SetServerId(v string) *UpdateServerOutput {
  3246. s.ServerId = &v
  3247. return s
  3248. }
  3249. type UpdateUserInput struct {
  3250. _ struct{} `type:"structure"`
  3251. // The HomeDirectory parameter specifies the landing directory (folder) for
  3252. // a user when they log in to the server using their client. An example would
  3253. // be: /home/username.
  3254. HomeDirectory *string `type:"string"`
  3255. // Allows you to supply a scope-down policy for your user so you can use the
  3256. // same AWS Identity and Access Management (IAM) role across multiple users.
  3257. // The policy scopes down users access to portions of your Amazon S3 bucket.
  3258. // Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory},
  3259. // and ${Transfer:HomeBucket}.
  3260. Policy *string `type:"string"`
  3261. // The IAM role that controls your user’s access to your Amazon S3 bucket. The
  3262. // policies attached to this role will determine the level of access you want
  3263. // to provide your users when transferring files into and out of your Amazon
  3264. // S3 bucket or buckets. The IAM role should also contain a trust relationship
  3265. // that allows the Secure File Transfer Protocol (SFTP) server to access your
  3266. // resources when servicing your SFTP user’s transfer requests.
  3267. Role *string `type:"string"`
  3268. // A system-assigned unique identifier for an SFTP server instance that the
  3269. // user account is assigned to.
  3270. //
  3271. // ServerId is a required field
  3272. ServerId *string `type:"string" required:"true"`
  3273. // A unique string that identifies a user and is associated with a server as
  3274. // specified by the ServerId. This is the string that will be used by your user
  3275. // when they log in to your SFTP server.
  3276. //
  3277. // UserName is a required field
  3278. UserName *string `type:"string" required:"true"`
  3279. }
  3280. // String returns the string representation
  3281. func (s UpdateUserInput) String() string {
  3282. return awsutil.Prettify(s)
  3283. }
  3284. // GoString returns the string representation
  3285. func (s UpdateUserInput) GoString() string {
  3286. return s.String()
  3287. }
  3288. // Validate inspects the fields of the type to determine if they are valid.
  3289. func (s *UpdateUserInput) Validate() error {
  3290. invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"}
  3291. if s.ServerId == nil {
  3292. invalidParams.Add(request.NewErrParamRequired("ServerId"))
  3293. }
  3294. if s.UserName == nil {
  3295. invalidParams.Add(request.NewErrParamRequired("UserName"))
  3296. }
  3297. if invalidParams.Len() > 0 {
  3298. return invalidParams
  3299. }
  3300. return nil
  3301. }
  3302. // SetHomeDirectory sets the HomeDirectory field's value.
  3303. func (s *UpdateUserInput) SetHomeDirectory(v string) *UpdateUserInput {
  3304. s.HomeDirectory = &v
  3305. return s
  3306. }
  3307. // SetPolicy sets the Policy field's value.
  3308. func (s *UpdateUserInput) SetPolicy(v string) *UpdateUserInput {
  3309. s.Policy = &v
  3310. return s
  3311. }
  3312. // SetRole sets the Role field's value.
  3313. func (s *UpdateUserInput) SetRole(v string) *UpdateUserInput {
  3314. s.Role = &v
  3315. return s
  3316. }
  3317. // SetServerId sets the ServerId field's value.
  3318. func (s *UpdateUserInput) SetServerId(v string) *UpdateUserInput {
  3319. s.ServerId = &v
  3320. return s
  3321. }
  3322. // SetUserName sets the UserName field's value.
  3323. func (s *UpdateUserInput) SetUserName(v string) *UpdateUserInput {
  3324. s.UserName = &v
  3325. return s
  3326. }
  3327. // UpdateUserResponse returns the user name and server identifier for the request
  3328. // to update a user's properties.
  3329. type UpdateUserOutput struct {
  3330. _ struct{} `type:"structure"`
  3331. // A system-assigned unique identifier for an SFTP server instance that the
  3332. // user account is assigned to.
  3333. //
  3334. // ServerId is a required field
  3335. ServerId *string `type:"string" required:"true"`
  3336. // The unique identifier for a user that is assigned to the SFTP server instance
  3337. // that was specified in the request.
  3338. //
  3339. // UserName is a required field
  3340. UserName *string `type:"string" required:"true"`
  3341. }
  3342. // String returns the string representation
  3343. func (s UpdateUserOutput) String() string {
  3344. return awsutil.Prettify(s)
  3345. }
  3346. // GoString returns the string representation
  3347. func (s UpdateUserOutput) GoString() string {
  3348. return s.String()
  3349. }
  3350. // SetServerId sets the ServerId field's value.
  3351. func (s *UpdateUserOutput) SetServerId(v string) *UpdateUserOutput {
  3352. s.ServerId = &v
  3353. return s
  3354. }
  3355. // SetUserName sets the UserName field's value.
  3356. func (s *UpdateUserOutput) SetUserName(v string) *UpdateUserOutput {
  3357. s.UserName = &v
  3358. return s
  3359. }
  3360. // Returns information related to the type of user authentication that is in
  3361. // use for a server's users. For SERVICE_MANAGED authentication, the Secure
  3362. // Shell (SSH) public keys are stored with a user on an SFTP server instance.
  3363. // For API_GATEWAY authentication, your custom authentication method is implemented
  3364. // by using an API call. A server can only have one method of authentication.
  3365. const (
  3366. // IdentityProviderTypeServiceManaged is a IdentityProviderType enum value
  3367. IdentityProviderTypeServiceManaged = "SERVICE_MANAGED"
  3368. // IdentityProviderTypeApiGateway is a IdentityProviderType enum value
  3369. IdentityProviderTypeApiGateway = "API_GATEWAY"
  3370. )
  3371. // Describes the condition of the SFTP server with respect to its ability to
  3372. // perform file operations. There are six possible states: OFFLINE, ONLINE,
  3373. // STARTING, STOPPING, START_FAILED, and STOP_FAILED.
  3374. //
  3375. // OFFLINE indicates that the SFTP server exists, but that it is not available
  3376. // for file operations. ONLINE indicates that the SFTP server is available to
  3377. // perform file operations. STARTING indicates that the SFTP server's was instantiated,
  3378. // but the server is not yet available to perform file operations. Under normal
  3379. // conditions, it can take a couple of minutes for an SFTP server to be completely
  3380. // operational. Both START_FAILED and STOP_FAILED are error conditions.
  3381. const (
  3382. // StateOffline is a State enum value
  3383. StateOffline = "OFFLINE"
  3384. // StateOnline is a State enum value
  3385. StateOnline = "ONLINE"
  3386. // StateStarting is a State enum value
  3387. StateStarting = "STARTING"
  3388. // StateStopping is a State enum value
  3389. StateStopping = "STOPPING"
  3390. // StateStartFailed is a State enum value
  3391. StateStartFailed = "START_FAILED"
  3392. // StateStopFailed is a State enum value
  3393. StateStopFailed = "STOP_FAILED"
  3394. )