api.go 182 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package datasync
  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 opCancelTaskExecution = "CancelTaskExecution"
  13. // CancelTaskExecutionRequest generates a "aws/request.Request" representing the
  14. // client's request for the CancelTaskExecution 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 CancelTaskExecution for more information on using the CancelTaskExecution
  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 CancelTaskExecutionRequest method.
  29. // req, resp := client.CancelTaskExecutionRequest(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/datasync-2018-11-09/CancelTaskExecution
  37. func (c *DataSync) CancelTaskExecutionRequest(input *CancelTaskExecutionInput) (req *request.Request, output *CancelTaskExecutionOutput) {
  38. op := &request.Operation{
  39. Name: opCancelTaskExecution,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &CancelTaskExecutionInput{}
  45. }
  46. output = &CancelTaskExecutionOutput{}
  47. req = c.newRequest(op, input, output)
  48. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  49. return
  50. }
  51. // CancelTaskExecution API operation for AWS DataSync.
  52. //
  53. // Cancels execution of a task.
  54. //
  55. // When you cancel a task execution, the transfer of some files are abruptly
  56. // interrupted. The contents of files that are transferred to the destination
  57. // might be incomplete or inconsistent with the source files. However, if you
  58. // start a new task execution on the same task and you allow the task execution
  59. // to complete, file content on the destination is complete and consistent.
  60. // This applies to other unexpected failures that interrupt a task execution.
  61. // In all of these cases, AWS DataSync successfully complete the transfer when
  62. // you start the next task execution.
  63. //
  64. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  65. // with awserr.Error's Code and Message methods to get detailed information about
  66. // the error.
  67. //
  68. // See the AWS API reference guide for AWS DataSync's
  69. // API operation CancelTaskExecution for usage and error information.
  70. //
  71. // Returned Error Codes:
  72. // * ErrCodeInvalidRequestException "InvalidRequestException"
  73. // This exception is thrown when the client submits a malformed request.
  74. //
  75. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CancelTaskExecution
  76. func (c *DataSync) CancelTaskExecution(input *CancelTaskExecutionInput) (*CancelTaskExecutionOutput, error) {
  77. req, out := c.CancelTaskExecutionRequest(input)
  78. return out, req.Send()
  79. }
  80. // CancelTaskExecutionWithContext is the same as CancelTaskExecution with the addition of
  81. // the ability to pass a context and additional request options.
  82. //
  83. // See CancelTaskExecution for details on how to use this API operation.
  84. //
  85. // The context must be non-nil and will be used for request cancellation. If
  86. // the context is nil a panic will occur. In the future the SDK may create
  87. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  88. // for more information on using Contexts.
  89. func (c *DataSync) CancelTaskExecutionWithContext(ctx aws.Context, input *CancelTaskExecutionInput, opts ...request.Option) (*CancelTaskExecutionOutput, error) {
  90. req, out := c.CancelTaskExecutionRequest(input)
  91. req.SetContext(ctx)
  92. req.ApplyOptions(opts...)
  93. return out, req.Send()
  94. }
  95. const opCreateAgent = "CreateAgent"
  96. // CreateAgentRequest generates a "aws/request.Request" representing the
  97. // client's request for the CreateAgent operation. The "output" return
  98. // value will be populated with the request's response once the request completes
  99. // successfully.
  100. //
  101. // Use "Send" method on the returned Request to send the API call to the service.
  102. // the "output" return value is not valid until after Send returns without error.
  103. //
  104. // See CreateAgent for more information on using the CreateAgent
  105. // API call, and error handling.
  106. //
  107. // This method is useful when you want to inject custom logic or configuration
  108. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  109. //
  110. //
  111. // // Example sending a request using the CreateAgentRequest method.
  112. // req, resp := client.CreateAgentRequest(params)
  113. //
  114. // err := req.Send()
  115. // if err == nil { // resp is now filled
  116. // fmt.Println(resp)
  117. // }
  118. //
  119. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent
  120. func (c *DataSync) CreateAgentRequest(input *CreateAgentInput) (req *request.Request, output *CreateAgentOutput) {
  121. op := &request.Operation{
  122. Name: opCreateAgent,
  123. HTTPMethod: "POST",
  124. HTTPPath: "/",
  125. }
  126. if input == nil {
  127. input = &CreateAgentInput{}
  128. }
  129. output = &CreateAgentOutput{}
  130. req = c.newRequest(op, input, output)
  131. return
  132. }
  133. // CreateAgent API operation for AWS DataSync.
  134. //
  135. // Activates an AWS DataSync agent that you have deployed on your host. The
  136. // activation process associates your agent with your account. In the activation
  137. // process, you specify information such as the AWS Region that you want to
  138. // activate the agent in. You activate the agent in the AWS Region where your
  139. // target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created
  140. // in this AWS Region.
  141. //
  142. // You can use an agent for more than one location. If a task uses multiple
  143. // agents, all of them need to have status AVAILABLE for the task to run. If
  144. // you use multiple agents for a source location, the status of all the agents
  145. // must be AVAILABLE for the task to run. For more information, see Activating
  146. // a Sync Agent (https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent)
  147. // in the AWS DataSync User Guide.
  148. //
  149. // Agents are automatically updated by AWS on a regular basis, using a mechanism
  150. // that ensures minimal interruption to your tasks.
  151. //
  152. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  153. // with awserr.Error's Code and Message methods to get detailed information about
  154. // the error.
  155. //
  156. // See the AWS API reference guide for AWS DataSync's
  157. // API operation CreateAgent for usage and error information.
  158. //
  159. // Returned Error Codes:
  160. // * ErrCodeInvalidRequestException "InvalidRequestException"
  161. // This exception is thrown when the client submits a malformed request.
  162. //
  163. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent
  164. func (c *DataSync) CreateAgent(input *CreateAgentInput) (*CreateAgentOutput, error) {
  165. req, out := c.CreateAgentRequest(input)
  166. return out, req.Send()
  167. }
  168. // CreateAgentWithContext is the same as CreateAgent with the addition of
  169. // the ability to pass a context and additional request options.
  170. //
  171. // See CreateAgent for details on how to use this API operation.
  172. //
  173. // The context must be non-nil and will be used for request cancellation. If
  174. // the context is nil a panic will occur. In the future the SDK may create
  175. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  176. // for more information on using Contexts.
  177. func (c *DataSync) CreateAgentWithContext(ctx aws.Context, input *CreateAgentInput, opts ...request.Option) (*CreateAgentOutput, error) {
  178. req, out := c.CreateAgentRequest(input)
  179. req.SetContext(ctx)
  180. req.ApplyOptions(opts...)
  181. return out, req.Send()
  182. }
  183. const opCreateLocationEfs = "CreateLocationEfs"
  184. // CreateLocationEfsRequest generates a "aws/request.Request" representing the
  185. // client's request for the CreateLocationEfs operation. The "output" return
  186. // value will be populated with the request's response once the request completes
  187. // successfully.
  188. //
  189. // Use "Send" method on the returned Request to send the API call to the service.
  190. // the "output" return value is not valid until after Send returns without error.
  191. //
  192. // See CreateLocationEfs for more information on using the CreateLocationEfs
  193. // API call, and error handling.
  194. //
  195. // This method is useful when you want to inject custom logic or configuration
  196. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  197. //
  198. //
  199. // // Example sending a request using the CreateLocationEfsRequest method.
  200. // req, resp := client.CreateLocationEfsRequest(params)
  201. //
  202. // err := req.Send()
  203. // if err == nil { // resp is now filled
  204. // fmt.Println(resp)
  205. // }
  206. //
  207. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs
  208. func (c *DataSync) CreateLocationEfsRequest(input *CreateLocationEfsInput) (req *request.Request, output *CreateLocationEfsOutput) {
  209. op := &request.Operation{
  210. Name: opCreateLocationEfs,
  211. HTTPMethod: "POST",
  212. HTTPPath: "/",
  213. }
  214. if input == nil {
  215. input = &CreateLocationEfsInput{}
  216. }
  217. output = &CreateLocationEfsOutput{}
  218. req = c.newRequest(op, input, output)
  219. return
  220. }
  221. // CreateLocationEfs API operation for AWS DataSync.
  222. //
  223. // Creates an endpoint for an Amazon EFS file system.
  224. //
  225. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  226. // with awserr.Error's Code and Message methods to get detailed information about
  227. // the error.
  228. //
  229. // See the AWS API reference guide for AWS DataSync's
  230. // API operation CreateLocationEfs for usage and error information.
  231. //
  232. // Returned Error Codes:
  233. // * ErrCodeInvalidRequestException "InvalidRequestException"
  234. // This exception is thrown when the client submits a malformed request.
  235. //
  236. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs
  237. func (c *DataSync) CreateLocationEfs(input *CreateLocationEfsInput) (*CreateLocationEfsOutput, error) {
  238. req, out := c.CreateLocationEfsRequest(input)
  239. return out, req.Send()
  240. }
  241. // CreateLocationEfsWithContext is the same as CreateLocationEfs with the addition of
  242. // the ability to pass a context and additional request options.
  243. //
  244. // See CreateLocationEfs for details on how to use this API operation.
  245. //
  246. // The context must be non-nil and will be used for request cancellation. If
  247. // the context is nil a panic will occur. In the future the SDK may create
  248. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  249. // for more information on using Contexts.
  250. func (c *DataSync) CreateLocationEfsWithContext(ctx aws.Context, input *CreateLocationEfsInput, opts ...request.Option) (*CreateLocationEfsOutput, error) {
  251. req, out := c.CreateLocationEfsRequest(input)
  252. req.SetContext(ctx)
  253. req.ApplyOptions(opts...)
  254. return out, req.Send()
  255. }
  256. const opCreateLocationNfs = "CreateLocationNfs"
  257. // CreateLocationNfsRequest generates a "aws/request.Request" representing the
  258. // client's request for the CreateLocationNfs operation. The "output" return
  259. // value will be populated with the request's response once the request completes
  260. // successfully.
  261. //
  262. // Use "Send" method on the returned Request to send the API call to the service.
  263. // the "output" return value is not valid until after Send returns without error.
  264. //
  265. // See CreateLocationNfs for more information on using the CreateLocationNfs
  266. // API call, and error handling.
  267. //
  268. // This method is useful when you want to inject custom logic or configuration
  269. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  270. //
  271. //
  272. // // Example sending a request using the CreateLocationNfsRequest method.
  273. // req, resp := client.CreateLocationNfsRequest(params)
  274. //
  275. // err := req.Send()
  276. // if err == nil { // resp is now filled
  277. // fmt.Println(resp)
  278. // }
  279. //
  280. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs
  281. func (c *DataSync) CreateLocationNfsRequest(input *CreateLocationNfsInput) (req *request.Request, output *CreateLocationNfsOutput) {
  282. op := &request.Operation{
  283. Name: opCreateLocationNfs,
  284. HTTPMethod: "POST",
  285. HTTPPath: "/",
  286. }
  287. if input == nil {
  288. input = &CreateLocationNfsInput{}
  289. }
  290. output = &CreateLocationNfsOutput{}
  291. req = c.newRequest(op, input, output)
  292. return
  293. }
  294. // CreateLocationNfs API operation for AWS DataSync.
  295. //
  296. // Creates an endpoint for a Network File System (NFS) file system.
  297. //
  298. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  299. // with awserr.Error's Code and Message methods to get detailed information about
  300. // the error.
  301. //
  302. // See the AWS API reference guide for AWS DataSync's
  303. // API operation CreateLocationNfs for usage and error information.
  304. //
  305. // Returned Error Codes:
  306. // * ErrCodeInvalidRequestException "InvalidRequestException"
  307. // This exception is thrown when the client submits a malformed request.
  308. //
  309. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs
  310. func (c *DataSync) CreateLocationNfs(input *CreateLocationNfsInput) (*CreateLocationNfsOutput, error) {
  311. req, out := c.CreateLocationNfsRequest(input)
  312. return out, req.Send()
  313. }
  314. // CreateLocationNfsWithContext is the same as CreateLocationNfs with the addition of
  315. // the ability to pass a context and additional request options.
  316. //
  317. // See CreateLocationNfs for details on how to use this API operation.
  318. //
  319. // The context must be non-nil and will be used for request cancellation. If
  320. // the context is nil a panic will occur. In the future the SDK may create
  321. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  322. // for more information on using Contexts.
  323. func (c *DataSync) CreateLocationNfsWithContext(ctx aws.Context, input *CreateLocationNfsInput, opts ...request.Option) (*CreateLocationNfsOutput, error) {
  324. req, out := c.CreateLocationNfsRequest(input)
  325. req.SetContext(ctx)
  326. req.ApplyOptions(opts...)
  327. return out, req.Send()
  328. }
  329. const opCreateLocationS3 = "CreateLocationS3"
  330. // CreateLocationS3Request generates a "aws/request.Request" representing the
  331. // client's request for the CreateLocationS3 operation. The "output" return
  332. // value will be populated with the request's response once the request completes
  333. // successfully.
  334. //
  335. // Use "Send" method on the returned Request to send the API call to the service.
  336. // the "output" return value is not valid until after Send returns without error.
  337. //
  338. // See CreateLocationS3 for more information on using the CreateLocationS3
  339. // API call, and error handling.
  340. //
  341. // This method is useful when you want to inject custom logic or configuration
  342. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  343. //
  344. //
  345. // // Example sending a request using the CreateLocationS3Request method.
  346. // req, resp := client.CreateLocationS3Request(params)
  347. //
  348. // err := req.Send()
  349. // if err == nil { // resp is now filled
  350. // fmt.Println(resp)
  351. // }
  352. //
  353. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3
  354. func (c *DataSync) CreateLocationS3Request(input *CreateLocationS3Input) (req *request.Request, output *CreateLocationS3Output) {
  355. op := &request.Operation{
  356. Name: opCreateLocationS3,
  357. HTTPMethod: "POST",
  358. HTTPPath: "/",
  359. }
  360. if input == nil {
  361. input = &CreateLocationS3Input{}
  362. }
  363. output = &CreateLocationS3Output{}
  364. req = c.newRequest(op, input, output)
  365. return
  366. }
  367. // CreateLocationS3 API operation for AWS DataSync.
  368. //
  369. // Creates an endpoint for an Amazon S3 bucket.
  370. //
  371. // For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity
  372. // and Access Management (IAM) role that has the required permissions. You can
  373. // set up the required permissions by creating an IAM policy that grants the
  374. // required permissions and attaching the policy to the role. An example of
  375. // such a policy is shown in the examples section. For more information, see
  376. // Configuring Amazon S3 Location Settings (https://docs.aws.amazon.com/sync-service/latest/userguide/configuring-s3-locations.html)
  377. // in the AWS DataSync User Guide.
  378. //
  379. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  380. // with awserr.Error's Code and Message methods to get detailed information about
  381. // the error.
  382. //
  383. // See the AWS API reference guide for AWS DataSync's
  384. // API operation CreateLocationS3 for usage and error information.
  385. //
  386. // Returned Error Codes:
  387. // * ErrCodeInvalidRequestException "InvalidRequestException"
  388. // This exception is thrown when the client submits a malformed request.
  389. //
  390. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3
  391. func (c *DataSync) CreateLocationS3(input *CreateLocationS3Input) (*CreateLocationS3Output, error) {
  392. req, out := c.CreateLocationS3Request(input)
  393. return out, req.Send()
  394. }
  395. // CreateLocationS3WithContext is the same as CreateLocationS3 with the addition of
  396. // the ability to pass a context and additional request options.
  397. //
  398. // See CreateLocationS3 for details on how to use this API operation.
  399. //
  400. // The context must be non-nil and will be used for request cancellation. If
  401. // the context is nil a panic will occur. In the future the SDK may create
  402. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  403. // for more information on using Contexts.
  404. func (c *DataSync) CreateLocationS3WithContext(ctx aws.Context, input *CreateLocationS3Input, opts ...request.Option) (*CreateLocationS3Output, error) {
  405. req, out := c.CreateLocationS3Request(input)
  406. req.SetContext(ctx)
  407. req.ApplyOptions(opts...)
  408. return out, req.Send()
  409. }
  410. const opCreateTask = "CreateTask"
  411. // CreateTaskRequest generates a "aws/request.Request" representing the
  412. // client's request for the CreateTask operation. The "output" return
  413. // value will be populated with the request's response once the request completes
  414. // successfully.
  415. //
  416. // Use "Send" method on the returned Request to send the API call to the service.
  417. // the "output" return value is not valid until after Send returns without error.
  418. //
  419. // See CreateTask for more information on using the CreateTask
  420. // API call, and error handling.
  421. //
  422. // This method is useful when you want to inject custom logic or configuration
  423. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  424. //
  425. //
  426. // // Example sending a request using the CreateTaskRequest method.
  427. // req, resp := client.CreateTaskRequest(params)
  428. //
  429. // err := req.Send()
  430. // if err == nil { // resp is now filled
  431. // fmt.Println(resp)
  432. // }
  433. //
  434. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask
  435. func (c *DataSync) CreateTaskRequest(input *CreateTaskInput) (req *request.Request, output *CreateTaskOutput) {
  436. op := &request.Operation{
  437. Name: opCreateTask,
  438. HTTPMethod: "POST",
  439. HTTPPath: "/",
  440. }
  441. if input == nil {
  442. input = &CreateTaskInput{}
  443. }
  444. output = &CreateTaskOutput{}
  445. req = c.newRequest(op, input, output)
  446. return
  447. }
  448. // CreateTask API operation for AWS DataSync.
  449. //
  450. // Creates a task. A task is a set of two locations (source and destination)
  451. // and a set of default OverrideOptions that you use to control the behavior
  452. // of a task. If you don't specify default values for Options when you create
  453. // a task, AWS DataSync populates them with safe service defaults.
  454. //
  455. // When you initially create a task, it enters the INITIALIZING status and then
  456. // the CREATING status. In CREATING status, AWS DataSync attempts to mount the
  457. // source Network File System (NFS) location. The task transitions to the AVAILABLE
  458. // status without waiting for the destination location to mount. Instead, AWS
  459. // DataSync mounts a destination before every task execution and then unmounts
  460. // it after every task execution.
  461. //
  462. // If an agent that is associated with a source (NFS) location goes offline,
  463. // the task transitions to the UNAVAILABLE status. If the status of the task
  464. // remains in the CREATING status for more than a few minutes, it means that
  465. // your agent might be having trouble mounting the source NFS file system. Check
  466. // the task's ErrorCode and ErrorDetail. Mount issues are often caused by either
  467. // a misconfigured firewall or a mistyped NFS server host name.
  468. //
  469. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  470. // with awserr.Error's Code and Message methods to get detailed information about
  471. // the error.
  472. //
  473. // See the AWS API reference guide for AWS DataSync's
  474. // API operation CreateTask for usage and error information.
  475. //
  476. // Returned Error Codes:
  477. // * ErrCodeInvalidRequestException "InvalidRequestException"
  478. // This exception is thrown when the client submits a malformed request.
  479. //
  480. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask
  481. func (c *DataSync) CreateTask(input *CreateTaskInput) (*CreateTaskOutput, error) {
  482. req, out := c.CreateTaskRequest(input)
  483. return out, req.Send()
  484. }
  485. // CreateTaskWithContext is the same as CreateTask with the addition of
  486. // the ability to pass a context and additional request options.
  487. //
  488. // See CreateTask for details on how to use this API operation.
  489. //
  490. // The context must be non-nil and will be used for request cancellation. If
  491. // the context is nil a panic will occur. In the future the SDK may create
  492. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  493. // for more information on using Contexts.
  494. func (c *DataSync) CreateTaskWithContext(ctx aws.Context, input *CreateTaskInput, opts ...request.Option) (*CreateTaskOutput, error) {
  495. req, out := c.CreateTaskRequest(input)
  496. req.SetContext(ctx)
  497. req.ApplyOptions(opts...)
  498. return out, req.Send()
  499. }
  500. const opDeleteAgent = "DeleteAgent"
  501. // DeleteAgentRequest generates a "aws/request.Request" representing the
  502. // client's request for the DeleteAgent operation. The "output" return
  503. // value will be populated with the request's response once the request completes
  504. // successfully.
  505. //
  506. // Use "Send" method on the returned Request to send the API call to the service.
  507. // the "output" return value is not valid until after Send returns without error.
  508. //
  509. // See DeleteAgent for more information on using the DeleteAgent
  510. // API call, and error handling.
  511. //
  512. // This method is useful when you want to inject custom logic or configuration
  513. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  514. //
  515. //
  516. // // Example sending a request using the DeleteAgentRequest method.
  517. // req, resp := client.DeleteAgentRequest(params)
  518. //
  519. // err := req.Send()
  520. // if err == nil { // resp is now filled
  521. // fmt.Println(resp)
  522. // }
  523. //
  524. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent
  525. func (c *DataSync) DeleteAgentRequest(input *DeleteAgentInput) (req *request.Request, output *DeleteAgentOutput) {
  526. op := &request.Operation{
  527. Name: opDeleteAgent,
  528. HTTPMethod: "POST",
  529. HTTPPath: "/",
  530. }
  531. if input == nil {
  532. input = &DeleteAgentInput{}
  533. }
  534. output = &DeleteAgentOutput{}
  535. req = c.newRequest(op, input, output)
  536. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  537. return
  538. }
  539. // DeleteAgent API operation for AWS DataSync.
  540. //
  541. // Deletes an agent. To specify which agent to delete, use the Amazon Resource
  542. // Name (ARN) of the agent in your request. The operation disassociates the
  543. // agent from your AWS account. However, it doesn't delete the agent virtual
  544. // machine (VM) from your on-premises environment.
  545. //
  546. // After you delete an agent, you can't reactivate it and you longer pay software
  547. // charges for it.
  548. //
  549. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  550. // with awserr.Error's Code and Message methods to get detailed information about
  551. // the error.
  552. //
  553. // See the AWS API reference guide for AWS DataSync's
  554. // API operation DeleteAgent for usage and error information.
  555. //
  556. // Returned Error Codes:
  557. // * ErrCodeInvalidRequestException "InvalidRequestException"
  558. // This exception is thrown when the client submits a malformed request.
  559. //
  560. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent
  561. func (c *DataSync) DeleteAgent(input *DeleteAgentInput) (*DeleteAgentOutput, error) {
  562. req, out := c.DeleteAgentRequest(input)
  563. return out, req.Send()
  564. }
  565. // DeleteAgentWithContext is the same as DeleteAgent with the addition of
  566. // the ability to pass a context and additional request options.
  567. //
  568. // See DeleteAgent for details on how to use this API operation.
  569. //
  570. // The context must be non-nil and will be used for request cancellation. If
  571. // the context is nil a panic will occur. In the future the SDK may create
  572. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  573. // for more information on using Contexts.
  574. func (c *DataSync) DeleteAgentWithContext(ctx aws.Context, input *DeleteAgentInput, opts ...request.Option) (*DeleteAgentOutput, error) {
  575. req, out := c.DeleteAgentRequest(input)
  576. req.SetContext(ctx)
  577. req.ApplyOptions(opts...)
  578. return out, req.Send()
  579. }
  580. const opDeleteLocation = "DeleteLocation"
  581. // DeleteLocationRequest generates a "aws/request.Request" representing the
  582. // client's request for the DeleteLocation operation. The "output" return
  583. // value will be populated with the request's response once the request completes
  584. // successfully.
  585. //
  586. // Use "Send" method on the returned Request to send the API call to the service.
  587. // the "output" return value is not valid until after Send returns without error.
  588. //
  589. // See DeleteLocation for more information on using the DeleteLocation
  590. // API call, and error handling.
  591. //
  592. // This method is useful when you want to inject custom logic or configuration
  593. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  594. //
  595. //
  596. // // Example sending a request using the DeleteLocationRequest method.
  597. // req, resp := client.DeleteLocationRequest(params)
  598. //
  599. // err := req.Send()
  600. // if err == nil { // resp is now filled
  601. // fmt.Println(resp)
  602. // }
  603. //
  604. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation
  605. func (c *DataSync) DeleteLocationRequest(input *DeleteLocationInput) (req *request.Request, output *DeleteLocationOutput) {
  606. op := &request.Operation{
  607. Name: opDeleteLocation,
  608. HTTPMethod: "POST",
  609. HTTPPath: "/",
  610. }
  611. if input == nil {
  612. input = &DeleteLocationInput{}
  613. }
  614. output = &DeleteLocationOutput{}
  615. req = c.newRequest(op, input, output)
  616. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  617. return
  618. }
  619. // DeleteLocation API operation for AWS DataSync.
  620. //
  621. // Deletes the configuration of a location used by AWS DataSync.
  622. //
  623. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  624. // with awserr.Error's Code and Message methods to get detailed information about
  625. // the error.
  626. //
  627. // See the AWS API reference guide for AWS DataSync's
  628. // API operation DeleteLocation for usage and error information.
  629. //
  630. // Returned Error Codes:
  631. // * ErrCodeInvalidRequestException "InvalidRequestException"
  632. // This exception is thrown when the client submits a malformed request.
  633. //
  634. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation
  635. func (c *DataSync) DeleteLocation(input *DeleteLocationInput) (*DeleteLocationOutput, error) {
  636. req, out := c.DeleteLocationRequest(input)
  637. return out, req.Send()
  638. }
  639. // DeleteLocationWithContext is the same as DeleteLocation with the addition of
  640. // the ability to pass a context and additional request options.
  641. //
  642. // See DeleteLocation for details on how to use this API operation.
  643. //
  644. // The context must be non-nil and will be used for request cancellation. If
  645. // the context is nil a panic will occur. In the future the SDK may create
  646. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  647. // for more information on using Contexts.
  648. func (c *DataSync) DeleteLocationWithContext(ctx aws.Context, input *DeleteLocationInput, opts ...request.Option) (*DeleteLocationOutput, error) {
  649. req, out := c.DeleteLocationRequest(input)
  650. req.SetContext(ctx)
  651. req.ApplyOptions(opts...)
  652. return out, req.Send()
  653. }
  654. const opDeleteTask = "DeleteTask"
  655. // DeleteTaskRequest generates a "aws/request.Request" representing the
  656. // client's request for the DeleteTask operation. The "output" return
  657. // value will be populated with the request's response once the request completes
  658. // successfully.
  659. //
  660. // Use "Send" method on the returned Request to send the API call to the service.
  661. // the "output" return value is not valid until after Send returns without error.
  662. //
  663. // See DeleteTask for more information on using the DeleteTask
  664. // API call, and error handling.
  665. //
  666. // This method is useful when you want to inject custom logic or configuration
  667. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  668. //
  669. //
  670. // // Example sending a request using the DeleteTaskRequest method.
  671. // req, resp := client.DeleteTaskRequest(params)
  672. //
  673. // err := req.Send()
  674. // if err == nil { // resp is now filled
  675. // fmt.Println(resp)
  676. // }
  677. //
  678. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask
  679. func (c *DataSync) DeleteTaskRequest(input *DeleteTaskInput) (req *request.Request, output *DeleteTaskOutput) {
  680. op := &request.Operation{
  681. Name: opDeleteTask,
  682. HTTPMethod: "POST",
  683. HTTPPath: "/",
  684. }
  685. if input == nil {
  686. input = &DeleteTaskInput{}
  687. }
  688. output = &DeleteTaskOutput{}
  689. req = c.newRequest(op, input, output)
  690. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  691. return
  692. }
  693. // DeleteTask API operation for AWS DataSync.
  694. //
  695. // Deletes a task.
  696. //
  697. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  698. // with awserr.Error's Code and Message methods to get detailed information about
  699. // the error.
  700. //
  701. // See the AWS API reference guide for AWS DataSync's
  702. // API operation DeleteTask for usage and error information.
  703. //
  704. // Returned Error Codes:
  705. // * ErrCodeInvalidRequestException "InvalidRequestException"
  706. // This exception is thrown when the client submits a malformed request.
  707. //
  708. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask
  709. func (c *DataSync) DeleteTask(input *DeleteTaskInput) (*DeleteTaskOutput, error) {
  710. req, out := c.DeleteTaskRequest(input)
  711. return out, req.Send()
  712. }
  713. // DeleteTaskWithContext is the same as DeleteTask with the addition of
  714. // the ability to pass a context and additional request options.
  715. //
  716. // See DeleteTask for details on how to use this API operation.
  717. //
  718. // The context must be non-nil and will be used for request cancellation. If
  719. // the context is nil a panic will occur. In the future the SDK may create
  720. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  721. // for more information on using Contexts.
  722. func (c *DataSync) DeleteTaskWithContext(ctx aws.Context, input *DeleteTaskInput, opts ...request.Option) (*DeleteTaskOutput, error) {
  723. req, out := c.DeleteTaskRequest(input)
  724. req.SetContext(ctx)
  725. req.ApplyOptions(opts...)
  726. return out, req.Send()
  727. }
  728. const opDescribeAgent = "DescribeAgent"
  729. // DescribeAgentRequest generates a "aws/request.Request" representing the
  730. // client's request for the DescribeAgent operation. The "output" return
  731. // value will be populated with the request's response once the request completes
  732. // successfully.
  733. //
  734. // Use "Send" method on the returned Request to send the API call to the service.
  735. // the "output" return value is not valid until after Send returns without error.
  736. //
  737. // See DescribeAgent for more information on using the DescribeAgent
  738. // API call, and error handling.
  739. //
  740. // This method is useful when you want to inject custom logic or configuration
  741. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  742. //
  743. //
  744. // // Example sending a request using the DescribeAgentRequest method.
  745. // req, resp := client.DescribeAgentRequest(params)
  746. //
  747. // err := req.Send()
  748. // if err == nil { // resp is now filled
  749. // fmt.Println(resp)
  750. // }
  751. //
  752. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent
  753. func (c *DataSync) DescribeAgentRequest(input *DescribeAgentInput) (req *request.Request, output *DescribeAgentOutput) {
  754. op := &request.Operation{
  755. Name: opDescribeAgent,
  756. HTTPMethod: "POST",
  757. HTTPPath: "/",
  758. }
  759. if input == nil {
  760. input = &DescribeAgentInput{}
  761. }
  762. output = &DescribeAgentOutput{}
  763. req = c.newRequest(op, input, output)
  764. return
  765. }
  766. // DescribeAgent API operation for AWS DataSync.
  767. //
  768. // Returns metadata such as the name, the network interfaces, and the status
  769. // (that is, whether the agent is running or not) for an agent. To specify which
  770. // agent to describe, use the Amazon Resource Name (ARN) of the agent in your
  771. // request.
  772. //
  773. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  774. // with awserr.Error's Code and Message methods to get detailed information about
  775. // the error.
  776. //
  777. // See the AWS API reference guide for AWS DataSync's
  778. // API operation DescribeAgent for usage and error information.
  779. //
  780. // Returned Error Codes:
  781. // * ErrCodeInvalidRequestException "InvalidRequestException"
  782. // This exception is thrown when the client submits a malformed request.
  783. //
  784. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent
  785. func (c *DataSync) DescribeAgent(input *DescribeAgentInput) (*DescribeAgentOutput, error) {
  786. req, out := c.DescribeAgentRequest(input)
  787. return out, req.Send()
  788. }
  789. // DescribeAgentWithContext is the same as DescribeAgent with the addition of
  790. // the ability to pass a context and additional request options.
  791. //
  792. // See DescribeAgent for details on how to use this API operation.
  793. //
  794. // The context must be non-nil and will be used for request cancellation. If
  795. // the context is nil a panic will occur. In the future the SDK may create
  796. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  797. // for more information on using Contexts.
  798. func (c *DataSync) DescribeAgentWithContext(ctx aws.Context, input *DescribeAgentInput, opts ...request.Option) (*DescribeAgentOutput, error) {
  799. req, out := c.DescribeAgentRequest(input)
  800. req.SetContext(ctx)
  801. req.ApplyOptions(opts...)
  802. return out, req.Send()
  803. }
  804. const opDescribeLocationEfs = "DescribeLocationEfs"
  805. // DescribeLocationEfsRequest generates a "aws/request.Request" representing the
  806. // client's request for the DescribeLocationEfs operation. The "output" return
  807. // value will be populated with the request's response once the request completes
  808. // successfully.
  809. //
  810. // Use "Send" method on the returned Request to send the API call to the service.
  811. // the "output" return value is not valid until after Send returns without error.
  812. //
  813. // See DescribeLocationEfs for more information on using the DescribeLocationEfs
  814. // API call, and error handling.
  815. //
  816. // This method is useful when you want to inject custom logic or configuration
  817. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  818. //
  819. //
  820. // // Example sending a request using the DescribeLocationEfsRequest method.
  821. // req, resp := client.DescribeLocationEfsRequest(params)
  822. //
  823. // err := req.Send()
  824. // if err == nil { // resp is now filled
  825. // fmt.Println(resp)
  826. // }
  827. //
  828. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs
  829. func (c *DataSync) DescribeLocationEfsRequest(input *DescribeLocationEfsInput) (req *request.Request, output *DescribeLocationEfsOutput) {
  830. op := &request.Operation{
  831. Name: opDescribeLocationEfs,
  832. HTTPMethod: "POST",
  833. HTTPPath: "/",
  834. }
  835. if input == nil {
  836. input = &DescribeLocationEfsInput{}
  837. }
  838. output = &DescribeLocationEfsOutput{}
  839. req = c.newRequest(op, input, output)
  840. return
  841. }
  842. // DescribeLocationEfs API operation for AWS DataSync.
  843. //
  844. // Returns metadata, such as the path information about an Amazon EFS location.
  845. //
  846. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  847. // with awserr.Error's Code and Message methods to get detailed information about
  848. // the error.
  849. //
  850. // See the AWS API reference guide for AWS DataSync's
  851. // API operation DescribeLocationEfs for usage and error information.
  852. //
  853. // Returned Error Codes:
  854. // * ErrCodeInvalidRequestException "InvalidRequestException"
  855. // This exception is thrown when the client submits a malformed request.
  856. //
  857. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs
  858. func (c *DataSync) DescribeLocationEfs(input *DescribeLocationEfsInput) (*DescribeLocationEfsOutput, error) {
  859. req, out := c.DescribeLocationEfsRequest(input)
  860. return out, req.Send()
  861. }
  862. // DescribeLocationEfsWithContext is the same as DescribeLocationEfs with the addition of
  863. // the ability to pass a context and additional request options.
  864. //
  865. // See DescribeLocationEfs for details on how to use this API operation.
  866. //
  867. // The context must be non-nil and will be used for request cancellation. If
  868. // the context is nil a panic will occur. In the future the SDK may create
  869. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  870. // for more information on using Contexts.
  871. func (c *DataSync) DescribeLocationEfsWithContext(ctx aws.Context, input *DescribeLocationEfsInput, opts ...request.Option) (*DescribeLocationEfsOutput, error) {
  872. req, out := c.DescribeLocationEfsRequest(input)
  873. req.SetContext(ctx)
  874. req.ApplyOptions(opts...)
  875. return out, req.Send()
  876. }
  877. const opDescribeLocationNfs = "DescribeLocationNfs"
  878. // DescribeLocationNfsRequest generates a "aws/request.Request" representing the
  879. // client's request for the DescribeLocationNfs operation. The "output" return
  880. // value will be populated with the request's response once the request completes
  881. // successfully.
  882. //
  883. // Use "Send" method on the returned Request to send the API call to the service.
  884. // the "output" return value is not valid until after Send returns without error.
  885. //
  886. // See DescribeLocationNfs for more information on using the DescribeLocationNfs
  887. // API call, and error handling.
  888. //
  889. // This method is useful when you want to inject custom logic or configuration
  890. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  891. //
  892. //
  893. // // Example sending a request using the DescribeLocationNfsRequest method.
  894. // req, resp := client.DescribeLocationNfsRequest(params)
  895. //
  896. // err := req.Send()
  897. // if err == nil { // resp is now filled
  898. // fmt.Println(resp)
  899. // }
  900. //
  901. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs
  902. func (c *DataSync) DescribeLocationNfsRequest(input *DescribeLocationNfsInput) (req *request.Request, output *DescribeLocationNfsOutput) {
  903. op := &request.Operation{
  904. Name: opDescribeLocationNfs,
  905. HTTPMethod: "POST",
  906. HTTPPath: "/",
  907. }
  908. if input == nil {
  909. input = &DescribeLocationNfsInput{}
  910. }
  911. output = &DescribeLocationNfsOutput{}
  912. req = c.newRequest(op, input, output)
  913. return
  914. }
  915. // DescribeLocationNfs API operation for AWS DataSync.
  916. //
  917. // Returns metadata, such as the path information, about a NFS location.
  918. //
  919. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  920. // with awserr.Error's Code and Message methods to get detailed information about
  921. // the error.
  922. //
  923. // See the AWS API reference guide for AWS DataSync's
  924. // API operation DescribeLocationNfs for usage and error information.
  925. //
  926. // Returned Error Codes:
  927. // * ErrCodeInvalidRequestException "InvalidRequestException"
  928. // This exception is thrown when the client submits a malformed request.
  929. //
  930. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs
  931. func (c *DataSync) DescribeLocationNfs(input *DescribeLocationNfsInput) (*DescribeLocationNfsOutput, error) {
  932. req, out := c.DescribeLocationNfsRequest(input)
  933. return out, req.Send()
  934. }
  935. // DescribeLocationNfsWithContext is the same as DescribeLocationNfs with the addition of
  936. // the ability to pass a context and additional request options.
  937. //
  938. // See DescribeLocationNfs for details on how to use this API operation.
  939. //
  940. // The context must be non-nil and will be used for request cancellation. If
  941. // the context is nil a panic will occur. In the future the SDK may create
  942. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  943. // for more information on using Contexts.
  944. func (c *DataSync) DescribeLocationNfsWithContext(ctx aws.Context, input *DescribeLocationNfsInput, opts ...request.Option) (*DescribeLocationNfsOutput, error) {
  945. req, out := c.DescribeLocationNfsRequest(input)
  946. req.SetContext(ctx)
  947. req.ApplyOptions(opts...)
  948. return out, req.Send()
  949. }
  950. const opDescribeLocationS3 = "DescribeLocationS3"
  951. // DescribeLocationS3Request generates a "aws/request.Request" representing the
  952. // client's request for the DescribeLocationS3 operation. The "output" return
  953. // value will be populated with the request's response once the request completes
  954. // successfully.
  955. //
  956. // Use "Send" method on the returned Request to send the API call to the service.
  957. // the "output" return value is not valid until after Send returns without error.
  958. //
  959. // See DescribeLocationS3 for more information on using the DescribeLocationS3
  960. // API call, and error handling.
  961. //
  962. // This method is useful when you want to inject custom logic or configuration
  963. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  964. //
  965. //
  966. // // Example sending a request using the DescribeLocationS3Request method.
  967. // req, resp := client.DescribeLocationS3Request(params)
  968. //
  969. // err := req.Send()
  970. // if err == nil { // resp is now filled
  971. // fmt.Println(resp)
  972. // }
  973. //
  974. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3
  975. func (c *DataSync) DescribeLocationS3Request(input *DescribeLocationS3Input) (req *request.Request, output *DescribeLocationS3Output) {
  976. op := &request.Operation{
  977. Name: opDescribeLocationS3,
  978. HTTPMethod: "POST",
  979. HTTPPath: "/",
  980. }
  981. if input == nil {
  982. input = &DescribeLocationS3Input{}
  983. }
  984. output = &DescribeLocationS3Output{}
  985. req = c.newRequest(op, input, output)
  986. return
  987. }
  988. // DescribeLocationS3 API operation for AWS DataSync.
  989. //
  990. // Returns metadata, such as bucket name, about an Amazon S3 bucket location.
  991. //
  992. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  993. // with awserr.Error's Code and Message methods to get detailed information about
  994. // the error.
  995. //
  996. // See the AWS API reference guide for AWS DataSync's
  997. // API operation DescribeLocationS3 for usage and error information.
  998. //
  999. // Returned Error Codes:
  1000. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1001. // This exception is thrown when the client submits a malformed request.
  1002. //
  1003. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3
  1004. func (c *DataSync) DescribeLocationS3(input *DescribeLocationS3Input) (*DescribeLocationS3Output, error) {
  1005. req, out := c.DescribeLocationS3Request(input)
  1006. return out, req.Send()
  1007. }
  1008. // DescribeLocationS3WithContext is the same as DescribeLocationS3 with the addition of
  1009. // the ability to pass a context and additional request options.
  1010. //
  1011. // See DescribeLocationS3 for details on how to use this API operation.
  1012. //
  1013. // The context must be non-nil and will be used for request cancellation. If
  1014. // the context is nil a panic will occur. In the future the SDK may create
  1015. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1016. // for more information on using Contexts.
  1017. func (c *DataSync) DescribeLocationS3WithContext(ctx aws.Context, input *DescribeLocationS3Input, opts ...request.Option) (*DescribeLocationS3Output, error) {
  1018. req, out := c.DescribeLocationS3Request(input)
  1019. req.SetContext(ctx)
  1020. req.ApplyOptions(opts...)
  1021. return out, req.Send()
  1022. }
  1023. const opDescribeTask = "DescribeTask"
  1024. // DescribeTaskRequest generates a "aws/request.Request" representing the
  1025. // client's request for the DescribeTask operation. The "output" return
  1026. // value will be populated with the request's response once the request completes
  1027. // successfully.
  1028. //
  1029. // Use "Send" method on the returned Request to send the API call to the service.
  1030. // the "output" return value is not valid until after Send returns without error.
  1031. //
  1032. // See DescribeTask for more information on using the DescribeTask
  1033. // API call, and error handling.
  1034. //
  1035. // This method is useful when you want to inject custom logic or configuration
  1036. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1037. //
  1038. //
  1039. // // Example sending a request using the DescribeTaskRequest method.
  1040. // req, resp := client.DescribeTaskRequest(params)
  1041. //
  1042. // err := req.Send()
  1043. // if err == nil { // resp is now filled
  1044. // fmt.Println(resp)
  1045. // }
  1046. //
  1047. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask
  1048. func (c *DataSync) DescribeTaskRequest(input *DescribeTaskInput) (req *request.Request, output *DescribeTaskOutput) {
  1049. op := &request.Operation{
  1050. Name: opDescribeTask,
  1051. HTTPMethod: "POST",
  1052. HTTPPath: "/",
  1053. }
  1054. if input == nil {
  1055. input = &DescribeTaskInput{}
  1056. }
  1057. output = &DescribeTaskOutput{}
  1058. req = c.newRequest(op, input, output)
  1059. return
  1060. }
  1061. // DescribeTask API operation for AWS DataSync.
  1062. //
  1063. // Returns metadata about a task.
  1064. //
  1065. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1066. // with awserr.Error's Code and Message methods to get detailed information about
  1067. // the error.
  1068. //
  1069. // See the AWS API reference guide for AWS DataSync's
  1070. // API operation DescribeTask for usage and error information.
  1071. //
  1072. // Returned Error Codes:
  1073. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1074. // This exception is thrown when the client submits a malformed request.
  1075. //
  1076. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask
  1077. func (c *DataSync) DescribeTask(input *DescribeTaskInput) (*DescribeTaskOutput, error) {
  1078. req, out := c.DescribeTaskRequest(input)
  1079. return out, req.Send()
  1080. }
  1081. // DescribeTaskWithContext is the same as DescribeTask with the addition of
  1082. // the ability to pass a context and additional request options.
  1083. //
  1084. // See DescribeTask for details on how to use this API operation.
  1085. //
  1086. // The context must be non-nil and will be used for request cancellation. If
  1087. // the context is nil a panic will occur. In the future the SDK may create
  1088. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1089. // for more information on using Contexts.
  1090. func (c *DataSync) DescribeTaskWithContext(ctx aws.Context, input *DescribeTaskInput, opts ...request.Option) (*DescribeTaskOutput, error) {
  1091. req, out := c.DescribeTaskRequest(input)
  1092. req.SetContext(ctx)
  1093. req.ApplyOptions(opts...)
  1094. return out, req.Send()
  1095. }
  1096. const opDescribeTaskExecution = "DescribeTaskExecution"
  1097. // DescribeTaskExecutionRequest generates a "aws/request.Request" representing the
  1098. // client's request for the DescribeTaskExecution operation. The "output" return
  1099. // value will be populated with the request's response once the request completes
  1100. // successfully.
  1101. //
  1102. // Use "Send" method on the returned Request to send the API call to the service.
  1103. // the "output" return value is not valid until after Send returns without error.
  1104. //
  1105. // See DescribeTaskExecution for more information on using the DescribeTaskExecution
  1106. // API call, and error handling.
  1107. //
  1108. // This method is useful when you want to inject custom logic or configuration
  1109. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1110. //
  1111. //
  1112. // // Example sending a request using the DescribeTaskExecutionRequest method.
  1113. // req, resp := client.DescribeTaskExecutionRequest(params)
  1114. //
  1115. // err := req.Send()
  1116. // if err == nil { // resp is now filled
  1117. // fmt.Println(resp)
  1118. // }
  1119. //
  1120. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution
  1121. func (c *DataSync) DescribeTaskExecutionRequest(input *DescribeTaskExecutionInput) (req *request.Request, output *DescribeTaskExecutionOutput) {
  1122. op := &request.Operation{
  1123. Name: opDescribeTaskExecution,
  1124. HTTPMethod: "POST",
  1125. HTTPPath: "/",
  1126. }
  1127. if input == nil {
  1128. input = &DescribeTaskExecutionInput{}
  1129. }
  1130. output = &DescribeTaskExecutionOutput{}
  1131. req = c.newRequest(op, input, output)
  1132. return
  1133. }
  1134. // DescribeTaskExecution API operation for AWS DataSync.
  1135. //
  1136. // Returns detailed metadata about a task that is being executed.
  1137. //
  1138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1139. // with awserr.Error's Code and Message methods to get detailed information about
  1140. // the error.
  1141. //
  1142. // See the AWS API reference guide for AWS DataSync's
  1143. // API operation DescribeTaskExecution for usage and error information.
  1144. //
  1145. // Returned Error Codes:
  1146. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1147. // This exception is thrown when the client submits a malformed request.
  1148. //
  1149. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution
  1150. func (c *DataSync) DescribeTaskExecution(input *DescribeTaskExecutionInput) (*DescribeTaskExecutionOutput, error) {
  1151. req, out := c.DescribeTaskExecutionRequest(input)
  1152. return out, req.Send()
  1153. }
  1154. // DescribeTaskExecutionWithContext is the same as DescribeTaskExecution with the addition of
  1155. // the ability to pass a context and additional request options.
  1156. //
  1157. // See DescribeTaskExecution for details on how to use this API operation.
  1158. //
  1159. // The context must be non-nil and will be used for request cancellation. If
  1160. // the context is nil a panic will occur. In the future the SDK may create
  1161. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1162. // for more information on using Contexts.
  1163. func (c *DataSync) DescribeTaskExecutionWithContext(ctx aws.Context, input *DescribeTaskExecutionInput, opts ...request.Option) (*DescribeTaskExecutionOutput, error) {
  1164. req, out := c.DescribeTaskExecutionRequest(input)
  1165. req.SetContext(ctx)
  1166. req.ApplyOptions(opts...)
  1167. return out, req.Send()
  1168. }
  1169. const opListAgents = "ListAgents"
  1170. // ListAgentsRequest generates a "aws/request.Request" representing the
  1171. // client's request for the ListAgents operation. The "output" return
  1172. // value will be populated with the request's response once the request completes
  1173. // successfully.
  1174. //
  1175. // Use "Send" method on the returned Request to send the API call to the service.
  1176. // the "output" return value is not valid until after Send returns without error.
  1177. //
  1178. // See ListAgents for more information on using the ListAgents
  1179. // API call, and error handling.
  1180. //
  1181. // This method is useful when you want to inject custom logic or configuration
  1182. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1183. //
  1184. //
  1185. // // Example sending a request using the ListAgentsRequest method.
  1186. // req, resp := client.ListAgentsRequest(params)
  1187. //
  1188. // err := req.Send()
  1189. // if err == nil { // resp is now filled
  1190. // fmt.Println(resp)
  1191. // }
  1192. //
  1193. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents
  1194. func (c *DataSync) ListAgentsRequest(input *ListAgentsInput) (req *request.Request, output *ListAgentsOutput) {
  1195. op := &request.Operation{
  1196. Name: opListAgents,
  1197. HTTPMethod: "POST",
  1198. HTTPPath: "/",
  1199. Paginator: &request.Paginator{
  1200. InputTokens: []string{"NextToken"},
  1201. OutputTokens: []string{"NextToken"},
  1202. LimitToken: "MaxResults",
  1203. TruncationToken: "",
  1204. },
  1205. }
  1206. if input == nil {
  1207. input = &ListAgentsInput{}
  1208. }
  1209. output = &ListAgentsOutput{}
  1210. req = c.newRequest(op, input, output)
  1211. return
  1212. }
  1213. // ListAgents API operation for AWS DataSync.
  1214. //
  1215. // Returns a list of agents owned by an AWS account in the AWS Region specified
  1216. // in the request. The returned list is ordered by agent Amazon Resource Name
  1217. // (ARN).
  1218. //
  1219. // By default, this operation returns a maximum of 100 agents. This operation
  1220. // supports pagination that enables you to optionally reduce the number of agents
  1221. // returned in a response.
  1222. //
  1223. // If you have more agents than are returned in a response (that is, the response
  1224. // returns only a truncated list of your agents), the response contains a marker
  1225. // that you can specify in your next request to fetch the next page of agents.
  1226. //
  1227. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1228. // with awserr.Error's Code and Message methods to get detailed information about
  1229. // the error.
  1230. //
  1231. // See the AWS API reference guide for AWS DataSync's
  1232. // API operation ListAgents for usage and error information.
  1233. //
  1234. // Returned Error Codes:
  1235. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1236. // This exception is thrown when the client submits a malformed request.
  1237. //
  1238. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents
  1239. func (c *DataSync) ListAgents(input *ListAgentsInput) (*ListAgentsOutput, error) {
  1240. req, out := c.ListAgentsRequest(input)
  1241. return out, req.Send()
  1242. }
  1243. // ListAgentsWithContext is the same as ListAgents with the addition of
  1244. // the ability to pass a context and additional request options.
  1245. //
  1246. // See ListAgents for details on how to use this API operation.
  1247. //
  1248. // The context must be non-nil and will be used for request cancellation. If
  1249. // the context is nil a panic will occur. In the future the SDK may create
  1250. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1251. // for more information on using Contexts.
  1252. func (c *DataSync) ListAgentsWithContext(ctx aws.Context, input *ListAgentsInput, opts ...request.Option) (*ListAgentsOutput, error) {
  1253. req, out := c.ListAgentsRequest(input)
  1254. req.SetContext(ctx)
  1255. req.ApplyOptions(opts...)
  1256. return out, req.Send()
  1257. }
  1258. // ListAgentsPages iterates over the pages of a ListAgents operation,
  1259. // calling the "fn" function with the response data for each page. To stop
  1260. // iterating, return false from the fn function.
  1261. //
  1262. // See ListAgents method for more information on how to use this operation.
  1263. //
  1264. // Note: This operation can generate multiple requests to a service.
  1265. //
  1266. // // Example iterating over at most 3 pages of a ListAgents operation.
  1267. // pageNum := 0
  1268. // err := client.ListAgentsPages(params,
  1269. // func(page *ListAgentsOutput, lastPage bool) bool {
  1270. // pageNum++
  1271. // fmt.Println(page)
  1272. // return pageNum <= 3
  1273. // })
  1274. //
  1275. func (c *DataSync) ListAgentsPages(input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool) error {
  1276. return c.ListAgentsPagesWithContext(aws.BackgroundContext(), input, fn)
  1277. }
  1278. // ListAgentsPagesWithContext same as ListAgentsPages except
  1279. // it takes a Context and allows setting request options on the pages.
  1280. //
  1281. // The context must be non-nil and will be used for request cancellation. If
  1282. // the context is nil a panic will occur. In the future the SDK may create
  1283. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1284. // for more information on using Contexts.
  1285. func (c *DataSync) ListAgentsPagesWithContext(ctx aws.Context, input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool, opts ...request.Option) error {
  1286. p := request.Pagination{
  1287. NewRequest: func() (*request.Request, error) {
  1288. var inCpy *ListAgentsInput
  1289. if input != nil {
  1290. tmp := *input
  1291. inCpy = &tmp
  1292. }
  1293. req, _ := c.ListAgentsRequest(inCpy)
  1294. req.SetContext(ctx)
  1295. req.ApplyOptions(opts...)
  1296. return req, nil
  1297. },
  1298. }
  1299. cont := true
  1300. for p.Next() && cont {
  1301. cont = fn(p.Page().(*ListAgentsOutput), !p.HasNextPage())
  1302. }
  1303. return p.Err()
  1304. }
  1305. const opListLocations = "ListLocations"
  1306. // ListLocationsRequest generates a "aws/request.Request" representing the
  1307. // client's request for the ListLocations operation. The "output" return
  1308. // value will be populated with the request's response once the request completes
  1309. // successfully.
  1310. //
  1311. // Use "Send" method on the returned Request to send the API call to the service.
  1312. // the "output" return value is not valid until after Send returns without error.
  1313. //
  1314. // See ListLocations for more information on using the ListLocations
  1315. // API call, and error handling.
  1316. //
  1317. // This method is useful when you want to inject custom logic or configuration
  1318. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1319. //
  1320. //
  1321. // // Example sending a request using the ListLocationsRequest method.
  1322. // req, resp := client.ListLocationsRequest(params)
  1323. //
  1324. // err := req.Send()
  1325. // if err == nil { // resp is now filled
  1326. // fmt.Println(resp)
  1327. // }
  1328. //
  1329. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations
  1330. func (c *DataSync) ListLocationsRequest(input *ListLocationsInput) (req *request.Request, output *ListLocationsOutput) {
  1331. op := &request.Operation{
  1332. Name: opListLocations,
  1333. HTTPMethod: "POST",
  1334. HTTPPath: "/",
  1335. Paginator: &request.Paginator{
  1336. InputTokens: []string{"NextToken"},
  1337. OutputTokens: []string{"NextToken"},
  1338. LimitToken: "MaxResults",
  1339. TruncationToken: "",
  1340. },
  1341. }
  1342. if input == nil {
  1343. input = &ListLocationsInput{}
  1344. }
  1345. output = &ListLocationsOutput{}
  1346. req = c.newRequest(op, input, output)
  1347. return
  1348. }
  1349. // ListLocations API operation for AWS DataSync.
  1350. //
  1351. // Returns a lists of source and destination locations.
  1352. //
  1353. // If you have more locations than are returned in a response (that is, the
  1354. // response returns only a truncated list of your agents), the response contains
  1355. // a token that you can specify in your next request to fetch the next page
  1356. // of locations.
  1357. //
  1358. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1359. // with awserr.Error's Code and Message methods to get detailed information about
  1360. // the error.
  1361. //
  1362. // See the AWS API reference guide for AWS DataSync's
  1363. // API operation ListLocations for usage and error information.
  1364. //
  1365. // Returned Error Codes:
  1366. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1367. // This exception is thrown when the client submits a malformed request.
  1368. //
  1369. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations
  1370. func (c *DataSync) ListLocations(input *ListLocationsInput) (*ListLocationsOutput, error) {
  1371. req, out := c.ListLocationsRequest(input)
  1372. return out, req.Send()
  1373. }
  1374. // ListLocationsWithContext is the same as ListLocations with the addition of
  1375. // the ability to pass a context and additional request options.
  1376. //
  1377. // See ListLocations for details on how to use this API operation.
  1378. //
  1379. // The context must be non-nil and will be used for request cancellation. If
  1380. // the context is nil a panic will occur. In the future the SDK may create
  1381. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1382. // for more information on using Contexts.
  1383. func (c *DataSync) ListLocationsWithContext(ctx aws.Context, input *ListLocationsInput, opts ...request.Option) (*ListLocationsOutput, error) {
  1384. req, out := c.ListLocationsRequest(input)
  1385. req.SetContext(ctx)
  1386. req.ApplyOptions(opts...)
  1387. return out, req.Send()
  1388. }
  1389. // ListLocationsPages iterates over the pages of a ListLocations operation,
  1390. // calling the "fn" function with the response data for each page. To stop
  1391. // iterating, return false from the fn function.
  1392. //
  1393. // See ListLocations method for more information on how to use this operation.
  1394. //
  1395. // Note: This operation can generate multiple requests to a service.
  1396. //
  1397. // // Example iterating over at most 3 pages of a ListLocations operation.
  1398. // pageNum := 0
  1399. // err := client.ListLocationsPages(params,
  1400. // func(page *ListLocationsOutput, lastPage bool) bool {
  1401. // pageNum++
  1402. // fmt.Println(page)
  1403. // return pageNum <= 3
  1404. // })
  1405. //
  1406. func (c *DataSync) ListLocationsPages(input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool) error {
  1407. return c.ListLocationsPagesWithContext(aws.BackgroundContext(), input, fn)
  1408. }
  1409. // ListLocationsPagesWithContext same as ListLocationsPages except
  1410. // it takes a Context and allows setting request options on the pages.
  1411. //
  1412. // The context must be non-nil and will be used for request cancellation. If
  1413. // the context is nil a panic will occur. In the future the SDK may create
  1414. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1415. // for more information on using Contexts.
  1416. func (c *DataSync) ListLocationsPagesWithContext(ctx aws.Context, input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool, opts ...request.Option) error {
  1417. p := request.Pagination{
  1418. NewRequest: func() (*request.Request, error) {
  1419. var inCpy *ListLocationsInput
  1420. if input != nil {
  1421. tmp := *input
  1422. inCpy = &tmp
  1423. }
  1424. req, _ := c.ListLocationsRequest(inCpy)
  1425. req.SetContext(ctx)
  1426. req.ApplyOptions(opts...)
  1427. return req, nil
  1428. },
  1429. }
  1430. cont := true
  1431. for p.Next() && cont {
  1432. cont = fn(p.Page().(*ListLocationsOutput), !p.HasNextPage())
  1433. }
  1434. return p.Err()
  1435. }
  1436. const opListTagsForResource = "ListTagsForResource"
  1437. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1438. // client's request for the ListTagsForResource operation. The "output" return
  1439. // value will be populated with the request's response once the request completes
  1440. // successfully.
  1441. //
  1442. // Use "Send" method on the returned Request to send the API call to the service.
  1443. // the "output" return value is not valid until after Send returns without error.
  1444. //
  1445. // See ListTagsForResource for more information on using the ListTagsForResource
  1446. // API call, and error handling.
  1447. //
  1448. // This method is useful when you want to inject custom logic or configuration
  1449. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1450. //
  1451. //
  1452. // // Example sending a request using the ListTagsForResourceRequest method.
  1453. // req, resp := client.ListTagsForResourceRequest(params)
  1454. //
  1455. // err := req.Send()
  1456. // if err == nil { // resp is now filled
  1457. // fmt.Println(resp)
  1458. // }
  1459. //
  1460. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTagsForResource
  1461. func (c *DataSync) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1462. op := &request.Operation{
  1463. Name: opListTagsForResource,
  1464. HTTPMethod: "POST",
  1465. HTTPPath: "/",
  1466. Paginator: &request.Paginator{
  1467. InputTokens: []string{"NextToken"},
  1468. OutputTokens: []string{"NextToken"},
  1469. LimitToken: "MaxResults",
  1470. TruncationToken: "",
  1471. },
  1472. }
  1473. if input == nil {
  1474. input = &ListTagsForResourceInput{}
  1475. }
  1476. output = &ListTagsForResourceOutput{}
  1477. req = c.newRequest(op, input, output)
  1478. return
  1479. }
  1480. // ListTagsForResource API operation for AWS DataSync.
  1481. //
  1482. // Returns all the tags associated with a specified resources.
  1483. //
  1484. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1485. // with awserr.Error's Code and Message methods to get detailed information about
  1486. // the error.
  1487. //
  1488. // See the AWS API reference guide for AWS DataSync's
  1489. // API operation ListTagsForResource for usage and error information.
  1490. //
  1491. // Returned Error Codes:
  1492. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1493. // This exception is thrown when the client submits a malformed request.
  1494. //
  1495. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTagsForResource
  1496. func (c *DataSync) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  1497. req, out := c.ListTagsForResourceRequest(input)
  1498. return out, req.Send()
  1499. }
  1500. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  1501. // the ability to pass a context and additional request options.
  1502. //
  1503. // See ListTagsForResource for details on how to use this API operation.
  1504. //
  1505. // The context must be non-nil and will be used for request cancellation. If
  1506. // the context is nil a panic will occur. In the future the SDK may create
  1507. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1508. // for more information on using Contexts.
  1509. func (c *DataSync) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  1510. req, out := c.ListTagsForResourceRequest(input)
  1511. req.SetContext(ctx)
  1512. req.ApplyOptions(opts...)
  1513. return out, req.Send()
  1514. }
  1515. // ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation,
  1516. // calling the "fn" function with the response data for each page. To stop
  1517. // iterating, return false from the fn function.
  1518. //
  1519. // See ListTagsForResource method for more information on how to use this operation.
  1520. //
  1521. // Note: This operation can generate multiple requests to a service.
  1522. //
  1523. // // Example iterating over at most 3 pages of a ListTagsForResource operation.
  1524. // pageNum := 0
  1525. // err := client.ListTagsForResourcePages(params,
  1526. // func(page *ListTagsForResourceOutput, lastPage bool) bool {
  1527. // pageNum++
  1528. // fmt.Println(page)
  1529. // return pageNum <= 3
  1530. // })
  1531. //
  1532. func (c *DataSync) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error {
  1533. return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn)
  1534. }
  1535. // ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except
  1536. // it takes a Context and allows setting request options on the pages.
  1537. //
  1538. // The context must be non-nil and will be used for request cancellation. If
  1539. // the context is nil a panic will occur. In the future the SDK may create
  1540. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1541. // for more information on using Contexts.
  1542. func (c *DataSync) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error {
  1543. p := request.Pagination{
  1544. NewRequest: func() (*request.Request, error) {
  1545. var inCpy *ListTagsForResourceInput
  1546. if input != nil {
  1547. tmp := *input
  1548. inCpy = &tmp
  1549. }
  1550. req, _ := c.ListTagsForResourceRequest(inCpy)
  1551. req.SetContext(ctx)
  1552. req.ApplyOptions(opts...)
  1553. return req, nil
  1554. },
  1555. }
  1556. cont := true
  1557. for p.Next() && cont {
  1558. cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage())
  1559. }
  1560. return p.Err()
  1561. }
  1562. const opListTaskExecutions = "ListTaskExecutions"
  1563. // ListTaskExecutionsRequest generates a "aws/request.Request" representing the
  1564. // client's request for the ListTaskExecutions operation. The "output" return
  1565. // value will be populated with the request's response once the request completes
  1566. // successfully.
  1567. //
  1568. // Use "Send" method on the returned Request to send the API call to the service.
  1569. // the "output" return value is not valid until after Send returns without error.
  1570. //
  1571. // See ListTaskExecutions for more information on using the ListTaskExecutions
  1572. // API call, and error handling.
  1573. //
  1574. // This method is useful when you want to inject custom logic or configuration
  1575. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1576. //
  1577. //
  1578. // // Example sending a request using the ListTaskExecutionsRequest method.
  1579. // req, resp := client.ListTaskExecutionsRequest(params)
  1580. //
  1581. // err := req.Send()
  1582. // if err == nil { // resp is now filled
  1583. // fmt.Println(resp)
  1584. // }
  1585. //
  1586. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions
  1587. func (c *DataSync) ListTaskExecutionsRequest(input *ListTaskExecutionsInput) (req *request.Request, output *ListTaskExecutionsOutput) {
  1588. op := &request.Operation{
  1589. Name: opListTaskExecutions,
  1590. HTTPMethod: "POST",
  1591. HTTPPath: "/",
  1592. Paginator: &request.Paginator{
  1593. InputTokens: []string{"NextToken"},
  1594. OutputTokens: []string{"NextToken"},
  1595. LimitToken: "MaxResults",
  1596. TruncationToken: "",
  1597. },
  1598. }
  1599. if input == nil {
  1600. input = &ListTaskExecutionsInput{}
  1601. }
  1602. output = &ListTaskExecutionsOutput{}
  1603. req = c.newRequest(op, input, output)
  1604. return
  1605. }
  1606. // ListTaskExecutions API operation for AWS DataSync.
  1607. //
  1608. // Returns a list of executed tasks.
  1609. //
  1610. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1611. // with awserr.Error's Code and Message methods to get detailed information about
  1612. // the error.
  1613. //
  1614. // See the AWS API reference guide for AWS DataSync's
  1615. // API operation ListTaskExecutions for usage and error information.
  1616. //
  1617. // Returned Error Codes:
  1618. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1619. // This exception is thrown when the client submits a malformed request.
  1620. //
  1621. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions
  1622. func (c *DataSync) ListTaskExecutions(input *ListTaskExecutionsInput) (*ListTaskExecutionsOutput, error) {
  1623. req, out := c.ListTaskExecutionsRequest(input)
  1624. return out, req.Send()
  1625. }
  1626. // ListTaskExecutionsWithContext is the same as ListTaskExecutions with the addition of
  1627. // the ability to pass a context and additional request options.
  1628. //
  1629. // See ListTaskExecutions for details on how to use this API operation.
  1630. //
  1631. // The context must be non-nil and will be used for request cancellation. If
  1632. // the context is nil a panic will occur. In the future the SDK may create
  1633. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1634. // for more information on using Contexts.
  1635. func (c *DataSync) ListTaskExecutionsWithContext(ctx aws.Context, input *ListTaskExecutionsInput, opts ...request.Option) (*ListTaskExecutionsOutput, error) {
  1636. req, out := c.ListTaskExecutionsRequest(input)
  1637. req.SetContext(ctx)
  1638. req.ApplyOptions(opts...)
  1639. return out, req.Send()
  1640. }
  1641. // ListTaskExecutionsPages iterates over the pages of a ListTaskExecutions operation,
  1642. // calling the "fn" function with the response data for each page. To stop
  1643. // iterating, return false from the fn function.
  1644. //
  1645. // See ListTaskExecutions method for more information on how to use this operation.
  1646. //
  1647. // Note: This operation can generate multiple requests to a service.
  1648. //
  1649. // // Example iterating over at most 3 pages of a ListTaskExecutions operation.
  1650. // pageNum := 0
  1651. // err := client.ListTaskExecutionsPages(params,
  1652. // func(page *ListTaskExecutionsOutput, lastPage bool) bool {
  1653. // pageNum++
  1654. // fmt.Println(page)
  1655. // return pageNum <= 3
  1656. // })
  1657. //
  1658. func (c *DataSync) ListTaskExecutionsPages(input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool) error {
  1659. return c.ListTaskExecutionsPagesWithContext(aws.BackgroundContext(), input, fn)
  1660. }
  1661. // ListTaskExecutionsPagesWithContext same as ListTaskExecutionsPages except
  1662. // it takes a Context and allows setting request options on the pages.
  1663. //
  1664. // The context must be non-nil and will be used for request cancellation. If
  1665. // the context is nil a panic will occur. In the future the SDK may create
  1666. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1667. // for more information on using Contexts.
  1668. func (c *DataSync) ListTaskExecutionsPagesWithContext(ctx aws.Context, input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool, opts ...request.Option) error {
  1669. p := request.Pagination{
  1670. NewRequest: func() (*request.Request, error) {
  1671. var inCpy *ListTaskExecutionsInput
  1672. if input != nil {
  1673. tmp := *input
  1674. inCpy = &tmp
  1675. }
  1676. req, _ := c.ListTaskExecutionsRequest(inCpy)
  1677. req.SetContext(ctx)
  1678. req.ApplyOptions(opts...)
  1679. return req, nil
  1680. },
  1681. }
  1682. cont := true
  1683. for p.Next() && cont {
  1684. cont = fn(p.Page().(*ListTaskExecutionsOutput), !p.HasNextPage())
  1685. }
  1686. return p.Err()
  1687. }
  1688. const opListTasks = "ListTasks"
  1689. // ListTasksRequest generates a "aws/request.Request" representing the
  1690. // client's request for the ListTasks operation. The "output" return
  1691. // value will be populated with the request's response once the request completes
  1692. // successfully.
  1693. //
  1694. // Use "Send" method on the returned Request to send the API call to the service.
  1695. // the "output" return value is not valid until after Send returns without error.
  1696. //
  1697. // See ListTasks for more information on using the ListTasks
  1698. // API call, and error handling.
  1699. //
  1700. // This method is useful when you want to inject custom logic or configuration
  1701. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1702. //
  1703. //
  1704. // // Example sending a request using the ListTasksRequest method.
  1705. // req, resp := client.ListTasksRequest(params)
  1706. //
  1707. // err := req.Send()
  1708. // if err == nil { // resp is now filled
  1709. // fmt.Println(resp)
  1710. // }
  1711. //
  1712. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks
  1713. func (c *DataSync) ListTasksRequest(input *ListTasksInput) (req *request.Request, output *ListTasksOutput) {
  1714. op := &request.Operation{
  1715. Name: opListTasks,
  1716. HTTPMethod: "POST",
  1717. HTTPPath: "/",
  1718. Paginator: &request.Paginator{
  1719. InputTokens: []string{"NextToken"},
  1720. OutputTokens: []string{"NextToken"},
  1721. LimitToken: "MaxResults",
  1722. TruncationToken: "",
  1723. },
  1724. }
  1725. if input == nil {
  1726. input = &ListTasksInput{}
  1727. }
  1728. output = &ListTasksOutput{}
  1729. req = c.newRequest(op, input, output)
  1730. return
  1731. }
  1732. // ListTasks API operation for AWS DataSync.
  1733. //
  1734. // Returns a list of all the tasks.
  1735. //
  1736. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1737. // with awserr.Error's Code and Message methods to get detailed information about
  1738. // the error.
  1739. //
  1740. // See the AWS API reference guide for AWS DataSync's
  1741. // API operation ListTasks for usage and error information.
  1742. //
  1743. // Returned Error Codes:
  1744. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1745. // This exception is thrown when the client submits a malformed request.
  1746. //
  1747. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks
  1748. func (c *DataSync) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) {
  1749. req, out := c.ListTasksRequest(input)
  1750. return out, req.Send()
  1751. }
  1752. // ListTasksWithContext is the same as ListTasks with the addition of
  1753. // the ability to pass a context and additional request options.
  1754. //
  1755. // See ListTasks for details on how to use this API operation.
  1756. //
  1757. // The context must be non-nil and will be used for request cancellation. If
  1758. // the context is nil a panic will occur. In the future the SDK may create
  1759. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1760. // for more information on using Contexts.
  1761. func (c *DataSync) ListTasksWithContext(ctx aws.Context, input *ListTasksInput, opts ...request.Option) (*ListTasksOutput, error) {
  1762. req, out := c.ListTasksRequest(input)
  1763. req.SetContext(ctx)
  1764. req.ApplyOptions(opts...)
  1765. return out, req.Send()
  1766. }
  1767. // ListTasksPages iterates over the pages of a ListTasks operation,
  1768. // calling the "fn" function with the response data for each page. To stop
  1769. // iterating, return false from the fn function.
  1770. //
  1771. // See ListTasks method for more information on how to use this operation.
  1772. //
  1773. // Note: This operation can generate multiple requests to a service.
  1774. //
  1775. // // Example iterating over at most 3 pages of a ListTasks operation.
  1776. // pageNum := 0
  1777. // err := client.ListTasksPages(params,
  1778. // func(page *ListTasksOutput, lastPage bool) bool {
  1779. // pageNum++
  1780. // fmt.Println(page)
  1781. // return pageNum <= 3
  1782. // })
  1783. //
  1784. func (c *DataSync) ListTasksPages(input *ListTasksInput, fn func(*ListTasksOutput, bool) bool) error {
  1785. return c.ListTasksPagesWithContext(aws.BackgroundContext(), input, fn)
  1786. }
  1787. // ListTasksPagesWithContext same as ListTasksPages except
  1788. // it takes a Context and allows setting request options on the pages.
  1789. //
  1790. // The context must be non-nil and will be used for request cancellation. If
  1791. // the context is nil a panic will occur. In the future the SDK may create
  1792. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1793. // for more information on using Contexts.
  1794. func (c *DataSync) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, fn func(*ListTasksOutput, bool) bool, opts ...request.Option) error {
  1795. p := request.Pagination{
  1796. NewRequest: func() (*request.Request, error) {
  1797. var inCpy *ListTasksInput
  1798. if input != nil {
  1799. tmp := *input
  1800. inCpy = &tmp
  1801. }
  1802. req, _ := c.ListTasksRequest(inCpy)
  1803. req.SetContext(ctx)
  1804. req.ApplyOptions(opts...)
  1805. return req, nil
  1806. },
  1807. }
  1808. cont := true
  1809. for p.Next() && cont {
  1810. cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage())
  1811. }
  1812. return p.Err()
  1813. }
  1814. const opStartTaskExecution = "StartTaskExecution"
  1815. // StartTaskExecutionRequest generates a "aws/request.Request" representing the
  1816. // client's request for the StartTaskExecution operation. The "output" return
  1817. // value will be populated with the request's response once the request completes
  1818. // successfully.
  1819. //
  1820. // Use "Send" method on the returned Request to send the API call to the service.
  1821. // the "output" return value is not valid until after Send returns without error.
  1822. //
  1823. // See StartTaskExecution for more information on using the StartTaskExecution
  1824. // API call, and error handling.
  1825. //
  1826. // This method is useful when you want to inject custom logic or configuration
  1827. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1828. //
  1829. //
  1830. // // Example sending a request using the StartTaskExecutionRequest method.
  1831. // req, resp := client.StartTaskExecutionRequest(params)
  1832. //
  1833. // err := req.Send()
  1834. // if err == nil { // resp is now filled
  1835. // fmt.Println(resp)
  1836. // }
  1837. //
  1838. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution
  1839. func (c *DataSync) StartTaskExecutionRequest(input *StartTaskExecutionInput) (req *request.Request, output *StartTaskExecutionOutput) {
  1840. op := &request.Operation{
  1841. Name: opStartTaskExecution,
  1842. HTTPMethod: "POST",
  1843. HTTPPath: "/",
  1844. }
  1845. if input == nil {
  1846. input = &StartTaskExecutionInput{}
  1847. }
  1848. output = &StartTaskExecutionOutput{}
  1849. req = c.newRequest(op, input, output)
  1850. return
  1851. }
  1852. // StartTaskExecution API operation for AWS DataSync.
  1853. //
  1854. // Starts a specific invocation of a task. A TaskExecution value represents
  1855. // an individual run of a task. Each task can have at most one TaskExecution
  1856. // at a time.
  1857. //
  1858. // TaskExecution has the following transition phases: INITIALIZING | PREPARING
  1859. // | TRANSFERRING | VERIFYING | SUCCESS/FAILURE.
  1860. //
  1861. // For detailed information, see Task Execution in Components and Terminology
  1862. // (https://docs.aws.amazon.com/sync-service/latest/userguide/how-awssync-works.html#terminology)
  1863. // in the AWS DataSync User Guide.
  1864. //
  1865. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1866. // with awserr.Error's Code and Message methods to get detailed information about
  1867. // the error.
  1868. //
  1869. // See the AWS API reference guide for AWS DataSync's
  1870. // API operation StartTaskExecution for usage and error information.
  1871. //
  1872. // Returned Error Codes:
  1873. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1874. // This exception is thrown when the client submits a malformed request.
  1875. //
  1876. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution
  1877. func (c *DataSync) StartTaskExecution(input *StartTaskExecutionInput) (*StartTaskExecutionOutput, error) {
  1878. req, out := c.StartTaskExecutionRequest(input)
  1879. return out, req.Send()
  1880. }
  1881. // StartTaskExecutionWithContext is the same as StartTaskExecution with the addition of
  1882. // the ability to pass a context and additional request options.
  1883. //
  1884. // See StartTaskExecution for details on how to use this API operation.
  1885. //
  1886. // The context must be non-nil and will be used for request cancellation. If
  1887. // the context is nil a panic will occur. In the future the SDK may create
  1888. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1889. // for more information on using Contexts.
  1890. func (c *DataSync) StartTaskExecutionWithContext(ctx aws.Context, input *StartTaskExecutionInput, opts ...request.Option) (*StartTaskExecutionOutput, error) {
  1891. req, out := c.StartTaskExecutionRequest(input)
  1892. req.SetContext(ctx)
  1893. req.ApplyOptions(opts...)
  1894. return out, req.Send()
  1895. }
  1896. const opTagResource = "TagResource"
  1897. // TagResourceRequest generates a "aws/request.Request" representing the
  1898. // client's request for the TagResource operation. The "output" return
  1899. // value will be populated with the request's response once the request completes
  1900. // successfully.
  1901. //
  1902. // Use "Send" method on the returned Request to send the API call to the service.
  1903. // the "output" return value is not valid until after Send returns without error.
  1904. //
  1905. // See TagResource for more information on using the TagResource
  1906. // API call, and error handling.
  1907. //
  1908. // This method is useful when you want to inject custom logic or configuration
  1909. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1910. //
  1911. //
  1912. // // Example sending a request using the TagResourceRequest method.
  1913. // req, resp := client.TagResourceRequest(params)
  1914. //
  1915. // err := req.Send()
  1916. // if err == nil { // resp is now filled
  1917. // fmt.Println(resp)
  1918. // }
  1919. //
  1920. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/TagResource
  1921. func (c *DataSync) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  1922. op := &request.Operation{
  1923. Name: opTagResource,
  1924. HTTPMethod: "POST",
  1925. HTTPPath: "/",
  1926. }
  1927. if input == nil {
  1928. input = &TagResourceInput{}
  1929. }
  1930. output = &TagResourceOutput{}
  1931. req = c.newRequest(op, input, output)
  1932. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1933. return
  1934. }
  1935. // TagResource API operation for AWS DataSync.
  1936. //
  1937. // Applies a key-value pair to an AWS resource.
  1938. //
  1939. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1940. // with awserr.Error's Code and Message methods to get detailed information about
  1941. // the error.
  1942. //
  1943. // See the AWS API reference guide for AWS DataSync's
  1944. // API operation TagResource for usage and error information.
  1945. //
  1946. // Returned Error Codes:
  1947. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1948. // This exception is thrown when the client submits a malformed request.
  1949. //
  1950. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/TagResource
  1951. func (c *DataSync) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  1952. req, out := c.TagResourceRequest(input)
  1953. return out, req.Send()
  1954. }
  1955. // TagResourceWithContext is the same as TagResource with the addition of
  1956. // the ability to pass a context and additional request options.
  1957. //
  1958. // See TagResource for details on how to use this API operation.
  1959. //
  1960. // The context must be non-nil and will be used for request cancellation. If
  1961. // the context is nil a panic will occur. In the future the SDK may create
  1962. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1963. // for more information on using Contexts.
  1964. func (c *DataSync) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  1965. req, out := c.TagResourceRequest(input)
  1966. req.SetContext(ctx)
  1967. req.ApplyOptions(opts...)
  1968. return out, req.Send()
  1969. }
  1970. const opUntagResource = "UntagResource"
  1971. // UntagResourceRequest generates a "aws/request.Request" representing the
  1972. // client's request for the UntagResource operation. The "output" return
  1973. // value will be populated with the request's response once the request completes
  1974. // successfully.
  1975. //
  1976. // Use "Send" method on the returned Request to send the API call to the service.
  1977. // the "output" return value is not valid until after Send returns without error.
  1978. //
  1979. // See UntagResource for more information on using the UntagResource
  1980. // API call, and error handling.
  1981. //
  1982. // This method is useful when you want to inject custom logic or configuration
  1983. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1984. //
  1985. //
  1986. // // Example sending a request using the UntagResourceRequest method.
  1987. // req, resp := client.UntagResourceRequest(params)
  1988. //
  1989. // err := req.Send()
  1990. // if err == nil { // resp is now filled
  1991. // fmt.Println(resp)
  1992. // }
  1993. //
  1994. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UntagResource
  1995. func (c *DataSync) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  1996. op := &request.Operation{
  1997. Name: opUntagResource,
  1998. HTTPMethod: "POST",
  1999. HTTPPath: "/",
  2000. }
  2001. if input == nil {
  2002. input = &UntagResourceInput{}
  2003. }
  2004. output = &UntagResourceOutput{}
  2005. req = c.newRequest(op, input, output)
  2006. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2007. return
  2008. }
  2009. // UntagResource API operation for AWS DataSync.
  2010. //
  2011. // Removes a tag from an AWS resource.
  2012. //
  2013. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2014. // with awserr.Error's Code and Message methods to get detailed information about
  2015. // the error.
  2016. //
  2017. // See the AWS API reference guide for AWS DataSync's
  2018. // API operation UntagResource for usage and error information.
  2019. //
  2020. // Returned Error Codes:
  2021. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2022. // This exception is thrown when the client submits a malformed request.
  2023. //
  2024. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UntagResource
  2025. func (c *DataSync) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  2026. req, out := c.UntagResourceRequest(input)
  2027. return out, req.Send()
  2028. }
  2029. // UntagResourceWithContext is the same as UntagResource with the addition of
  2030. // the ability to pass a context and additional request options.
  2031. //
  2032. // See UntagResource for details on how to use this API operation.
  2033. //
  2034. // The context must be non-nil and will be used for request cancellation. If
  2035. // the context is nil a panic will occur. In the future the SDK may create
  2036. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2037. // for more information on using Contexts.
  2038. func (c *DataSync) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  2039. req, out := c.UntagResourceRequest(input)
  2040. req.SetContext(ctx)
  2041. req.ApplyOptions(opts...)
  2042. return out, req.Send()
  2043. }
  2044. const opUpdateAgent = "UpdateAgent"
  2045. // UpdateAgentRequest generates a "aws/request.Request" representing the
  2046. // client's request for the UpdateAgent operation. The "output" return
  2047. // value will be populated with the request's response once the request completes
  2048. // successfully.
  2049. //
  2050. // Use "Send" method on the returned Request to send the API call to the service.
  2051. // the "output" return value is not valid until after Send returns without error.
  2052. //
  2053. // See UpdateAgent for more information on using the UpdateAgent
  2054. // API call, and error handling.
  2055. //
  2056. // This method is useful when you want to inject custom logic or configuration
  2057. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2058. //
  2059. //
  2060. // // Example sending a request using the UpdateAgentRequest method.
  2061. // req, resp := client.UpdateAgentRequest(params)
  2062. //
  2063. // err := req.Send()
  2064. // if err == nil { // resp is now filled
  2065. // fmt.Println(resp)
  2066. // }
  2067. //
  2068. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent
  2069. func (c *DataSync) UpdateAgentRequest(input *UpdateAgentInput) (req *request.Request, output *UpdateAgentOutput) {
  2070. op := &request.Operation{
  2071. Name: opUpdateAgent,
  2072. HTTPMethod: "POST",
  2073. HTTPPath: "/",
  2074. }
  2075. if input == nil {
  2076. input = &UpdateAgentInput{}
  2077. }
  2078. output = &UpdateAgentOutput{}
  2079. req = c.newRequest(op, input, output)
  2080. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2081. return
  2082. }
  2083. // UpdateAgent API operation for AWS DataSync.
  2084. //
  2085. // Updates the name of an agent.
  2086. //
  2087. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2088. // with awserr.Error's Code and Message methods to get detailed information about
  2089. // the error.
  2090. //
  2091. // See the AWS API reference guide for AWS DataSync's
  2092. // API operation UpdateAgent for usage and error information.
  2093. //
  2094. // Returned Error Codes:
  2095. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2096. // This exception is thrown when the client submits a malformed request.
  2097. //
  2098. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent
  2099. func (c *DataSync) UpdateAgent(input *UpdateAgentInput) (*UpdateAgentOutput, error) {
  2100. req, out := c.UpdateAgentRequest(input)
  2101. return out, req.Send()
  2102. }
  2103. // UpdateAgentWithContext is the same as UpdateAgent with the addition of
  2104. // the ability to pass a context and additional request options.
  2105. //
  2106. // See UpdateAgent for details on how to use this API operation.
  2107. //
  2108. // The context must be non-nil and will be used for request cancellation. If
  2109. // the context is nil a panic will occur. In the future the SDK may create
  2110. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2111. // for more information on using Contexts.
  2112. func (c *DataSync) UpdateAgentWithContext(ctx aws.Context, input *UpdateAgentInput, opts ...request.Option) (*UpdateAgentOutput, error) {
  2113. req, out := c.UpdateAgentRequest(input)
  2114. req.SetContext(ctx)
  2115. req.ApplyOptions(opts...)
  2116. return out, req.Send()
  2117. }
  2118. const opUpdateTask = "UpdateTask"
  2119. // UpdateTaskRequest generates a "aws/request.Request" representing the
  2120. // client's request for the UpdateTask operation. The "output" return
  2121. // value will be populated with the request's response once the request completes
  2122. // successfully.
  2123. //
  2124. // Use "Send" method on the returned Request to send the API call to the service.
  2125. // the "output" return value is not valid until after Send returns without error.
  2126. //
  2127. // See UpdateTask for more information on using the UpdateTask
  2128. // API call, and error handling.
  2129. //
  2130. // This method is useful when you want to inject custom logic or configuration
  2131. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2132. //
  2133. //
  2134. // // Example sending a request using the UpdateTaskRequest method.
  2135. // req, resp := client.UpdateTaskRequest(params)
  2136. //
  2137. // err := req.Send()
  2138. // if err == nil { // resp is now filled
  2139. // fmt.Println(resp)
  2140. // }
  2141. //
  2142. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask
  2143. func (c *DataSync) UpdateTaskRequest(input *UpdateTaskInput) (req *request.Request, output *UpdateTaskOutput) {
  2144. op := &request.Operation{
  2145. Name: opUpdateTask,
  2146. HTTPMethod: "POST",
  2147. HTTPPath: "/",
  2148. }
  2149. if input == nil {
  2150. input = &UpdateTaskInput{}
  2151. }
  2152. output = &UpdateTaskOutput{}
  2153. req = c.newRequest(op, input, output)
  2154. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2155. return
  2156. }
  2157. // UpdateTask API operation for AWS DataSync.
  2158. //
  2159. // Updates the metadata associated with a task.
  2160. //
  2161. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2162. // with awserr.Error's Code and Message methods to get detailed information about
  2163. // the error.
  2164. //
  2165. // See the AWS API reference guide for AWS DataSync's
  2166. // API operation UpdateTask for usage and error information.
  2167. //
  2168. // Returned Error Codes:
  2169. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2170. // This exception is thrown when the client submits a malformed request.
  2171. //
  2172. // See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask
  2173. func (c *DataSync) UpdateTask(input *UpdateTaskInput) (*UpdateTaskOutput, error) {
  2174. req, out := c.UpdateTaskRequest(input)
  2175. return out, req.Send()
  2176. }
  2177. // UpdateTaskWithContext is the same as UpdateTask with the addition of
  2178. // the ability to pass a context and additional request options.
  2179. //
  2180. // See UpdateTask for details on how to use this API operation.
  2181. //
  2182. // The context must be non-nil and will be used for request cancellation. If
  2183. // the context is nil a panic will occur. In the future the SDK may create
  2184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2185. // for more information on using Contexts.
  2186. func (c *DataSync) UpdateTaskWithContext(ctx aws.Context, input *UpdateTaskInput, opts ...request.Option) (*UpdateTaskOutput, error) {
  2187. req, out := c.UpdateTaskRequest(input)
  2188. req.SetContext(ctx)
  2189. req.ApplyOptions(opts...)
  2190. return out, req.Send()
  2191. }
  2192. // Represents a single entry in a list of agents. AgentListEntry returns an
  2193. // array that contains a list of agents when the ListAgents operation is called.
  2194. type AgentListEntry struct {
  2195. _ struct{} `type:"structure"`
  2196. // The Amazon Resource Name (ARN) of the agent.
  2197. AgentArn *string `type:"string"`
  2198. // The name of the agent.
  2199. Name *string `min:"1" type:"string"`
  2200. // The status of the agent.
  2201. Status *string `type:"string" enum:"AgentStatus"`
  2202. }
  2203. // String returns the string representation
  2204. func (s AgentListEntry) String() string {
  2205. return awsutil.Prettify(s)
  2206. }
  2207. // GoString returns the string representation
  2208. func (s AgentListEntry) GoString() string {
  2209. return s.String()
  2210. }
  2211. // SetAgentArn sets the AgentArn field's value.
  2212. func (s *AgentListEntry) SetAgentArn(v string) *AgentListEntry {
  2213. s.AgentArn = &v
  2214. return s
  2215. }
  2216. // SetName sets the Name field's value.
  2217. func (s *AgentListEntry) SetName(v string) *AgentListEntry {
  2218. s.Name = &v
  2219. return s
  2220. }
  2221. // SetStatus sets the Status field's value.
  2222. func (s *AgentListEntry) SetStatus(v string) *AgentListEntry {
  2223. s.Status = &v
  2224. return s
  2225. }
  2226. // CancelTaskExecutionRequest
  2227. type CancelTaskExecutionInput struct {
  2228. _ struct{} `type:"structure"`
  2229. // The Amazon Resource Name (ARN) of the task execution to cancel.
  2230. //
  2231. // TaskExecutionArn is a required field
  2232. TaskExecutionArn *string `type:"string" required:"true"`
  2233. }
  2234. // String returns the string representation
  2235. func (s CancelTaskExecutionInput) String() string {
  2236. return awsutil.Prettify(s)
  2237. }
  2238. // GoString returns the string representation
  2239. func (s CancelTaskExecutionInput) GoString() string {
  2240. return s.String()
  2241. }
  2242. // Validate inspects the fields of the type to determine if they are valid.
  2243. func (s *CancelTaskExecutionInput) Validate() error {
  2244. invalidParams := request.ErrInvalidParams{Context: "CancelTaskExecutionInput"}
  2245. if s.TaskExecutionArn == nil {
  2246. invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn"))
  2247. }
  2248. if invalidParams.Len() > 0 {
  2249. return invalidParams
  2250. }
  2251. return nil
  2252. }
  2253. // SetTaskExecutionArn sets the TaskExecutionArn field's value.
  2254. func (s *CancelTaskExecutionInput) SetTaskExecutionArn(v string) *CancelTaskExecutionInput {
  2255. s.TaskExecutionArn = &v
  2256. return s
  2257. }
  2258. type CancelTaskExecutionOutput struct {
  2259. _ struct{} `type:"structure"`
  2260. }
  2261. // String returns the string representation
  2262. func (s CancelTaskExecutionOutput) String() string {
  2263. return awsutil.Prettify(s)
  2264. }
  2265. // GoString returns the string representation
  2266. func (s CancelTaskExecutionOutput) GoString() string {
  2267. return s.String()
  2268. }
  2269. // CreateAgentRequest
  2270. type CreateAgentInput struct {
  2271. _ struct{} `type:"structure"`
  2272. // Your agent activation key. You can get the activation key either by sending
  2273. // an HTTP GET request with redirects that enable you to get the agent IP address
  2274. // (port 80). Alternatively, you can get it from the AWS DataSync console.
  2275. //
  2276. // The redirect URL returned in the response provides you the activation key
  2277. // for your agent in the query string parameter activationKey. It might also
  2278. // include other activation-related parameters; however, these are merely defaults.
  2279. // The arguments you pass to this API call determine the actual configuration
  2280. // of your agent. For more information, see Activating a Sync Agent (https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent)
  2281. // in the AWS DataSync User Guide.
  2282. //
  2283. // ActivationKey is a required field
  2284. ActivationKey *string `type:"string" required:"true"`
  2285. // The name you configured for your agent. This value is a text reference that
  2286. // is used to identify the agent in the console.
  2287. AgentName *string `min:"1" type:"string"`
  2288. // The key-value pair that represents the tag you want to associate with the
  2289. // agent. The value can be an empty string. This value helps you manage, filter,
  2290. // and search for your agents.
  2291. //
  2292. // Valid characters for key and value are letters, spaces, and numbers representable
  2293. // in UTF-8 format, and the following special characters: + - = . _ : / @.
  2294. Tags []*TagListEntry `type:"list"`
  2295. }
  2296. // String returns the string representation
  2297. func (s CreateAgentInput) String() string {
  2298. return awsutil.Prettify(s)
  2299. }
  2300. // GoString returns the string representation
  2301. func (s CreateAgentInput) GoString() string {
  2302. return s.String()
  2303. }
  2304. // Validate inspects the fields of the type to determine if they are valid.
  2305. func (s *CreateAgentInput) Validate() error {
  2306. invalidParams := request.ErrInvalidParams{Context: "CreateAgentInput"}
  2307. if s.ActivationKey == nil {
  2308. invalidParams.Add(request.NewErrParamRequired("ActivationKey"))
  2309. }
  2310. if s.AgentName != nil && len(*s.AgentName) < 1 {
  2311. invalidParams.Add(request.NewErrParamMinLen("AgentName", 1))
  2312. }
  2313. if s.Tags != nil {
  2314. for i, v := range s.Tags {
  2315. if v == nil {
  2316. continue
  2317. }
  2318. if err := v.Validate(); err != nil {
  2319. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2320. }
  2321. }
  2322. }
  2323. if invalidParams.Len() > 0 {
  2324. return invalidParams
  2325. }
  2326. return nil
  2327. }
  2328. // SetActivationKey sets the ActivationKey field's value.
  2329. func (s *CreateAgentInput) SetActivationKey(v string) *CreateAgentInput {
  2330. s.ActivationKey = &v
  2331. return s
  2332. }
  2333. // SetAgentName sets the AgentName field's value.
  2334. func (s *CreateAgentInput) SetAgentName(v string) *CreateAgentInput {
  2335. s.AgentName = &v
  2336. return s
  2337. }
  2338. // SetTags sets the Tags field's value.
  2339. func (s *CreateAgentInput) SetTags(v []*TagListEntry) *CreateAgentInput {
  2340. s.Tags = v
  2341. return s
  2342. }
  2343. // CreateAgentResponse
  2344. type CreateAgentOutput struct {
  2345. _ struct{} `type:"structure"`
  2346. // The Amazon Resource Name (ARN) of the agent. Use the ListAgents operation
  2347. // to return a list of agents for your account and AWS Region.
  2348. AgentArn *string `type:"string"`
  2349. }
  2350. // String returns the string representation
  2351. func (s CreateAgentOutput) String() string {
  2352. return awsutil.Prettify(s)
  2353. }
  2354. // GoString returns the string representation
  2355. func (s CreateAgentOutput) GoString() string {
  2356. return s.String()
  2357. }
  2358. // SetAgentArn sets the AgentArn field's value.
  2359. func (s *CreateAgentOutput) SetAgentArn(v string) *CreateAgentOutput {
  2360. s.AgentArn = &v
  2361. return s
  2362. }
  2363. // CreateLocationEfsRequest
  2364. type CreateLocationEfsInput struct {
  2365. _ struct{} `type:"structure"`
  2366. // The subnet and security group that the Amazon EFS file system uses.
  2367. //
  2368. // Ec2Config is a required field
  2369. Ec2Config *Ec2Config `type:"structure" required:"true"`
  2370. // The Amazon Resource Name (ARN) for the Amazon EFS file system.
  2371. //
  2372. // EfsFilesystemArn is a required field
  2373. EfsFilesystemArn *string `type:"string" required:"true"`
  2374. // A subdirectory in the location’s path. This subdirectory in the EFS file
  2375. // system is used to read data from the EFS source location or write data to
  2376. // the EFS destination. By default, AWS DataSync uses the root directory.
  2377. //
  2378. // Subdirectory is a required field
  2379. Subdirectory *string `type:"string" required:"true"`
  2380. // The key-value pair that represents a tag that you want to add to the resource.
  2381. // The value can be an empty string. This value helps you manage, filter, and
  2382. // search for your resources. We recommend that you create a name tag for your
  2383. // location.
  2384. Tags []*TagListEntry `type:"list"`
  2385. }
  2386. // String returns the string representation
  2387. func (s CreateLocationEfsInput) String() string {
  2388. return awsutil.Prettify(s)
  2389. }
  2390. // GoString returns the string representation
  2391. func (s CreateLocationEfsInput) GoString() string {
  2392. return s.String()
  2393. }
  2394. // Validate inspects the fields of the type to determine if they are valid.
  2395. func (s *CreateLocationEfsInput) Validate() error {
  2396. invalidParams := request.ErrInvalidParams{Context: "CreateLocationEfsInput"}
  2397. if s.Ec2Config == nil {
  2398. invalidParams.Add(request.NewErrParamRequired("Ec2Config"))
  2399. }
  2400. if s.EfsFilesystemArn == nil {
  2401. invalidParams.Add(request.NewErrParamRequired("EfsFilesystemArn"))
  2402. }
  2403. if s.Subdirectory == nil {
  2404. invalidParams.Add(request.NewErrParamRequired("Subdirectory"))
  2405. }
  2406. if s.Ec2Config != nil {
  2407. if err := s.Ec2Config.Validate(); err != nil {
  2408. invalidParams.AddNested("Ec2Config", err.(request.ErrInvalidParams))
  2409. }
  2410. }
  2411. if s.Tags != nil {
  2412. for i, v := range s.Tags {
  2413. if v == nil {
  2414. continue
  2415. }
  2416. if err := v.Validate(); err != nil {
  2417. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2418. }
  2419. }
  2420. }
  2421. if invalidParams.Len() > 0 {
  2422. return invalidParams
  2423. }
  2424. return nil
  2425. }
  2426. // SetEc2Config sets the Ec2Config field's value.
  2427. func (s *CreateLocationEfsInput) SetEc2Config(v *Ec2Config) *CreateLocationEfsInput {
  2428. s.Ec2Config = v
  2429. return s
  2430. }
  2431. // SetEfsFilesystemArn sets the EfsFilesystemArn field's value.
  2432. func (s *CreateLocationEfsInput) SetEfsFilesystemArn(v string) *CreateLocationEfsInput {
  2433. s.EfsFilesystemArn = &v
  2434. return s
  2435. }
  2436. // SetSubdirectory sets the Subdirectory field's value.
  2437. func (s *CreateLocationEfsInput) SetSubdirectory(v string) *CreateLocationEfsInput {
  2438. s.Subdirectory = &v
  2439. return s
  2440. }
  2441. // SetTags sets the Tags field's value.
  2442. func (s *CreateLocationEfsInput) SetTags(v []*TagListEntry) *CreateLocationEfsInput {
  2443. s.Tags = v
  2444. return s
  2445. }
  2446. // CreateLocationEfs
  2447. type CreateLocationEfsOutput struct {
  2448. _ struct{} `type:"structure"`
  2449. // The Amazon Resource Name (ARN) of the Amazon EFS file system location that
  2450. // is created.
  2451. LocationArn *string `type:"string"`
  2452. }
  2453. // String returns the string representation
  2454. func (s CreateLocationEfsOutput) String() string {
  2455. return awsutil.Prettify(s)
  2456. }
  2457. // GoString returns the string representation
  2458. func (s CreateLocationEfsOutput) GoString() string {
  2459. return s.String()
  2460. }
  2461. // SetLocationArn sets the LocationArn field's value.
  2462. func (s *CreateLocationEfsOutput) SetLocationArn(v string) *CreateLocationEfsOutput {
  2463. s.LocationArn = &v
  2464. return s
  2465. }
  2466. // CreateLocationNfsRequest
  2467. type CreateLocationNfsInput struct {
  2468. _ struct{} `type:"structure"`
  2469. // Contains a list of Amazon Resource Names (ARNs) of agents that are used to
  2470. // connect to an NFS server.
  2471. //
  2472. // OnPremConfig is a required field
  2473. OnPremConfig *OnPremConfig `type:"structure" required:"true"`
  2474. // The name of the NFS server. This value is the IP address or Domain Name Service
  2475. // (DNS) name of the NFS server. An agent that is installed on-premises uses
  2476. // this host name to mount the NFS server in a network.
  2477. //
  2478. // This name must either be DNS-compliant or must be an IP version 4 (IPv4)
  2479. // address.
  2480. //
  2481. // ServerHostname is a required field
  2482. ServerHostname *string `type:"string" required:"true"`
  2483. // The subdirectory in the NFS file system that is used to read data from the
  2484. // NFS source location or write data to the NFS destination. The NFS path should
  2485. // be a path that's exported by the NFS server, or a subdirectory of that path.
  2486. // The path should be such that it can be mounted by other NFS clients in your
  2487. // network.
  2488. //
  2489. // To see all the paths exported by your NFS server. run "showmount -e nfs-server-name"
  2490. // from an NFS client that has access to your server. You can specify any directory
  2491. // that appears in the results, and any subdirectory of that directory. Ensure
  2492. // that the NFS export is accessible without Kerberos authentication.
  2493. //
  2494. // To transfer all the data in the folder you specified, DataSync needs to have
  2495. // permissions to read all the data. To ensure this, either configure the NFS
  2496. // export with no_root_squash, or ensure that the permissions for all of the
  2497. // files that you want sync allow read access for all users. Doing either enables
  2498. // the agent to read the files. For the agent to access directories, you must
  2499. // additionally enable all execute access. For information about NFS export
  2500. // configuration, see 18.7. The /etc/exports Configuration File (https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-server-config-exports.html)
  2501. // in the Centos documentation.
  2502. //
  2503. // Subdirectory is a required field
  2504. Subdirectory *string `type:"string" required:"true"`
  2505. // The key-value pair that represents the tag that you want to add to the location.
  2506. // The value can be an empty string. We recommend using tags to name your resources.
  2507. Tags []*TagListEntry `type:"list"`
  2508. }
  2509. // String returns the string representation
  2510. func (s CreateLocationNfsInput) String() string {
  2511. return awsutil.Prettify(s)
  2512. }
  2513. // GoString returns the string representation
  2514. func (s CreateLocationNfsInput) GoString() string {
  2515. return s.String()
  2516. }
  2517. // Validate inspects the fields of the type to determine if they are valid.
  2518. func (s *CreateLocationNfsInput) Validate() error {
  2519. invalidParams := request.ErrInvalidParams{Context: "CreateLocationNfsInput"}
  2520. if s.OnPremConfig == nil {
  2521. invalidParams.Add(request.NewErrParamRequired("OnPremConfig"))
  2522. }
  2523. if s.ServerHostname == nil {
  2524. invalidParams.Add(request.NewErrParamRequired("ServerHostname"))
  2525. }
  2526. if s.Subdirectory == nil {
  2527. invalidParams.Add(request.NewErrParamRequired("Subdirectory"))
  2528. }
  2529. if s.OnPremConfig != nil {
  2530. if err := s.OnPremConfig.Validate(); err != nil {
  2531. invalidParams.AddNested("OnPremConfig", err.(request.ErrInvalidParams))
  2532. }
  2533. }
  2534. if s.Tags != nil {
  2535. for i, v := range s.Tags {
  2536. if v == nil {
  2537. continue
  2538. }
  2539. if err := v.Validate(); err != nil {
  2540. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2541. }
  2542. }
  2543. }
  2544. if invalidParams.Len() > 0 {
  2545. return invalidParams
  2546. }
  2547. return nil
  2548. }
  2549. // SetOnPremConfig sets the OnPremConfig field's value.
  2550. func (s *CreateLocationNfsInput) SetOnPremConfig(v *OnPremConfig) *CreateLocationNfsInput {
  2551. s.OnPremConfig = v
  2552. return s
  2553. }
  2554. // SetServerHostname sets the ServerHostname field's value.
  2555. func (s *CreateLocationNfsInput) SetServerHostname(v string) *CreateLocationNfsInput {
  2556. s.ServerHostname = &v
  2557. return s
  2558. }
  2559. // SetSubdirectory sets the Subdirectory field's value.
  2560. func (s *CreateLocationNfsInput) SetSubdirectory(v string) *CreateLocationNfsInput {
  2561. s.Subdirectory = &v
  2562. return s
  2563. }
  2564. // SetTags sets the Tags field's value.
  2565. func (s *CreateLocationNfsInput) SetTags(v []*TagListEntry) *CreateLocationNfsInput {
  2566. s.Tags = v
  2567. return s
  2568. }
  2569. // CreateLocationNfsResponse
  2570. type CreateLocationNfsOutput struct {
  2571. _ struct{} `type:"structure"`
  2572. // The Amazon Resource Name (ARN) of the source NFS file system location that
  2573. // is created.
  2574. LocationArn *string `type:"string"`
  2575. }
  2576. // String returns the string representation
  2577. func (s CreateLocationNfsOutput) String() string {
  2578. return awsutil.Prettify(s)
  2579. }
  2580. // GoString returns the string representation
  2581. func (s CreateLocationNfsOutput) GoString() string {
  2582. return s.String()
  2583. }
  2584. // SetLocationArn sets the LocationArn field's value.
  2585. func (s *CreateLocationNfsOutput) SetLocationArn(v string) *CreateLocationNfsOutput {
  2586. s.LocationArn = &v
  2587. return s
  2588. }
  2589. // CreateLocationS3Request
  2590. type CreateLocationS3Input struct {
  2591. _ struct{} `type:"structure"`
  2592. // The Amazon Resource Name (ARN) of the Amazon S3 bucket.
  2593. //
  2594. // S3BucketArn is a required field
  2595. S3BucketArn *string `type:"string" required:"true"`
  2596. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  2597. // (IAM) role that is used to access an Amazon S3 bucket. For detailed information
  2598. // about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli)
  2599. // in the AWS DataSync User Guide.
  2600. //
  2601. // S3Config is a required field
  2602. S3Config *S3Config `type:"structure" required:"true"`
  2603. // A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is
  2604. // used to read data from the S3 source location or write data to the S3 destination.
  2605. //
  2606. // Subdirectory is a required field
  2607. Subdirectory *string `type:"string" required:"true"`
  2608. // The key-value pair that represents the tag that you want to add to the location.
  2609. // The value can be an empty string. We recommend using tags to name your resources.
  2610. Tags []*TagListEntry `type:"list"`
  2611. }
  2612. // String returns the string representation
  2613. func (s CreateLocationS3Input) String() string {
  2614. return awsutil.Prettify(s)
  2615. }
  2616. // GoString returns the string representation
  2617. func (s CreateLocationS3Input) GoString() string {
  2618. return s.String()
  2619. }
  2620. // Validate inspects the fields of the type to determine if they are valid.
  2621. func (s *CreateLocationS3Input) Validate() error {
  2622. invalidParams := request.ErrInvalidParams{Context: "CreateLocationS3Input"}
  2623. if s.S3BucketArn == nil {
  2624. invalidParams.Add(request.NewErrParamRequired("S3BucketArn"))
  2625. }
  2626. if s.S3Config == nil {
  2627. invalidParams.Add(request.NewErrParamRequired("S3Config"))
  2628. }
  2629. if s.Subdirectory == nil {
  2630. invalidParams.Add(request.NewErrParamRequired("Subdirectory"))
  2631. }
  2632. if s.S3Config != nil {
  2633. if err := s.S3Config.Validate(); err != nil {
  2634. invalidParams.AddNested("S3Config", err.(request.ErrInvalidParams))
  2635. }
  2636. }
  2637. if s.Tags != nil {
  2638. for i, v := range s.Tags {
  2639. if v == nil {
  2640. continue
  2641. }
  2642. if err := v.Validate(); err != nil {
  2643. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2644. }
  2645. }
  2646. }
  2647. if invalidParams.Len() > 0 {
  2648. return invalidParams
  2649. }
  2650. return nil
  2651. }
  2652. // SetS3BucketArn sets the S3BucketArn field's value.
  2653. func (s *CreateLocationS3Input) SetS3BucketArn(v string) *CreateLocationS3Input {
  2654. s.S3BucketArn = &v
  2655. return s
  2656. }
  2657. // SetS3Config sets the S3Config field's value.
  2658. func (s *CreateLocationS3Input) SetS3Config(v *S3Config) *CreateLocationS3Input {
  2659. s.S3Config = v
  2660. return s
  2661. }
  2662. // SetSubdirectory sets the Subdirectory field's value.
  2663. func (s *CreateLocationS3Input) SetSubdirectory(v string) *CreateLocationS3Input {
  2664. s.Subdirectory = &v
  2665. return s
  2666. }
  2667. // SetTags sets the Tags field's value.
  2668. func (s *CreateLocationS3Input) SetTags(v []*TagListEntry) *CreateLocationS3Input {
  2669. s.Tags = v
  2670. return s
  2671. }
  2672. // CreateLocationS3Response
  2673. type CreateLocationS3Output struct {
  2674. _ struct{} `type:"structure"`
  2675. // The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that
  2676. // is created.
  2677. LocationArn *string `type:"string"`
  2678. }
  2679. // String returns the string representation
  2680. func (s CreateLocationS3Output) String() string {
  2681. return awsutil.Prettify(s)
  2682. }
  2683. // GoString returns the string representation
  2684. func (s CreateLocationS3Output) GoString() string {
  2685. return s.String()
  2686. }
  2687. // SetLocationArn sets the LocationArn field's value.
  2688. func (s *CreateLocationS3Output) SetLocationArn(v string) *CreateLocationS3Output {
  2689. s.LocationArn = &v
  2690. return s
  2691. }
  2692. // CreateTaskRequest
  2693. type CreateTaskInput struct {
  2694. _ struct{} `type:"structure"`
  2695. // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is
  2696. // used to monitor and log events in the task. For more information on these
  2697. // groups, see Working with Log Groups and Log Streams (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html)
  2698. // in the Amazon CloudWatch User Guide.
  2699. //
  2700. // For more information about how to useCloudWatchLogs with DataSync, see Monitoring
  2701. // Your Task (https://docs.aws.amazon.com/datasync/latest/userguide/monitor-datasync.html).
  2702. CloudWatchLogGroupArn *string `type:"string"`
  2703. // The Amazon Resource Name (ARN) of an AWS storage resource's location.
  2704. //
  2705. // DestinationLocationArn is a required field
  2706. DestinationLocationArn *string `type:"string" required:"true"`
  2707. // The name of a task. This value is a text reference that is used to identify
  2708. // the task in the console.
  2709. Name *string `min:"1" type:"string"`
  2710. // The set of configuration options that control the behavior of a single execution
  2711. // of the task that occurs when you call StartTaskExecution. You can configure
  2712. // these options to preserve metadata such as user ID (UID) and group ID (GID),
  2713. // file permissions, data integrity verification, and so on.
  2714. //
  2715. // For each individual task execution, you can override these options by specifying
  2716. // the OverrideOptions before starting a the task execution. For more information,
  2717. // see the operation.
  2718. Options *Options `type:"structure"`
  2719. // The Amazon Resource Name (ARN) of the source location for the task.
  2720. //
  2721. // SourceLocationArn is a required field
  2722. SourceLocationArn *string `type:"string" required:"true"`
  2723. // The key-value pair that represents the tag that you want to add to the resource.
  2724. // The value can be an empty string.
  2725. Tags []*TagListEntry `type:"list"`
  2726. }
  2727. // String returns the string representation
  2728. func (s CreateTaskInput) String() string {
  2729. return awsutil.Prettify(s)
  2730. }
  2731. // GoString returns the string representation
  2732. func (s CreateTaskInput) GoString() string {
  2733. return s.String()
  2734. }
  2735. // Validate inspects the fields of the type to determine if they are valid.
  2736. func (s *CreateTaskInput) Validate() error {
  2737. invalidParams := request.ErrInvalidParams{Context: "CreateTaskInput"}
  2738. if s.DestinationLocationArn == nil {
  2739. invalidParams.Add(request.NewErrParamRequired("DestinationLocationArn"))
  2740. }
  2741. if s.Name != nil && len(*s.Name) < 1 {
  2742. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2743. }
  2744. if s.SourceLocationArn == nil {
  2745. invalidParams.Add(request.NewErrParamRequired("SourceLocationArn"))
  2746. }
  2747. if s.Options != nil {
  2748. if err := s.Options.Validate(); err != nil {
  2749. invalidParams.AddNested("Options", err.(request.ErrInvalidParams))
  2750. }
  2751. }
  2752. if s.Tags != nil {
  2753. for i, v := range s.Tags {
  2754. if v == nil {
  2755. continue
  2756. }
  2757. if err := v.Validate(); err != nil {
  2758. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2759. }
  2760. }
  2761. }
  2762. if invalidParams.Len() > 0 {
  2763. return invalidParams
  2764. }
  2765. return nil
  2766. }
  2767. // SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value.
  2768. func (s *CreateTaskInput) SetCloudWatchLogGroupArn(v string) *CreateTaskInput {
  2769. s.CloudWatchLogGroupArn = &v
  2770. return s
  2771. }
  2772. // SetDestinationLocationArn sets the DestinationLocationArn field's value.
  2773. func (s *CreateTaskInput) SetDestinationLocationArn(v string) *CreateTaskInput {
  2774. s.DestinationLocationArn = &v
  2775. return s
  2776. }
  2777. // SetName sets the Name field's value.
  2778. func (s *CreateTaskInput) SetName(v string) *CreateTaskInput {
  2779. s.Name = &v
  2780. return s
  2781. }
  2782. // SetOptions sets the Options field's value.
  2783. func (s *CreateTaskInput) SetOptions(v *Options) *CreateTaskInput {
  2784. s.Options = v
  2785. return s
  2786. }
  2787. // SetSourceLocationArn sets the SourceLocationArn field's value.
  2788. func (s *CreateTaskInput) SetSourceLocationArn(v string) *CreateTaskInput {
  2789. s.SourceLocationArn = &v
  2790. return s
  2791. }
  2792. // SetTags sets the Tags field's value.
  2793. func (s *CreateTaskInput) SetTags(v []*TagListEntry) *CreateTaskInput {
  2794. s.Tags = v
  2795. return s
  2796. }
  2797. // CreateTaskResponse
  2798. type CreateTaskOutput struct {
  2799. _ struct{} `type:"structure"`
  2800. // The Amazon Resource Name (ARN) of the task.
  2801. TaskArn *string `type:"string"`
  2802. }
  2803. // String returns the string representation
  2804. func (s CreateTaskOutput) String() string {
  2805. return awsutil.Prettify(s)
  2806. }
  2807. // GoString returns the string representation
  2808. func (s CreateTaskOutput) GoString() string {
  2809. return s.String()
  2810. }
  2811. // SetTaskArn sets the TaskArn field's value.
  2812. func (s *CreateTaskOutput) SetTaskArn(v string) *CreateTaskOutput {
  2813. s.TaskArn = &v
  2814. return s
  2815. }
  2816. // DeleteAgentRequest
  2817. type DeleteAgentInput struct {
  2818. _ struct{} `type:"structure"`
  2819. // The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents
  2820. // operation to return a list of agents for your account and AWS Region.
  2821. //
  2822. // AgentArn is a required field
  2823. AgentArn *string `type:"string" required:"true"`
  2824. }
  2825. // String returns the string representation
  2826. func (s DeleteAgentInput) String() string {
  2827. return awsutil.Prettify(s)
  2828. }
  2829. // GoString returns the string representation
  2830. func (s DeleteAgentInput) GoString() string {
  2831. return s.String()
  2832. }
  2833. // Validate inspects the fields of the type to determine if they are valid.
  2834. func (s *DeleteAgentInput) Validate() error {
  2835. invalidParams := request.ErrInvalidParams{Context: "DeleteAgentInput"}
  2836. if s.AgentArn == nil {
  2837. invalidParams.Add(request.NewErrParamRequired("AgentArn"))
  2838. }
  2839. if invalidParams.Len() > 0 {
  2840. return invalidParams
  2841. }
  2842. return nil
  2843. }
  2844. // SetAgentArn sets the AgentArn field's value.
  2845. func (s *DeleteAgentInput) SetAgentArn(v string) *DeleteAgentInput {
  2846. s.AgentArn = &v
  2847. return s
  2848. }
  2849. type DeleteAgentOutput struct {
  2850. _ struct{} `type:"structure"`
  2851. }
  2852. // String returns the string representation
  2853. func (s DeleteAgentOutput) String() string {
  2854. return awsutil.Prettify(s)
  2855. }
  2856. // GoString returns the string representation
  2857. func (s DeleteAgentOutput) GoString() string {
  2858. return s.String()
  2859. }
  2860. // DeleteLocation
  2861. type DeleteLocationInput struct {
  2862. _ struct{} `type:"structure"`
  2863. // The Amazon Resource Name (ARN) of the location to delete.
  2864. //
  2865. // LocationArn is a required field
  2866. LocationArn *string `type:"string" required:"true"`
  2867. }
  2868. // String returns the string representation
  2869. func (s DeleteLocationInput) String() string {
  2870. return awsutil.Prettify(s)
  2871. }
  2872. // GoString returns the string representation
  2873. func (s DeleteLocationInput) GoString() string {
  2874. return s.String()
  2875. }
  2876. // Validate inspects the fields of the type to determine if they are valid.
  2877. func (s *DeleteLocationInput) Validate() error {
  2878. invalidParams := request.ErrInvalidParams{Context: "DeleteLocationInput"}
  2879. if s.LocationArn == nil {
  2880. invalidParams.Add(request.NewErrParamRequired("LocationArn"))
  2881. }
  2882. if invalidParams.Len() > 0 {
  2883. return invalidParams
  2884. }
  2885. return nil
  2886. }
  2887. // SetLocationArn sets the LocationArn field's value.
  2888. func (s *DeleteLocationInput) SetLocationArn(v string) *DeleteLocationInput {
  2889. s.LocationArn = &v
  2890. return s
  2891. }
  2892. type DeleteLocationOutput struct {
  2893. _ struct{} `type:"structure"`
  2894. }
  2895. // String returns the string representation
  2896. func (s DeleteLocationOutput) String() string {
  2897. return awsutil.Prettify(s)
  2898. }
  2899. // GoString returns the string representation
  2900. func (s DeleteLocationOutput) GoString() string {
  2901. return s.String()
  2902. }
  2903. // DeleteTask
  2904. type DeleteTaskInput struct {
  2905. _ struct{} `type:"structure"`
  2906. // The Amazon Resource Name (ARN) of the task to delete.
  2907. //
  2908. // TaskArn is a required field
  2909. TaskArn *string `type:"string" required:"true"`
  2910. }
  2911. // String returns the string representation
  2912. func (s DeleteTaskInput) String() string {
  2913. return awsutil.Prettify(s)
  2914. }
  2915. // GoString returns the string representation
  2916. func (s DeleteTaskInput) GoString() string {
  2917. return s.String()
  2918. }
  2919. // Validate inspects the fields of the type to determine if they are valid.
  2920. func (s *DeleteTaskInput) Validate() error {
  2921. invalidParams := request.ErrInvalidParams{Context: "DeleteTaskInput"}
  2922. if s.TaskArn == nil {
  2923. invalidParams.Add(request.NewErrParamRequired("TaskArn"))
  2924. }
  2925. if invalidParams.Len() > 0 {
  2926. return invalidParams
  2927. }
  2928. return nil
  2929. }
  2930. // SetTaskArn sets the TaskArn field's value.
  2931. func (s *DeleteTaskInput) SetTaskArn(v string) *DeleteTaskInput {
  2932. s.TaskArn = &v
  2933. return s
  2934. }
  2935. type DeleteTaskOutput struct {
  2936. _ struct{} `type:"structure"`
  2937. }
  2938. // String returns the string representation
  2939. func (s DeleteTaskOutput) String() string {
  2940. return awsutil.Prettify(s)
  2941. }
  2942. // GoString returns the string representation
  2943. func (s DeleteTaskOutput) GoString() string {
  2944. return s.String()
  2945. }
  2946. // DescribeAgent
  2947. type DescribeAgentInput struct {
  2948. _ struct{} `type:"structure"`
  2949. // The Amazon Resource Name (ARN) of the agent to describe.
  2950. //
  2951. // AgentArn is a required field
  2952. AgentArn *string `type:"string" required:"true"`
  2953. }
  2954. // String returns the string representation
  2955. func (s DescribeAgentInput) String() string {
  2956. return awsutil.Prettify(s)
  2957. }
  2958. // GoString returns the string representation
  2959. func (s DescribeAgentInput) GoString() string {
  2960. return s.String()
  2961. }
  2962. // Validate inspects the fields of the type to determine if they are valid.
  2963. func (s *DescribeAgentInput) Validate() error {
  2964. invalidParams := request.ErrInvalidParams{Context: "DescribeAgentInput"}
  2965. if s.AgentArn == nil {
  2966. invalidParams.Add(request.NewErrParamRequired("AgentArn"))
  2967. }
  2968. if invalidParams.Len() > 0 {
  2969. return invalidParams
  2970. }
  2971. return nil
  2972. }
  2973. // SetAgentArn sets the AgentArn field's value.
  2974. func (s *DescribeAgentInput) SetAgentArn(v string) *DescribeAgentInput {
  2975. s.AgentArn = &v
  2976. return s
  2977. }
  2978. // DescribeAgentResponse
  2979. type DescribeAgentOutput struct {
  2980. _ struct{} `type:"structure"`
  2981. // The Amazon Resource Name (ARN) of the agent.
  2982. AgentArn *string `type:"string"`
  2983. // The time that the agent was activated (that is, created in your account).
  2984. CreationTime *time.Time `type:"timestamp"`
  2985. // The time that the agent was last connected.
  2986. LastConnectionTime *time.Time `type:"timestamp"`
  2987. // The name of the agent.
  2988. Name *string `min:"1" type:"string"`
  2989. // The status of the agent. If the status is ONLINE, then the agent is configured
  2990. // properly and is available to use. The Running status is the normal running
  2991. // status for an agent. If the status is OFFLINE, the agent's VM is turned off
  2992. // or the agent is in an unhealthy state. When the issue that caused the unhealthy
  2993. // state is resolved, the agent returns to ONLINE status.
  2994. Status *string `type:"string" enum:"AgentStatus"`
  2995. }
  2996. // String returns the string representation
  2997. func (s DescribeAgentOutput) String() string {
  2998. return awsutil.Prettify(s)
  2999. }
  3000. // GoString returns the string representation
  3001. func (s DescribeAgentOutput) GoString() string {
  3002. return s.String()
  3003. }
  3004. // SetAgentArn sets the AgentArn field's value.
  3005. func (s *DescribeAgentOutput) SetAgentArn(v string) *DescribeAgentOutput {
  3006. s.AgentArn = &v
  3007. return s
  3008. }
  3009. // SetCreationTime sets the CreationTime field's value.
  3010. func (s *DescribeAgentOutput) SetCreationTime(v time.Time) *DescribeAgentOutput {
  3011. s.CreationTime = &v
  3012. return s
  3013. }
  3014. // SetLastConnectionTime sets the LastConnectionTime field's value.
  3015. func (s *DescribeAgentOutput) SetLastConnectionTime(v time.Time) *DescribeAgentOutput {
  3016. s.LastConnectionTime = &v
  3017. return s
  3018. }
  3019. // SetName sets the Name field's value.
  3020. func (s *DescribeAgentOutput) SetName(v string) *DescribeAgentOutput {
  3021. s.Name = &v
  3022. return s
  3023. }
  3024. // SetStatus sets the Status field's value.
  3025. func (s *DescribeAgentOutput) SetStatus(v string) *DescribeAgentOutput {
  3026. s.Status = &v
  3027. return s
  3028. }
  3029. // DescribeLocationEfsRequest
  3030. type DescribeLocationEfsInput struct {
  3031. _ struct{} `type:"structure"`
  3032. // The Amazon Resource Name (ARN) of the EFS location to describe.
  3033. //
  3034. // LocationArn is a required field
  3035. LocationArn *string `type:"string" required:"true"`
  3036. }
  3037. // String returns the string representation
  3038. func (s DescribeLocationEfsInput) String() string {
  3039. return awsutil.Prettify(s)
  3040. }
  3041. // GoString returns the string representation
  3042. func (s DescribeLocationEfsInput) GoString() string {
  3043. return s.String()
  3044. }
  3045. // Validate inspects the fields of the type to determine if they are valid.
  3046. func (s *DescribeLocationEfsInput) Validate() error {
  3047. invalidParams := request.ErrInvalidParams{Context: "DescribeLocationEfsInput"}
  3048. if s.LocationArn == nil {
  3049. invalidParams.Add(request.NewErrParamRequired("LocationArn"))
  3050. }
  3051. if invalidParams.Len() > 0 {
  3052. return invalidParams
  3053. }
  3054. return nil
  3055. }
  3056. // SetLocationArn sets the LocationArn field's value.
  3057. func (s *DescribeLocationEfsInput) SetLocationArn(v string) *DescribeLocationEfsInput {
  3058. s.LocationArn = &v
  3059. return s
  3060. }
  3061. // DescribeLocationEfsResponse
  3062. type DescribeLocationEfsOutput struct {
  3063. _ struct{} `type:"structure"`
  3064. // The time that the EFS location was created.
  3065. CreationTime *time.Time `type:"timestamp"`
  3066. // The subnet and the security group that the target Amazon EFS file system
  3067. // uses. The subnet must have at least one mount target for that file system.
  3068. // The security group that you provide needs to be able to communicate with
  3069. // the security group on the mount target in the subnet specified.
  3070. //
  3071. // The exact relationship between security group M (of the mount target) and
  3072. // security group S (which you provide for DataSync to use at this stage) is
  3073. // as follows:
  3074. //
  3075. // * Security group M (which you associate with the mount target) must allow
  3076. // inbound access for the Transmission Control Protocol (TCP) on the NFS
  3077. // port (2049) from security group S. You can enable inbound connections
  3078. // either by IP address (CIDR range) or security group.
  3079. //
  3080. // * Security group S (provided to DataSync to access EFS) should have a
  3081. // rule that enables outbound connections to the NFS port on one of the file
  3082. // system’s mount targets. You can enable outbound connections either by
  3083. // IP address (CIDR range) or security group. For information about security
  3084. // groups and mount targets, see Security Groups for Amazon EC2 Instances
  3085. // and Mount Targets (https://docs.aws.amazon.com/efs/latest/ug/security-considerations.html#network-access)
  3086. // in the Amazon EFS User Guide.
  3087. Ec2Config *Ec2Config `type:"structure"`
  3088. // The Amazon resource Name (ARN) of the EFS location that was described.
  3089. LocationArn *string `type:"string"`
  3090. // The URL of the EFS location that was described.
  3091. LocationUri *string `type:"string"`
  3092. }
  3093. // String returns the string representation
  3094. func (s DescribeLocationEfsOutput) String() string {
  3095. return awsutil.Prettify(s)
  3096. }
  3097. // GoString returns the string representation
  3098. func (s DescribeLocationEfsOutput) GoString() string {
  3099. return s.String()
  3100. }
  3101. // SetCreationTime sets the CreationTime field's value.
  3102. func (s *DescribeLocationEfsOutput) SetCreationTime(v time.Time) *DescribeLocationEfsOutput {
  3103. s.CreationTime = &v
  3104. return s
  3105. }
  3106. // SetEc2Config sets the Ec2Config field's value.
  3107. func (s *DescribeLocationEfsOutput) SetEc2Config(v *Ec2Config) *DescribeLocationEfsOutput {
  3108. s.Ec2Config = v
  3109. return s
  3110. }
  3111. // SetLocationArn sets the LocationArn field's value.
  3112. func (s *DescribeLocationEfsOutput) SetLocationArn(v string) *DescribeLocationEfsOutput {
  3113. s.LocationArn = &v
  3114. return s
  3115. }
  3116. // SetLocationUri sets the LocationUri field's value.
  3117. func (s *DescribeLocationEfsOutput) SetLocationUri(v string) *DescribeLocationEfsOutput {
  3118. s.LocationUri = &v
  3119. return s
  3120. }
  3121. // DescribeLocationNfsRequest
  3122. type DescribeLocationNfsInput struct {
  3123. _ struct{} `type:"structure"`
  3124. // The Amazon resource Name (ARN) of the NFS location to describe.
  3125. //
  3126. // LocationArn is a required field
  3127. LocationArn *string `type:"string" required:"true"`
  3128. }
  3129. // String returns the string representation
  3130. func (s DescribeLocationNfsInput) String() string {
  3131. return awsutil.Prettify(s)
  3132. }
  3133. // GoString returns the string representation
  3134. func (s DescribeLocationNfsInput) GoString() string {
  3135. return s.String()
  3136. }
  3137. // Validate inspects the fields of the type to determine if they are valid.
  3138. func (s *DescribeLocationNfsInput) Validate() error {
  3139. invalidParams := request.ErrInvalidParams{Context: "DescribeLocationNfsInput"}
  3140. if s.LocationArn == nil {
  3141. invalidParams.Add(request.NewErrParamRequired("LocationArn"))
  3142. }
  3143. if invalidParams.Len() > 0 {
  3144. return invalidParams
  3145. }
  3146. return nil
  3147. }
  3148. // SetLocationArn sets the LocationArn field's value.
  3149. func (s *DescribeLocationNfsInput) SetLocationArn(v string) *DescribeLocationNfsInput {
  3150. s.LocationArn = &v
  3151. return s
  3152. }
  3153. // DescribeLocationNfsResponse
  3154. type DescribeLocationNfsOutput struct {
  3155. _ struct{} `type:"structure"`
  3156. // The time that the NFS location was created.
  3157. CreationTime *time.Time `type:"timestamp"`
  3158. // The Amazon resource Name (ARN) of the NFS location that was described.
  3159. LocationArn *string `type:"string"`
  3160. // The URL of the source NFS location that was described.
  3161. LocationUri *string `type:"string"`
  3162. // A list of Amazon Resource Names (ARNs) of agents to use for a Network File
  3163. // System (NFS) location.
  3164. OnPremConfig *OnPremConfig `type:"structure"`
  3165. }
  3166. // String returns the string representation
  3167. func (s DescribeLocationNfsOutput) String() string {
  3168. return awsutil.Prettify(s)
  3169. }
  3170. // GoString returns the string representation
  3171. func (s DescribeLocationNfsOutput) GoString() string {
  3172. return s.String()
  3173. }
  3174. // SetCreationTime sets the CreationTime field's value.
  3175. func (s *DescribeLocationNfsOutput) SetCreationTime(v time.Time) *DescribeLocationNfsOutput {
  3176. s.CreationTime = &v
  3177. return s
  3178. }
  3179. // SetLocationArn sets the LocationArn field's value.
  3180. func (s *DescribeLocationNfsOutput) SetLocationArn(v string) *DescribeLocationNfsOutput {
  3181. s.LocationArn = &v
  3182. return s
  3183. }
  3184. // SetLocationUri sets the LocationUri field's value.
  3185. func (s *DescribeLocationNfsOutput) SetLocationUri(v string) *DescribeLocationNfsOutput {
  3186. s.LocationUri = &v
  3187. return s
  3188. }
  3189. // SetOnPremConfig sets the OnPremConfig field's value.
  3190. func (s *DescribeLocationNfsOutput) SetOnPremConfig(v *OnPremConfig) *DescribeLocationNfsOutput {
  3191. s.OnPremConfig = v
  3192. return s
  3193. }
  3194. // DescribeLocationS3Request
  3195. type DescribeLocationS3Input struct {
  3196. _ struct{} `type:"structure"`
  3197. // The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.
  3198. //
  3199. // LocationArn is a required field
  3200. LocationArn *string `type:"string" required:"true"`
  3201. }
  3202. // String returns the string representation
  3203. func (s DescribeLocationS3Input) String() string {
  3204. return awsutil.Prettify(s)
  3205. }
  3206. // GoString returns the string representation
  3207. func (s DescribeLocationS3Input) GoString() string {
  3208. return s.String()
  3209. }
  3210. // Validate inspects the fields of the type to determine if they are valid.
  3211. func (s *DescribeLocationS3Input) Validate() error {
  3212. invalidParams := request.ErrInvalidParams{Context: "DescribeLocationS3Input"}
  3213. if s.LocationArn == nil {
  3214. invalidParams.Add(request.NewErrParamRequired("LocationArn"))
  3215. }
  3216. if invalidParams.Len() > 0 {
  3217. return invalidParams
  3218. }
  3219. return nil
  3220. }
  3221. // SetLocationArn sets the LocationArn field's value.
  3222. func (s *DescribeLocationS3Input) SetLocationArn(v string) *DescribeLocationS3Input {
  3223. s.LocationArn = &v
  3224. return s
  3225. }
  3226. // DescribeLocationS3Response
  3227. type DescribeLocationS3Output struct {
  3228. _ struct{} `type:"structure"`
  3229. // The time that the Amazon S3 bucket location was created.
  3230. CreationTime *time.Time `type:"timestamp"`
  3231. // The Amazon Resource Name (ARN) of the Amazon S3 bucket location.
  3232. LocationArn *string `type:"string"`
  3233. // The URL of the Amazon S3 location that was described.
  3234. LocationUri *string `type:"string"`
  3235. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  3236. // (IAM) role that is used to access an Amazon S3 bucket. For detailed information
  3237. // about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli)
  3238. // in the AWS DataSync User Guide.
  3239. S3Config *S3Config `type:"structure"`
  3240. }
  3241. // String returns the string representation
  3242. func (s DescribeLocationS3Output) String() string {
  3243. return awsutil.Prettify(s)
  3244. }
  3245. // GoString returns the string representation
  3246. func (s DescribeLocationS3Output) GoString() string {
  3247. return s.String()
  3248. }
  3249. // SetCreationTime sets the CreationTime field's value.
  3250. func (s *DescribeLocationS3Output) SetCreationTime(v time.Time) *DescribeLocationS3Output {
  3251. s.CreationTime = &v
  3252. return s
  3253. }
  3254. // SetLocationArn sets the LocationArn field's value.
  3255. func (s *DescribeLocationS3Output) SetLocationArn(v string) *DescribeLocationS3Output {
  3256. s.LocationArn = &v
  3257. return s
  3258. }
  3259. // SetLocationUri sets the LocationUri field's value.
  3260. func (s *DescribeLocationS3Output) SetLocationUri(v string) *DescribeLocationS3Output {
  3261. s.LocationUri = &v
  3262. return s
  3263. }
  3264. // SetS3Config sets the S3Config field's value.
  3265. func (s *DescribeLocationS3Output) SetS3Config(v *S3Config) *DescribeLocationS3Output {
  3266. s.S3Config = v
  3267. return s
  3268. }
  3269. // DescribeTaskExecutionRequest
  3270. type DescribeTaskExecutionInput struct {
  3271. _ struct{} `type:"structure"`
  3272. // The Amazon Resource Name (ARN) of the task that is being executed.
  3273. //
  3274. // TaskExecutionArn is a required field
  3275. TaskExecutionArn *string `type:"string" required:"true"`
  3276. }
  3277. // String returns the string representation
  3278. func (s DescribeTaskExecutionInput) String() string {
  3279. return awsutil.Prettify(s)
  3280. }
  3281. // GoString returns the string representation
  3282. func (s DescribeTaskExecutionInput) GoString() string {
  3283. return s.String()
  3284. }
  3285. // Validate inspects the fields of the type to determine if they are valid.
  3286. func (s *DescribeTaskExecutionInput) Validate() error {
  3287. invalidParams := request.ErrInvalidParams{Context: "DescribeTaskExecutionInput"}
  3288. if s.TaskExecutionArn == nil {
  3289. invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn"))
  3290. }
  3291. if invalidParams.Len() > 0 {
  3292. return invalidParams
  3293. }
  3294. return nil
  3295. }
  3296. // SetTaskExecutionArn sets the TaskExecutionArn field's value.
  3297. func (s *DescribeTaskExecutionInput) SetTaskExecutionArn(v string) *DescribeTaskExecutionInput {
  3298. s.TaskExecutionArn = &v
  3299. return s
  3300. }
  3301. // DescribeTaskExecutionResponse
  3302. type DescribeTaskExecutionOutput struct {
  3303. _ struct{} `type:"structure"`
  3304. // The physical number of bytes transferred over the network.
  3305. BytesTransferred *int64 `type:"long"`
  3306. // The number of logical bytes written to the destination AWS storage resource.
  3307. BytesWritten *int64 `type:"long"`
  3308. // The estimated physical number of bytes that is to be transferred over the
  3309. // network.
  3310. EstimatedBytesToTransfer *int64 `type:"long"`
  3311. // The expected number of files that is to be transferred over the network.
  3312. // This value is calculated during the PREPARING phase, before the TRANSFERRING
  3313. // phase. This value is the expected number of files to be transferred. It's
  3314. // calculated based on comparing the content of the source and destination locations
  3315. // and finding the delta that needs to be transferred.
  3316. EstimatedFilesToTransfer *int64 `type:"long"`
  3317. // The actual number of files that was transferred over the network. This value
  3318. // is calculated and updated on an ongoing basis during the TRANSFERRING phase.
  3319. // It's updated periodically when each file is read from the source and sent
  3320. // over the network.
  3321. //
  3322. // If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer.
  3323. // This value can also be greater than EstimatedFilesTransferred in some cases.
  3324. // This element is implementation-specific for some location types, so don't
  3325. // use it as an indicator for a correct file number or to monitor your task
  3326. // execution.
  3327. FilesTransferred *int64 `type:"long"`
  3328. // Represents the options that are available to control the behavior of a StartTaskExecution
  3329. // operation. Behavior includes preserving metadata such as user ID (UID), group
  3330. // ID (GID), and file permissions, and also overwriting files in the destination,
  3331. // data integrity verification, and so on.
  3332. //
  3333. // A task has a set of default options associated with it. If you don't specify
  3334. // an option in StartTaskExecution, the default value is used. You can override
  3335. // the defaults options on each task execution by specifying an overriding Options
  3336. // value to StartTaskExecution.
  3337. Options *Options `type:"structure"`
  3338. // The result of the task execution.
  3339. Result *TaskExecutionResultDetail `type:"structure"`
  3340. // The time that the task execution was started.
  3341. StartTime *time.Time `type:"timestamp"`
  3342. // The status of the task. For detailed information about sync statuses, see
  3343. // Understanding Sync Task Statuses (https://docs.aws.amazon.com/sync-service/latest/userguide/understand-sync-task-statuses.html).
  3344. Status *string `type:"string" enum:"TaskExecutionStatus"`
  3345. // The Amazon Resource Name (ARN) of the task execution that was described.
  3346. // TaskExecutionArn is hierarchical and includes TaskArn for the task that was
  3347. // executed.
  3348. //
  3349. // For example, a TaskExecution value with the ARN arn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b
  3350. // executed the task with the ARN arn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2.
  3351. TaskExecutionArn *string `type:"string"`
  3352. }
  3353. // String returns the string representation
  3354. func (s DescribeTaskExecutionOutput) String() string {
  3355. return awsutil.Prettify(s)
  3356. }
  3357. // GoString returns the string representation
  3358. func (s DescribeTaskExecutionOutput) GoString() string {
  3359. return s.String()
  3360. }
  3361. // SetBytesTransferred sets the BytesTransferred field's value.
  3362. func (s *DescribeTaskExecutionOutput) SetBytesTransferred(v int64) *DescribeTaskExecutionOutput {
  3363. s.BytesTransferred = &v
  3364. return s
  3365. }
  3366. // SetBytesWritten sets the BytesWritten field's value.
  3367. func (s *DescribeTaskExecutionOutput) SetBytesWritten(v int64) *DescribeTaskExecutionOutput {
  3368. s.BytesWritten = &v
  3369. return s
  3370. }
  3371. // SetEstimatedBytesToTransfer sets the EstimatedBytesToTransfer field's value.
  3372. func (s *DescribeTaskExecutionOutput) SetEstimatedBytesToTransfer(v int64) *DescribeTaskExecutionOutput {
  3373. s.EstimatedBytesToTransfer = &v
  3374. return s
  3375. }
  3376. // SetEstimatedFilesToTransfer sets the EstimatedFilesToTransfer field's value.
  3377. func (s *DescribeTaskExecutionOutput) SetEstimatedFilesToTransfer(v int64) *DescribeTaskExecutionOutput {
  3378. s.EstimatedFilesToTransfer = &v
  3379. return s
  3380. }
  3381. // SetFilesTransferred sets the FilesTransferred field's value.
  3382. func (s *DescribeTaskExecutionOutput) SetFilesTransferred(v int64) *DescribeTaskExecutionOutput {
  3383. s.FilesTransferred = &v
  3384. return s
  3385. }
  3386. // SetOptions sets the Options field's value.
  3387. func (s *DescribeTaskExecutionOutput) SetOptions(v *Options) *DescribeTaskExecutionOutput {
  3388. s.Options = v
  3389. return s
  3390. }
  3391. // SetResult sets the Result field's value.
  3392. func (s *DescribeTaskExecutionOutput) SetResult(v *TaskExecutionResultDetail) *DescribeTaskExecutionOutput {
  3393. s.Result = v
  3394. return s
  3395. }
  3396. // SetStartTime sets the StartTime field's value.
  3397. func (s *DescribeTaskExecutionOutput) SetStartTime(v time.Time) *DescribeTaskExecutionOutput {
  3398. s.StartTime = &v
  3399. return s
  3400. }
  3401. // SetStatus sets the Status field's value.
  3402. func (s *DescribeTaskExecutionOutput) SetStatus(v string) *DescribeTaskExecutionOutput {
  3403. s.Status = &v
  3404. return s
  3405. }
  3406. // SetTaskExecutionArn sets the TaskExecutionArn field's value.
  3407. func (s *DescribeTaskExecutionOutput) SetTaskExecutionArn(v string) *DescribeTaskExecutionOutput {
  3408. s.TaskExecutionArn = &v
  3409. return s
  3410. }
  3411. // DescribeTaskRequest
  3412. type DescribeTaskInput struct {
  3413. _ struct{} `type:"structure"`
  3414. // The Amazon Resource Name (ARN) of the task to describe.
  3415. //
  3416. // TaskArn is a required field
  3417. TaskArn *string `type:"string" required:"true"`
  3418. }
  3419. // String returns the string representation
  3420. func (s DescribeTaskInput) String() string {
  3421. return awsutil.Prettify(s)
  3422. }
  3423. // GoString returns the string representation
  3424. func (s DescribeTaskInput) GoString() string {
  3425. return s.String()
  3426. }
  3427. // Validate inspects the fields of the type to determine if they are valid.
  3428. func (s *DescribeTaskInput) Validate() error {
  3429. invalidParams := request.ErrInvalidParams{Context: "DescribeTaskInput"}
  3430. if s.TaskArn == nil {
  3431. invalidParams.Add(request.NewErrParamRequired("TaskArn"))
  3432. }
  3433. if invalidParams.Len() > 0 {
  3434. return invalidParams
  3435. }
  3436. return nil
  3437. }
  3438. // SetTaskArn sets the TaskArn field's value.
  3439. func (s *DescribeTaskInput) SetTaskArn(v string) *DescribeTaskInput {
  3440. s.TaskArn = &v
  3441. return s
  3442. }
  3443. // DescribeTaskResponse
  3444. type DescribeTaskOutput struct {
  3445. _ struct{} `type:"structure"`
  3446. // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was
  3447. // used to monitor and log events in the task. For more information on these
  3448. // groups, see Working with Log Groups and Log Streams (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html)
  3449. // in the Amazon CloudWatch User Guide.
  3450. CloudWatchLogGroupArn *string `type:"string"`
  3451. // The time that the task was created.
  3452. CreationTime *time.Time `type:"timestamp"`
  3453. // The Amazon Resource Name (ARN) of the task execution that is syncing files.
  3454. CurrentTaskExecutionArn *string `type:"string"`
  3455. // The Amazon Resource Name (ARN) of the AWS storage resource's location.
  3456. DestinationLocationArn *string `type:"string"`
  3457. // Errors that AWS DataSync encountered during execution of the task. You can
  3458. // use this error code to help troubleshoot issues.
  3459. ErrorCode *string `type:"string"`
  3460. // Detailed description of an error that was encountered during the task execution.
  3461. // You can use this information to help troubleshoot issues.
  3462. ErrorDetail *string `type:"string"`
  3463. // The name of the task that was described.
  3464. Name *string `min:"1" type:"string"`
  3465. // The set of configuration options that control the behavior of a single execution
  3466. // of the task that occurs when you call StartTaskExecution. You can configure
  3467. // these options to preserve metadata such as user ID (UID) and group (GID),
  3468. // file permissions, data integrity verification, and so on.
  3469. //
  3470. // For each individual task execution, you can override these options by specifying
  3471. // the overriding OverrideOptions value to operation.
  3472. Options *Options `type:"structure"`
  3473. // The Amazon Resource Name (ARN) of the source file system's location.
  3474. SourceLocationArn *string `type:"string"`
  3475. // The status of the task that was described. For detailed information about
  3476. // sync statuses, see Understanding Sync Task Statuses (https://docs.aws.amazon.com/sync-service/latest/userguide/understand-sync-task-statuses.html).
  3477. Status *string `type:"string" enum:"TaskStatus"`
  3478. // The Amazon Resource Name (ARN) of the task that was described.
  3479. TaskArn *string `type:"string"`
  3480. }
  3481. // String returns the string representation
  3482. func (s DescribeTaskOutput) String() string {
  3483. return awsutil.Prettify(s)
  3484. }
  3485. // GoString returns the string representation
  3486. func (s DescribeTaskOutput) GoString() string {
  3487. return s.String()
  3488. }
  3489. // SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value.
  3490. func (s *DescribeTaskOutput) SetCloudWatchLogGroupArn(v string) *DescribeTaskOutput {
  3491. s.CloudWatchLogGroupArn = &v
  3492. return s
  3493. }
  3494. // SetCreationTime sets the CreationTime field's value.
  3495. func (s *DescribeTaskOutput) SetCreationTime(v time.Time) *DescribeTaskOutput {
  3496. s.CreationTime = &v
  3497. return s
  3498. }
  3499. // SetCurrentTaskExecutionArn sets the CurrentTaskExecutionArn field's value.
  3500. func (s *DescribeTaskOutput) SetCurrentTaskExecutionArn(v string) *DescribeTaskOutput {
  3501. s.CurrentTaskExecutionArn = &v
  3502. return s
  3503. }
  3504. // SetDestinationLocationArn sets the DestinationLocationArn field's value.
  3505. func (s *DescribeTaskOutput) SetDestinationLocationArn(v string) *DescribeTaskOutput {
  3506. s.DestinationLocationArn = &v
  3507. return s
  3508. }
  3509. // SetErrorCode sets the ErrorCode field's value.
  3510. func (s *DescribeTaskOutput) SetErrorCode(v string) *DescribeTaskOutput {
  3511. s.ErrorCode = &v
  3512. return s
  3513. }
  3514. // SetErrorDetail sets the ErrorDetail field's value.
  3515. func (s *DescribeTaskOutput) SetErrorDetail(v string) *DescribeTaskOutput {
  3516. s.ErrorDetail = &v
  3517. return s
  3518. }
  3519. // SetName sets the Name field's value.
  3520. func (s *DescribeTaskOutput) SetName(v string) *DescribeTaskOutput {
  3521. s.Name = &v
  3522. return s
  3523. }
  3524. // SetOptions sets the Options field's value.
  3525. func (s *DescribeTaskOutput) SetOptions(v *Options) *DescribeTaskOutput {
  3526. s.Options = v
  3527. return s
  3528. }
  3529. // SetSourceLocationArn sets the SourceLocationArn field's value.
  3530. func (s *DescribeTaskOutput) SetSourceLocationArn(v string) *DescribeTaskOutput {
  3531. s.SourceLocationArn = &v
  3532. return s
  3533. }
  3534. // SetStatus sets the Status field's value.
  3535. func (s *DescribeTaskOutput) SetStatus(v string) *DescribeTaskOutput {
  3536. s.Status = &v
  3537. return s
  3538. }
  3539. // SetTaskArn sets the TaskArn field's value.
  3540. func (s *DescribeTaskOutput) SetTaskArn(v string) *DescribeTaskOutput {
  3541. s.TaskArn = &v
  3542. return s
  3543. }
  3544. // The subnet and the security group that the target Amazon EFS file system
  3545. // uses. The subnet must have at least one mount target for that file system.
  3546. // The security group that you provide needs to be able to communicate with
  3547. // the security group on the mount target in the subnet specified.
  3548. //
  3549. // The exact relationship between security group M (of the mount target) and
  3550. // security group S (which you provide for DataSync to use at this stage) is
  3551. // as follows:
  3552. //
  3553. // * Security group M (which you associate with the mount target) must allow
  3554. // inbound access for the Transmission Control Protocol (TCP) on the NFS
  3555. // port (2049) from security group S. You can enable inbound connections
  3556. // either by IP address (CIDR range) or security group.
  3557. //
  3558. // * Security group S (provided to DataSync to access EFS) should have a
  3559. // rule that enables outbound connections to the NFS port on one of the file
  3560. // system’s mount targets. You can enable outbound connections either by
  3561. // IP address (CIDR range) or security group. For information about security
  3562. // groups and mount targets, see Security Groups for Amazon EC2 Instances
  3563. // and Mount Targets (https://docs.aws.amazon.com/efs/latest/ug/security-considerations.html#network-access)
  3564. // in the Amazon EFS User Guide.
  3565. type Ec2Config struct {
  3566. _ struct{} `type:"structure"`
  3567. // The Amazon Resource Names (ARNs) of the security groups that are configured
  3568. // for the Amazon EC2 resource.
  3569. //
  3570. // SecurityGroupArns is a required field
  3571. SecurityGroupArns []*string `min:"1" type:"list" required:"true"`
  3572. // The ARN of the subnet that the Amazon EC2 resource belongs in.
  3573. //
  3574. // SubnetArn is a required field
  3575. SubnetArn *string `type:"string" required:"true"`
  3576. }
  3577. // String returns the string representation
  3578. func (s Ec2Config) String() string {
  3579. return awsutil.Prettify(s)
  3580. }
  3581. // GoString returns the string representation
  3582. func (s Ec2Config) GoString() string {
  3583. return s.String()
  3584. }
  3585. // Validate inspects the fields of the type to determine if they are valid.
  3586. func (s *Ec2Config) Validate() error {
  3587. invalidParams := request.ErrInvalidParams{Context: "Ec2Config"}
  3588. if s.SecurityGroupArns == nil {
  3589. invalidParams.Add(request.NewErrParamRequired("SecurityGroupArns"))
  3590. }
  3591. if s.SecurityGroupArns != nil && len(s.SecurityGroupArns) < 1 {
  3592. invalidParams.Add(request.NewErrParamMinLen("SecurityGroupArns", 1))
  3593. }
  3594. if s.SubnetArn == nil {
  3595. invalidParams.Add(request.NewErrParamRequired("SubnetArn"))
  3596. }
  3597. if invalidParams.Len() > 0 {
  3598. return invalidParams
  3599. }
  3600. return nil
  3601. }
  3602. // SetSecurityGroupArns sets the SecurityGroupArns field's value.
  3603. func (s *Ec2Config) SetSecurityGroupArns(v []*string) *Ec2Config {
  3604. s.SecurityGroupArns = v
  3605. return s
  3606. }
  3607. // SetSubnetArn sets the SubnetArn field's value.
  3608. func (s *Ec2Config) SetSubnetArn(v string) *Ec2Config {
  3609. s.SubnetArn = &v
  3610. return s
  3611. }
  3612. // ListAgentsRequest
  3613. type ListAgentsInput struct {
  3614. _ struct{} `type:"structure"`
  3615. // The maximum number of agents to list.
  3616. MaxResults *int64 `type:"integer"`
  3617. // An opaque string that indicates the position at which to begin the next list
  3618. // of agents.
  3619. NextToken *string `type:"string"`
  3620. }
  3621. // String returns the string representation
  3622. func (s ListAgentsInput) String() string {
  3623. return awsutil.Prettify(s)
  3624. }
  3625. // GoString returns the string representation
  3626. func (s ListAgentsInput) GoString() string {
  3627. return s.String()
  3628. }
  3629. // SetMaxResults sets the MaxResults field's value.
  3630. func (s *ListAgentsInput) SetMaxResults(v int64) *ListAgentsInput {
  3631. s.MaxResults = &v
  3632. return s
  3633. }
  3634. // SetNextToken sets the NextToken field's value.
  3635. func (s *ListAgentsInput) SetNextToken(v string) *ListAgentsInput {
  3636. s.NextToken = &v
  3637. return s
  3638. }
  3639. // ListAgentsResponse
  3640. type ListAgentsOutput struct {
  3641. _ struct{} `type:"structure"`
  3642. // A list of agents in your account.
  3643. Agents []*AgentListEntry `type:"list"`
  3644. // An opaque string that indicates the position at which to begin returning
  3645. // the next list of agents.
  3646. NextToken *string `type:"string"`
  3647. }
  3648. // String returns the string representation
  3649. func (s ListAgentsOutput) String() string {
  3650. return awsutil.Prettify(s)
  3651. }
  3652. // GoString returns the string representation
  3653. func (s ListAgentsOutput) GoString() string {
  3654. return s.String()
  3655. }
  3656. // SetAgents sets the Agents field's value.
  3657. func (s *ListAgentsOutput) SetAgents(v []*AgentListEntry) *ListAgentsOutput {
  3658. s.Agents = v
  3659. return s
  3660. }
  3661. // SetNextToken sets the NextToken field's value.
  3662. func (s *ListAgentsOutput) SetNextToken(v string) *ListAgentsOutput {
  3663. s.NextToken = &v
  3664. return s
  3665. }
  3666. // ListLocationsRequest
  3667. type ListLocationsInput struct {
  3668. _ struct{} `type:"structure"`
  3669. // The maximum number of locations to return.
  3670. MaxResults *int64 `type:"integer"`
  3671. // An opaque string that indicates the position at which to begin the next list
  3672. // of locations.
  3673. NextToken *string `type:"string"`
  3674. }
  3675. // String returns the string representation
  3676. func (s ListLocationsInput) String() string {
  3677. return awsutil.Prettify(s)
  3678. }
  3679. // GoString returns the string representation
  3680. func (s ListLocationsInput) GoString() string {
  3681. return s.String()
  3682. }
  3683. // SetMaxResults sets the MaxResults field's value.
  3684. func (s *ListLocationsInput) SetMaxResults(v int64) *ListLocationsInput {
  3685. s.MaxResults = &v
  3686. return s
  3687. }
  3688. // SetNextToken sets the NextToken field's value.
  3689. func (s *ListLocationsInput) SetNextToken(v string) *ListLocationsInput {
  3690. s.NextToken = &v
  3691. return s
  3692. }
  3693. // ListLocationsResponse
  3694. type ListLocationsOutput struct {
  3695. _ struct{} `type:"structure"`
  3696. // An array that contains a list of locations.
  3697. Locations []*LocationListEntry `type:"list"`
  3698. // An opaque string that indicates the position at which to begin returning
  3699. // the next list of locations.
  3700. NextToken *string `type:"string"`
  3701. }
  3702. // String returns the string representation
  3703. func (s ListLocationsOutput) String() string {
  3704. return awsutil.Prettify(s)
  3705. }
  3706. // GoString returns the string representation
  3707. func (s ListLocationsOutput) GoString() string {
  3708. return s.String()
  3709. }
  3710. // SetLocations sets the Locations field's value.
  3711. func (s *ListLocationsOutput) SetLocations(v []*LocationListEntry) *ListLocationsOutput {
  3712. s.Locations = v
  3713. return s
  3714. }
  3715. // SetNextToken sets the NextToken field's value.
  3716. func (s *ListLocationsOutput) SetNextToken(v string) *ListLocationsOutput {
  3717. s.NextToken = &v
  3718. return s
  3719. }
  3720. // ListTagsForResourceRequest
  3721. type ListTagsForResourceInput struct {
  3722. _ struct{} `type:"structure"`
  3723. // The maximum number of locations to return.
  3724. MaxResults *int64 `type:"integer"`
  3725. // An opaque string that indicates the position at which to begin the next list
  3726. // of locations.
  3727. NextToken *string `type:"string"`
  3728. // The Amazon Resource Name (ARN) of the resource whose tags to list.
  3729. //
  3730. // ResourceArn is a required field
  3731. ResourceArn *string `type:"string" required:"true"`
  3732. }
  3733. // String returns the string representation
  3734. func (s ListTagsForResourceInput) String() string {
  3735. return awsutil.Prettify(s)
  3736. }
  3737. // GoString returns the string representation
  3738. func (s ListTagsForResourceInput) GoString() string {
  3739. return s.String()
  3740. }
  3741. // Validate inspects the fields of the type to determine if they are valid.
  3742. func (s *ListTagsForResourceInput) Validate() error {
  3743. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  3744. if s.ResourceArn == nil {
  3745. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  3746. }
  3747. if invalidParams.Len() > 0 {
  3748. return invalidParams
  3749. }
  3750. return nil
  3751. }
  3752. // SetMaxResults sets the MaxResults field's value.
  3753. func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput {
  3754. s.MaxResults = &v
  3755. return s
  3756. }
  3757. // SetNextToken sets the NextToken field's value.
  3758. func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
  3759. s.NextToken = &v
  3760. return s
  3761. }
  3762. // SetResourceArn sets the ResourceArn field's value.
  3763. func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
  3764. s.ResourceArn = &v
  3765. return s
  3766. }
  3767. // ListTagsForResourceResponse
  3768. type ListTagsForResourceOutput struct {
  3769. _ struct{} `type:"structure"`
  3770. // An opaque string that indicates the position at which to begin returning
  3771. // the next list of resource tags.
  3772. NextToken *string `type:"string"`
  3773. // Array of resource tags.
  3774. Tags []*TagListEntry `type:"list"`
  3775. }
  3776. // String returns the string representation
  3777. func (s ListTagsForResourceOutput) String() string {
  3778. return awsutil.Prettify(s)
  3779. }
  3780. // GoString returns the string representation
  3781. func (s ListTagsForResourceOutput) GoString() string {
  3782. return s.String()
  3783. }
  3784. // SetNextToken sets the NextToken field's value.
  3785. func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
  3786. s.NextToken = &v
  3787. return s
  3788. }
  3789. // SetTags sets the Tags field's value.
  3790. func (s *ListTagsForResourceOutput) SetTags(v []*TagListEntry) *ListTagsForResourceOutput {
  3791. s.Tags = v
  3792. return s
  3793. }
  3794. // ListTaskExecutions
  3795. type ListTaskExecutionsInput struct {
  3796. _ struct{} `type:"structure"`
  3797. // The maximum number of executed tasks to list.
  3798. MaxResults *int64 `type:"integer"`
  3799. // An opaque string that indicates the position at which to begin the next list
  3800. // of the executed tasks.
  3801. NextToken *string `type:"string"`
  3802. // The Amazon Resource Name (ARN) of the task whose tasks you want to list.
  3803. TaskArn *string `type:"string"`
  3804. }
  3805. // String returns the string representation
  3806. func (s ListTaskExecutionsInput) String() string {
  3807. return awsutil.Prettify(s)
  3808. }
  3809. // GoString returns the string representation
  3810. func (s ListTaskExecutionsInput) GoString() string {
  3811. return s.String()
  3812. }
  3813. // SetMaxResults sets the MaxResults field's value.
  3814. func (s *ListTaskExecutionsInput) SetMaxResults(v int64) *ListTaskExecutionsInput {
  3815. s.MaxResults = &v
  3816. return s
  3817. }
  3818. // SetNextToken sets the NextToken field's value.
  3819. func (s *ListTaskExecutionsInput) SetNextToken(v string) *ListTaskExecutionsInput {
  3820. s.NextToken = &v
  3821. return s
  3822. }
  3823. // SetTaskArn sets the TaskArn field's value.
  3824. func (s *ListTaskExecutionsInput) SetTaskArn(v string) *ListTaskExecutionsInput {
  3825. s.TaskArn = &v
  3826. return s
  3827. }
  3828. // ListTaskExecutionsResponse
  3829. type ListTaskExecutionsOutput struct {
  3830. _ struct{} `type:"structure"`
  3831. // An opaque string that indicates the position at which to begin returning
  3832. // the next list of executed tasks.
  3833. NextToken *string `type:"string"`
  3834. // A list of executed tasks.
  3835. TaskExecutions []*TaskExecutionListEntry `type:"list"`
  3836. }
  3837. // String returns the string representation
  3838. func (s ListTaskExecutionsOutput) String() string {
  3839. return awsutil.Prettify(s)
  3840. }
  3841. // GoString returns the string representation
  3842. func (s ListTaskExecutionsOutput) GoString() string {
  3843. return s.String()
  3844. }
  3845. // SetNextToken sets the NextToken field's value.
  3846. func (s *ListTaskExecutionsOutput) SetNextToken(v string) *ListTaskExecutionsOutput {
  3847. s.NextToken = &v
  3848. return s
  3849. }
  3850. // SetTaskExecutions sets the TaskExecutions field's value.
  3851. func (s *ListTaskExecutionsOutput) SetTaskExecutions(v []*TaskExecutionListEntry) *ListTaskExecutionsOutput {
  3852. s.TaskExecutions = v
  3853. return s
  3854. }
  3855. // ListTasksRequest
  3856. type ListTasksInput struct {
  3857. _ struct{} `type:"structure"`
  3858. // The maximum number of tasks to return.
  3859. MaxResults *int64 `type:"integer"`
  3860. // An opaque string that indicates the position at which to begin the next list
  3861. // of tasks.
  3862. NextToken *string `type:"string"`
  3863. }
  3864. // String returns the string representation
  3865. func (s ListTasksInput) String() string {
  3866. return awsutil.Prettify(s)
  3867. }
  3868. // GoString returns the string representation
  3869. func (s ListTasksInput) GoString() string {
  3870. return s.String()
  3871. }
  3872. // SetMaxResults sets the MaxResults field's value.
  3873. func (s *ListTasksInput) SetMaxResults(v int64) *ListTasksInput {
  3874. s.MaxResults = &v
  3875. return s
  3876. }
  3877. // SetNextToken sets the NextToken field's value.
  3878. func (s *ListTasksInput) SetNextToken(v string) *ListTasksInput {
  3879. s.NextToken = &v
  3880. return s
  3881. }
  3882. // ListTasksResponse
  3883. type ListTasksOutput struct {
  3884. _ struct{} `type:"structure"`
  3885. // An opaque string that indicates the position at which to begin returning
  3886. // the next list of tasks.
  3887. NextToken *string `type:"string"`
  3888. // A list of all the tasks that are returned.
  3889. Tasks []*TaskListEntry `type:"list"`
  3890. }
  3891. // String returns the string representation
  3892. func (s ListTasksOutput) String() string {
  3893. return awsutil.Prettify(s)
  3894. }
  3895. // GoString returns the string representation
  3896. func (s ListTasksOutput) GoString() string {
  3897. return s.String()
  3898. }
  3899. // SetNextToken sets the NextToken field's value.
  3900. func (s *ListTasksOutput) SetNextToken(v string) *ListTasksOutput {
  3901. s.NextToken = &v
  3902. return s
  3903. }
  3904. // SetTasks sets the Tasks field's value.
  3905. func (s *ListTasksOutput) SetTasks(v []*TaskListEntry) *ListTasksOutput {
  3906. s.Tasks = v
  3907. return s
  3908. }
  3909. // Represents a single entry in a list of locations. LocationListEntry returns
  3910. // an array that contains a list of locations when the ListLocations operation
  3911. // is called.
  3912. type LocationListEntry struct {
  3913. _ struct{} `type:"structure"`
  3914. // The Amazon Resource Name (ARN) of the location. For Network File System (NFS)
  3915. // or Amazon EFS, the location is the export path. For Amazon S3, the location
  3916. // is the prefix path that you want to mount and use as the root of the location.
  3917. LocationArn *string `type:"string"`
  3918. // Represents a list of URLs of a location. LocationUri returns an array that
  3919. // contains a list of locations when the ListLocations operation is called.
  3920. //
  3921. // Format: TYPE://GLOBAL_ID/SUBDIR.
  3922. //
  3923. // TYPE designates the type of location. Valid values: NFS | EFS | S3.
  3924. //
  3925. // GLOBAL_ID is the globally unique identifier of the resource that backs the
  3926. // location. An example for EFS is us-east-2.fs-abcd1234. An example for Amazon
  3927. // S3 is the bucket name, such as myBucket. An example for NFS is a valid IPv4
  3928. // address or a host name compliant with Domain Name Service (DNS).
  3929. //
  3930. // SUBDIR is a valid file system path, delimited by forward slashes as is the
  3931. // *nix convention. For NFS and Amazon EFS, it's the export path to mount the
  3932. // location. For Amazon S3, it's the prefix path that you mount to and treat
  3933. // as the root of the location.
  3934. LocationUri *string `type:"string"`
  3935. }
  3936. // String returns the string representation
  3937. func (s LocationListEntry) String() string {
  3938. return awsutil.Prettify(s)
  3939. }
  3940. // GoString returns the string representation
  3941. func (s LocationListEntry) GoString() string {
  3942. return s.String()
  3943. }
  3944. // SetLocationArn sets the LocationArn field's value.
  3945. func (s *LocationListEntry) SetLocationArn(v string) *LocationListEntry {
  3946. s.LocationArn = &v
  3947. return s
  3948. }
  3949. // SetLocationUri sets the LocationUri field's value.
  3950. func (s *LocationListEntry) SetLocationUri(v string) *LocationListEntry {
  3951. s.LocationUri = &v
  3952. return s
  3953. }
  3954. // A list of Amazon Resource Names (ARNs) of agents to use for a Network File
  3955. // System (NFS) location.
  3956. type OnPremConfig struct {
  3957. _ struct{} `type:"structure"`
  3958. // ARNs)of the agents to use for an NFS location.
  3959. //
  3960. // AgentArns is a required field
  3961. AgentArns []*string `min:"1" type:"list" required:"true"`
  3962. }
  3963. // String returns the string representation
  3964. func (s OnPremConfig) String() string {
  3965. return awsutil.Prettify(s)
  3966. }
  3967. // GoString returns the string representation
  3968. func (s OnPremConfig) GoString() string {
  3969. return s.String()
  3970. }
  3971. // Validate inspects the fields of the type to determine if they are valid.
  3972. func (s *OnPremConfig) Validate() error {
  3973. invalidParams := request.ErrInvalidParams{Context: "OnPremConfig"}
  3974. if s.AgentArns == nil {
  3975. invalidParams.Add(request.NewErrParamRequired("AgentArns"))
  3976. }
  3977. if s.AgentArns != nil && len(s.AgentArns) < 1 {
  3978. invalidParams.Add(request.NewErrParamMinLen("AgentArns", 1))
  3979. }
  3980. if invalidParams.Len() > 0 {
  3981. return invalidParams
  3982. }
  3983. return nil
  3984. }
  3985. // SetAgentArns sets the AgentArns field's value.
  3986. func (s *OnPremConfig) SetAgentArns(v []*string) *OnPremConfig {
  3987. s.AgentArns = v
  3988. return s
  3989. }
  3990. // Represents the options that are available to control the behavior of a StartTaskExecution
  3991. // operation. Behavior includes preserving metadata such as user ID (UID), group
  3992. // ID (GID), and file permissions, and also overwriting files in the destination,
  3993. // data integrity verification, and so on.
  3994. //
  3995. // A task has a set of default options associated with it. If you don't specify
  3996. // an option in StartTaskExecution, the default value is used. You can override
  3997. // the defaults options on each task execution by specifying an overriding Options
  3998. // value to StartTaskExecution.
  3999. type Options struct {
  4000. _ struct{} `type:"structure"`
  4001. // A file metadata value that shows the last time a file was accessed (that
  4002. // is, when the file was read or written to). If you set Atime to BEST_EFFORT,
  4003. // DataSync attempts to preserve the original Atime attribute on all source
  4004. // files (that is, the version before the PREPARING phase). However, Atime's
  4005. // behavior is not fully standard across platforms, so AWS DataSync can only
  4006. // do this on a best-effort basis.
  4007. //
  4008. // Default value: BEST_EFFORT.
  4009. //
  4010. // BEST_EFFORT: Attempt to preserve the per-file Atime value (recommended).
  4011. //
  4012. // NONE: Ignore Atime.
  4013. //
  4014. // If Atime is set to BEST_EFFORT, Mtime must be set to PRESERVE.
  4015. //
  4016. // If Atime is set to NONE, Mtime must also be NONE.
  4017. Atime *string `type:"string" enum:"Atime"`
  4018. // A value that limits the bandwidth used by AWS DataSync. For example, if you
  4019. // want AWS DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024).
  4020. BytesPerSecond *int64 `type:"long"`
  4021. // The group ID (GID) of the file's owners.
  4022. //
  4023. // Default value: INT_VALUE. This preserves the integer value of the ID.
  4024. //
  4025. // INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).
  4026. //
  4027. // NONE: Ignore UID and GID.
  4028. Gid *string `type:"string" enum:"Gid"`
  4029. // A value that indicates the last time that a file was modified (that is, a
  4030. // file was written to) before the PREPARING phase.
  4031. //
  4032. // Default value: PRESERVE.
  4033. //
  4034. // PRESERVE: Preserve original Mtime (recommended)
  4035. //
  4036. // NONE: Ignore Mtime.
  4037. //
  4038. // If Mtime is set to PRESERVE, Atime must be set to BEST_EFFORT.
  4039. //
  4040. // If Mtime is set to NONE, Atime must also be set to NONE.
  4041. Mtime *string `type:"string" enum:"Mtime"`
  4042. // A value that determines which users or groups can access a file for a specific
  4043. // purpose such as reading, writing, or execution of the file.
  4044. //
  4045. // Default value: PRESERVE.
  4046. //
  4047. // PRESERVE: Preserve POSIX-style permissions (recommended).
  4048. //
  4049. // NONE: Ignore permissions.
  4050. //
  4051. // AWS DataSync can preserve extant permissions of a source location.
  4052. PosixPermissions *string `type:"string" enum:"PosixPermissions"`
  4053. // A value that specifies whether files in the destination that don't exist
  4054. // in the source file system should be preserved.
  4055. //
  4056. // Default value: PRESERVE.
  4057. //
  4058. // PRESERVE: Ignore such destination files (recommended).
  4059. //
  4060. // REMOVE: Delete destination files that aren’t present in the source.
  4061. PreserveDeletedFiles *string `type:"string" enum:"PreserveDeletedFiles"`
  4062. // A value that determines whether AWS DataSync should preserve the metadata
  4063. // of block and character devices in the source file system, and recreate the
  4064. // files with that device name and metadata on the destination.
  4065. //
  4066. // AWS DataSync can't sync the actual contents of such devices, because they
  4067. // are nonterminal and don't return an end-of-file (EOF) marker.
  4068. //
  4069. // Default value: NONE.
  4070. //
  4071. // NONE: Ignore special devices (recommended).
  4072. //
  4073. // PRESERVE: Preserve character and block device metadata. This option isn't
  4074. // currently supported for Amazon EFS.
  4075. PreserveDevices *string `type:"string" enum:"PreserveDevices"`
  4076. // The user ID (UID) of the file's owner.
  4077. //
  4078. // Default value: INT_VALUE. This preserves the integer value of the ID.
  4079. //
  4080. // INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).
  4081. //
  4082. // NONE: Ignore UID and GID.
  4083. Uid *string `type:"string" enum:"Uid"`
  4084. // A value that determines whether a data integrity verification should be performed
  4085. // at the end of a task execution after all data and metadata have been transferred.
  4086. //
  4087. // Default value: POINT_IN_TIME_CONSISTENT.
  4088. //
  4089. // POINT_IN_TIME_CONSISTENT: Perform verification (recommended).
  4090. //
  4091. // NONE: Skip verification.
  4092. VerifyMode *string `type:"string" enum:"VerifyMode"`
  4093. }
  4094. // String returns the string representation
  4095. func (s Options) String() string {
  4096. return awsutil.Prettify(s)
  4097. }
  4098. // GoString returns the string representation
  4099. func (s Options) GoString() string {
  4100. return s.String()
  4101. }
  4102. // Validate inspects the fields of the type to determine if they are valid.
  4103. func (s *Options) Validate() error {
  4104. invalidParams := request.ErrInvalidParams{Context: "Options"}
  4105. if s.BytesPerSecond != nil && *s.BytesPerSecond < -1 {
  4106. invalidParams.Add(request.NewErrParamMinValue("BytesPerSecond", -1))
  4107. }
  4108. if invalidParams.Len() > 0 {
  4109. return invalidParams
  4110. }
  4111. return nil
  4112. }
  4113. // SetAtime sets the Atime field's value.
  4114. func (s *Options) SetAtime(v string) *Options {
  4115. s.Atime = &v
  4116. return s
  4117. }
  4118. // SetBytesPerSecond sets the BytesPerSecond field's value.
  4119. func (s *Options) SetBytesPerSecond(v int64) *Options {
  4120. s.BytesPerSecond = &v
  4121. return s
  4122. }
  4123. // SetGid sets the Gid field's value.
  4124. func (s *Options) SetGid(v string) *Options {
  4125. s.Gid = &v
  4126. return s
  4127. }
  4128. // SetMtime sets the Mtime field's value.
  4129. func (s *Options) SetMtime(v string) *Options {
  4130. s.Mtime = &v
  4131. return s
  4132. }
  4133. // SetPosixPermissions sets the PosixPermissions field's value.
  4134. func (s *Options) SetPosixPermissions(v string) *Options {
  4135. s.PosixPermissions = &v
  4136. return s
  4137. }
  4138. // SetPreserveDeletedFiles sets the PreserveDeletedFiles field's value.
  4139. func (s *Options) SetPreserveDeletedFiles(v string) *Options {
  4140. s.PreserveDeletedFiles = &v
  4141. return s
  4142. }
  4143. // SetPreserveDevices sets the PreserveDevices field's value.
  4144. func (s *Options) SetPreserveDevices(v string) *Options {
  4145. s.PreserveDevices = &v
  4146. return s
  4147. }
  4148. // SetUid sets the Uid field's value.
  4149. func (s *Options) SetUid(v string) *Options {
  4150. s.Uid = &v
  4151. return s
  4152. }
  4153. // SetVerifyMode sets the VerifyMode field's value.
  4154. func (s *Options) SetVerifyMode(v string) *Options {
  4155. s.VerifyMode = &v
  4156. return s
  4157. }
  4158. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  4159. // (IAM) role that is used to access an Amazon S3 bucket. For detailed information
  4160. // about using such a role, see Components and Terminology (https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli)
  4161. // in the AWS DataSync User Guide.
  4162. type S3Config struct {
  4163. _ struct{} `type:"structure"`
  4164. // The Amazon S3 bucket to access. This bucket is used as a parameter in the
  4165. // CreateLocationS3 operation.
  4166. //
  4167. // BucketAccessRoleArn is a required field
  4168. BucketAccessRoleArn *string `type:"string" required:"true"`
  4169. }
  4170. // String returns the string representation
  4171. func (s S3Config) String() string {
  4172. return awsutil.Prettify(s)
  4173. }
  4174. // GoString returns the string representation
  4175. func (s S3Config) GoString() string {
  4176. return s.String()
  4177. }
  4178. // Validate inspects the fields of the type to determine if they are valid.
  4179. func (s *S3Config) Validate() error {
  4180. invalidParams := request.ErrInvalidParams{Context: "S3Config"}
  4181. if s.BucketAccessRoleArn == nil {
  4182. invalidParams.Add(request.NewErrParamRequired("BucketAccessRoleArn"))
  4183. }
  4184. if invalidParams.Len() > 0 {
  4185. return invalidParams
  4186. }
  4187. return nil
  4188. }
  4189. // SetBucketAccessRoleArn sets the BucketAccessRoleArn field's value.
  4190. func (s *S3Config) SetBucketAccessRoleArn(v string) *S3Config {
  4191. s.BucketAccessRoleArn = &v
  4192. return s
  4193. }
  4194. // StartTaskExecutionRequest
  4195. type StartTaskExecutionInput struct {
  4196. _ struct{} `type:"structure"`
  4197. // Represents the options that are available to control the behavior of a StartTaskExecution
  4198. // operation. Behavior includes preserving metadata such as user ID (UID), group
  4199. // ID (GID), and file permissions, and also overwriting files in the destination,
  4200. // data integrity verification, and so on.
  4201. //
  4202. // A task has a set of default options associated with it. If you don't specify
  4203. // an option in StartTaskExecution, the default value is used. You can override
  4204. // the defaults options on each task execution by specifying an overriding Options
  4205. // value to StartTaskExecution.
  4206. OverrideOptions *Options `type:"structure"`
  4207. // The Amazon Resource Name (ARN) of the task to start.
  4208. //
  4209. // TaskArn is a required field
  4210. TaskArn *string `type:"string" required:"true"`
  4211. }
  4212. // String returns the string representation
  4213. func (s StartTaskExecutionInput) String() string {
  4214. return awsutil.Prettify(s)
  4215. }
  4216. // GoString returns the string representation
  4217. func (s StartTaskExecutionInput) GoString() string {
  4218. return s.String()
  4219. }
  4220. // Validate inspects the fields of the type to determine if they are valid.
  4221. func (s *StartTaskExecutionInput) Validate() error {
  4222. invalidParams := request.ErrInvalidParams{Context: "StartTaskExecutionInput"}
  4223. if s.TaskArn == nil {
  4224. invalidParams.Add(request.NewErrParamRequired("TaskArn"))
  4225. }
  4226. if s.OverrideOptions != nil {
  4227. if err := s.OverrideOptions.Validate(); err != nil {
  4228. invalidParams.AddNested("OverrideOptions", err.(request.ErrInvalidParams))
  4229. }
  4230. }
  4231. if invalidParams.Len() > 0 {
  4232. return invalidParams
  4233. }
  4234. return nil
  4235. }
  4236. // SetOverrideOptions sets the OverrideOptions field's value.
  4237. func (s *StartTaskExecutionInput) SetOverrideOptions(v *Options) *StartTaskExecutionInput {
  4238. s.OverrideOptions = v
  4239. return s
  4240. }
  4241. // SetTaskArn sets the TaskArn field's value.
  4242. func (s *StartTaskExecutionInput) SetTaskArn(v string) *StartTaskExecutionInput {
  4243. s.TaskArn = &v
  4244. return s
  4245. }
  4246. // StartTaskExecutionResponse
  4247. type StartTaskExecutionOutput struct {
  4248. _ struct{} `type:"structure"`
  4249. // The Amazon Resource Name (ARN) of the specific task execution that was started.
  4250. TaskExecutionArn *string `type:"string"`
  4251. }
  4252. // String returns the string representation
  4253. func (s StartTaskExecutionOutput) String() string {
  4254. return awsutil.Prettify(s)
  4255. }
  4256. // GoString returns the string representation
  4257. func (s StartTaskExecutionOutput) GoString() string {
  4258. return s.String()
  4259. }
  4260. // SetTaskExecutionArn sets the TaskExecutionArn field's value.
  4261. func (s *StartTaskExecutionOutput) SetTaskExecutionArn(v string) *StartTaskExecutionOutput {
  4262. s.TaskExecutionArn = &v
  4263. return s
  4264. }
  4265. // Represents a single entry in a list of AWS resource tags. TagListEntry returns
  4266. // an array that contains a list of tasks when the ListTagsForResource operation
  4267. // is called.
  4268. type TagListEntry struct {
  4269. _ struct{} `type:"structure"`
  4270. // The key for an AWS resource tag.
  4271. Key *string `min:"1" type:"string"`
  4272. // The value for an AWS resource tag.
  4273. Value *string `min:"1" type:"string"`
  4274. }
  4275. // String returns the string representation
  4276. func (s TagListEntry) String() string {
  4277. return awsutil.Prettify(s)
  4278. }
  4279. // GoString returns the string representation
  4280. func (s TagListEntry) GoString() string {
  4281. return s.String()
  4282. }
  4283. // Validate inspects the fields of the type to determine if they are valid.
  4284. func (s *TagListEntry) Validate() error {
  4285. invalidParams := request.ErrInvalidParams{Context: "TagListEntry"}
  4286. if s.Key != nil && len(*s.Key) < 1 {
  4287. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4288. }
  4289. if s.Value != nil && len(*s.Value) < 1 {
  4290. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  4291. }
  4292. if invalidParams.Len() > 0 {
  4293. return invalidParams
  4294. }
  4295. return nil
  4296. }
  4297. // SetKey sets the Key field's value.
  4298. func (s *TagListEntry) SetKey(v string) *TagListEntry {
  4299. s.Key = &v
  4300. return s
  4301. }
  4302. // SetValue sets the Value field's value.
  4303. func (s *TagListEntry) SetValue(v string) *TagListEntry {
  4304. s.Value = &v
  4305. return s
  4306. }
  4307. // TagResourceRequest
  4308. type TagResourceInput struct {
  4309. _ struct{} `type:"structure"`
  4310. // The Amazon Resource Name (ARN) of the resource to apply the tag to.
  4311. //
  4312. // ResourceArn is a required field
  4313. ResourceArn *string `type:"string" required:"true"`
  4314. // The tags to apply.
  4315. //
  4316. // Tags is a required field
  4317. Tags []*TagListEntry `type:"list" required:"true"`
  4318. }
  4319. // String returns the string representation
  4320. func (s TagResourceInput) String() string {
  4321. return awsutil.Prettify(s)
  4322. }
  4323. // GoString returns the string representation
  4324. func (s TagResourceInput) GoString() string {
  4325. return s.String()
  4326. }
  4327. // Validate inspects the fields of the type to determine if they are valid.
  4328. func (s *TagResourceInput) Validate() error {
  4329. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  4330. if s.ResourceArn == nil {
  4331. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4332. }
  4333. if s.Tags == nil {
  4334. invalidParams.Add(request.NewErrParamRequired("Tags"))
  4335. }
  4336. if s.Tags != nil {
  4337. for i, v := range s.Tags {
  4338. if v == nil {
  4339. continue
  4340. }
  4341. if err := v.Validate(); err != nil {
  4342. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  4343. }
  4344. }
  4345. }
  4346. if invalidParams.Len() > 0 {
  4347. return invalidParams
  4348. }
  4349. return nil
  4350. }
  4351. // SetResourceArn sets the ResourceArn field's value.
  4352. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  4353. s.ResourceArn = &v
  4354. return s
  4355. }
  4356. // SetTags sets the Tags field's value.
  4357. func (s *TagResourceInput) SetTags(v []*TagListEntry) *TagResourceInput {
  4358. s.Tags = v
  4359. return s
  4360. }
  4361. type TagResourceOutput struct {
  4362. _ struct{} `type:"structure"`
  4363. }
  4364. // String returns the string representation
  4365. func (s TagResourceOutput) String() string {
  4366. return awsutil.Prettify(s)
  4367. }
  4368. // GoString returns the string representation
  4369. func (s TagResourceOutput) GoString() string {
  4370. return s.String()
  4371. }
  4372. // Represents a single entry in a list of task executions. TaskExecutionListEntry
  4373. // returns an array that contains a list of specific invocations of a task when
  4374. // ListTaskExecutions operation is called.
  4375. type TaskExecutionListEntry struct {
  4376. _ struct{} `type:"structure"`
  4377. // The status of a task execution.
  4378. Status *string `type:"string" enum:"TaskExecutionStatus"`
  4379. // The Amazon Resource Name (ARN) of the task that was executed.
  4380. TaskExecutionArn *string `type:"string"`
  4381. }
  4382. // String returns the string representation
  4383. func (s TaskExecutionListEntry) String() string {
  4384. return awsutil.Prettify(s)
  4385. }
  4386. // GoString returns the string representation
  4387. func (s TaskExecutionListEntry) GoString() string {
  4388. return s.String()
  4389. }
  4390. // SetStatus sets the Status field's value.
  4391. func (s *TaskExecutionListEntry) SetStatus(v string) *TaskExecutionListEntry {
  4392. s.Status = &v
  4393. return s
  4394. }
  4395. // SetTaskExecutionArn sets the TaskExecutionArn field's value.
  4396. func (s *TaskExecutionListEntry) SetTaskExecutionArn(v string) *TaskExecutionListEntry {
  4397. s.TaskExecutionArn = &v
  4398. return s
  4399. }
  4400. // Describes the detailed result of a TaskExecution operation. This result includes
  4401. // the time in milliseconds spent in each phase, the status of the task execution,
  4402. // and the errors encountered.
  4403. type TaskExecutionResultDetail struct {
  4404. _ struct{} `type:"structure"`
  4405. // Errors that AWS DataSync encountered during execution of the task. You can
  4406. // use this error code to help troubleshoot issues.
  4407. ErrorCode *string `type:"string"`
  4408. // Detailed description of an error that was encountered during the task execution.
  4409. // You can use this information to help troubleshoot issues.
  4410. ErrorDetail *string `type:"string"`
  4411. // The total time in milliseconds that AWS DataSync spent in the PREPARING phase.
  4412. PrepareDuration *int64 `type:"long"`
  4413. // The status of the PREPARING phase.
  4414. PrepareStatus *string `type:"string" enum:"PhaseStatus"`
  4415. // The total time in milliseconds that AWS DataSync spent in the TRANSFERRING
  4416. // phase.
  4417. TransferDuration *int64 `type:"long"`
  4418. // The status of the TRANSFERRING Phase.
  4419. TransferStatus *string `type:"string" enum:"PhaseStatus"`
  4420. // The total time in milliseconds that AWS DataSync spent in the VERIFYING phase.
  4421. VerifyDuration *int64 `type:"long"`
  4422. // The status of the VERIFYING Phase.
  4423. VerifyStatus *string `type:"string" enum:"PhaseStatus"`
  4424. }
  4425. // String returns the string representation
  4426. func (s TaskExecutionResultDetail) String() string {
  4427. return awsutil.Prettify(s)
  4428. }
  4429. // GoString returns the string representation
  4430. func (s TaskExecutionResultDetail) GoString() string {
  4431. return s.String()
  4432. }
  4433. // SetErrorCode sets the ErrorCode field's value.
  4434. func (s *TaskExecutionResultDetail) SetErrorCode(v string) *TaskExecutionResultDetail {
  4435. s.ErrorCode = &v
  4436. return s
  4437. }
  4438. // SetErrorDetail sets the ErrorDetail field's value.
  4439. func (s *TaskExecutionResultDetail) SetErrorDetail(v string) *TaskExecutionResultDetail {
  4440. s.ErrorDetail = &v
  4441. return s
  4442. }
  4443. // SetPrepareDuration sets the PrepareDuration field's value.
  4444. func (s *TaskExecutionResultDetail) SetPrepareDuration(v int64) *TaskExecutionResultDetail {
  4445. s.PrepareDuration = &v
  4446. return s
  4447. }
  4448. // SetPrepareStatus sets the PrepareStatus field's value.
  4449. func (s *TaskExecutionResultDetail) SetPrepareStatus(v string) *TaskExecutionResultDetail {
  4450. s.PrepareStatus = &v
  4451. return s
  4452. }
  4453. // SetTransferDuration sets the TransferDuration field's value.
  4454. func (s *TaskExecutionResultDetail) SetTransferDuration(v int64) *TaskExecutionResultDetail {
  4455. s.TransferDuration = &v
  4456. return s
  4457. }
  4458. // SetTransferStatus sets the TransferStatus field's value.
  4459. func (s *TaskExecutionResultDetail) SetTransferStatus(v string) *TaskExecutionResultDetail {
  4460. s.TransferStatus = &v
  4461. return s
  4462. }
  4463. // SetVerifyDuration sets the VerifyDuration field's value.
  4464. func (s *TaskExecutionResultDetail) SetVerifyDuration(v int64) *TaskExecutionResultDetail {
  4465. s.VerifyDuration = &v
  4466. return s
  4467. }
  4468. // SetVerifyStatus sets the VerifyStatus field's value.
  4469. func (s *TaskExecutionResultDetail) SetVerifyStatus(v string) *TaskExecutionResultDetail {
  4470. s.VerifyStatus = &v
  4471. return s
  4472. }
  4473. // Represents a single entry in a list of tasks. TaskListEntry returns an array
  4474. // that contains a list of tasks when the ListTasks operation is called. A task
  4475. // includes the source and destination file systems to sync and the options
  4476. // to use for the tasks.
  4477. type TaskListEntry struct {
  4478. _ struct{} `type:"structure"`
  4479. // The name of the task.
  4480. Name *string `min:"1" type:"string"`
  4481. // The status of the task.
  4482. Status *string `type:"string" enum:"TaskStatus"`
  4483. // The Amazon Resource Name (ARN) of the task.
  4484. TaskArn *string `type:"string"`
  4485. }
  4486. // String returns the string representation
  4487. func (s TaskListEntry) String() string {
  4488. return awsutil.Prettify(s)
  4489. }
  4490. // GoString returns the string representation
  4491. func (s TaskListEntry) GoString() string {
  4492. return s.String()
  4493. }
  4494. // SetName sets the Name field's value.
  4495. func (s *TaskListEntry) SetName(v string) *TaskListEntry {
  4496. s.Name = &v
  4497. return s
  4498. }
  4499. // SetStatus sets the Status field's value.
  4500. func (s *TaskListEntry) SetStatus(v string) *TaskListEntry {
  4501. s.Status = &v
  4502. return s
  4503. }
  4504. // SetTaskArn sets the TaskArn field's value.
  4505. func (s *TaskListEntry) SetTaskArn(v string) *TaskListEntry {
  4506. s.TaskArn = &v
  4507. return s
  4508. }
  4509. // UntagResourceRequest
  4510. type UntagResourceInput struct {
  4511. _ struct{} `type:"structure"`
  4512. // The keys in the key-value pair in the tag to remove.
  4513. //
  4514. // Keys is a required field
  4515. Keys []*string `min:"1" type:"list" required:"true"`
  4516. // The Amazon Resource Name (ARN) of the resource to remove the tag from.
  4517. //
  4518. // ResourceArn is a required field
  4519. ResourceArn *string `type:"string" required:"true"`
  4520. }
  4521. // String returns the string representation
  4522. func (s UntagResourceInput) String() string {
  4523. return awsutil.Prettify(s)
  4524. }
  4525. // GoString returns the string representation
  4526. func (s UntagResourceInput) GoString() string {
  4527. return s.String()
  4528. }
  4529. // Validate inspects the fields of the type to determine if they are valid.
  4530. func (s *UntagResourceInput) Validate() error {
  4531. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  4532. if s.Keys == nil {
  4533. invalidParams.Add(request.NewErrParamRequired("Keys"))
  4534. }
  4535. if s.Keys != nil && len(s.Keys) < 1 {
  4536. invalidParams.Add(request.NewErrParamMinLen("Keys", 1))
  4537. }
  4538. if s.ResourceArn == nil {
  4539. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4540. }
  4541. if invalidParams.Len() > 0 {
  4542. return invalidParams
  4543. }
  4544. return nil
  4545. }
  4546. // SetKeys sets the Keys field's value.
  4547. func (s *UntagResourceInput) SetKeys(v []*string) *UntagResourceInput {
  4548. s.Keys = v
  4549. return s
  4550. }
  4551. // SetResourceArn sets the ResourceArn field's value.
  4552. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  4553. s.ResourceArn = &v
  4554. return s
  4555. }
  4556. type UntagResourceOutput struct {
  4557. _ struct{} `type:"structure"`
  4558. }
  4559. // String returns the string representation
  4560. func (s UntagResourceOutput) String() string {
  4561. return awsutil.Prettify(s)
  4562. }
  4563. // GoString returns the string representation
  4564. func (s UntagResourceOutput) GoString() string {
  4565. return s.String()
  4566. }
  4567. // UpdateAgentRequest
  4568. type UpdateAgentInput struct {
  4569. _ struct{} `type:"structure"`
  4570. // The Amazon Resource Name (ARN) of the agent to update.
  4571. //
  4572. // AgentArn is a required field
  4573. AgentArn *string `type:"string" required:"true"`
  4574. // The name that you want to use to configure the agent.
  4575. Name *string `min:"1" type:"string"`
  4576. }
  4577. // String returns the string representation
  4578. func (s UpdateAgentInput) String() string {
  4579. return awsutil.Prettify(s)
  4580. }
  4581. // GoString returns the string representation
  4582. func (s UpdateAgentInput) GoString() string {
  4583. return s.String()
  4584. }
  4585. // Validate inspects the fields of the type to determine if they are valid.
  4586. func (s *UpdateAgentInput) Validate() error {
  4587. invalidParams := request.ErrInvalidParams{Context: "UpdateAgentInput"}
  4588. if s.AgentArn == nil {
  4589. invalidParams.Add(request.NewErrParamRequired("AgentArn"))
  4590. }
  4591. if s.Name != nil && len(*s.Name) < 1 {
  4592. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4593. }
  4594. if invalidParams.Len() > 0 {
  4595. return invalidParams
  4596. }
  4597. return nil
  4598. }
  4599. // SetAgentArn sets the AgentArn field's value.
  4600. func (s *UpdateAgentInput) SetAgentArn(v string) *UpdateAgentInput {
  4601. s.AgentArn = &v
  4602. return s
  4603. }
  4604. // SetName sets the Name field's value.
  4605. func (s *UpdateAgentInput) SetName(v string) *UpdateAgentInput {
  4606. s.Name = &v
  4607. return s
  4608. }
  4609. type UpdateAgentOutput struct {
  4610. _ struct{} `type:"structure"`
  4611. }
  4612. // String returns the string representation
  4613. func (s UpdateAgentOutput) String() string {
  4614. return awsutil.Prettify(s)
  4615. }
  4616. // GoString returns the string representation
  4617. func (s UpdateAgentOutput) GoString() string {
  4618. return s.String()
  4619. }
  4620. // UpdateTaskResponse
  4621. type UpdateTaskInput struct {
  4622. _ struct{} `type:"structure"`
  4623. // The name of the task to update.
  4624. Name *string `min:"1" type:"string"`
  4625. // Represents the options that are available to control the behavior of a StartTaskExecution
  4626. // operation. Behavior includes preserving metadata such as user ID (UID), group
  4627. // ID (GID), and file permissions, and also overwriting files in the destination,
  4628. // data integrity verification, and so on.
  4629. //
  4630. // A task has a set of default options associated with it. If you don't specify
  4631. // an option in StartTaskExecution, the default value is used. You can override
  4632. // the defaults options on each task execution by specifying an overriding Options
  4633. // value to StartTaskExecution.
  4634. Options *Options `type:"structure"`
  4635. // The Amazon Resource Name (ARN) of the resource name of the task to update.
  4636. //
  4637. // TaskArn is a required field
  4638. TaskArn *string `type:"string" required:"true"`
  4639. }
  4640. // String returns the string representation
  4641. func (s UpdateTaskInput) String() string {
  4642. return awsutil.Prettify(s)
  4643. }
  4644. // GoString returns the string representation
  4645. func (s UpdateTaskInput) GoString() string {
  4646. return s.String()
  4647. }
  4648. // Validate inspects the fields of the type to determine if they are valid.
  4649. func (s *UpdateTaskInput) Validate() error {
  4650. invalidParams := request.ErrInvalidParams{Context: "UpdateTaskInput"}
  4651. if s.Name != nil && len(*s.Name) < 1 {
  4652. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4653. }
  4654. if s.TaskArn == nil {
  4655. invalidParams.Add(request.NewErrParamRequired("TaskArn"))
  4656. }
  4657. if s.Options != nil {
  4658. if err := s.Options.Validate(); err != nil {
  4659. invalidParams.AddNested("Options", err.(request.ErrInvalidParams))
  4660. }
  4661. }
  4662. if invalidParams.Len() > 0 {
  4663. return invalidParams
  4664. }
  4665. return nil
  4666. }
  4667. // SetName sets the Name field's value.
  4668. func (s *UpdateTaskInput) SetName(v string) *UpdateTaskInput {
  4669. s.Name = &v
  4670. return s
  4671. }
  4672. // SetOptions sets the Options field's value.
  4673. func (s *UpdateTaskInput) SetOptions(v *Options) *UpdateTaskInput {
  4674. s.Options = v
  4675. return s
  4676. }
  4677. // SetTaskArn sets the TaskArn field's value.
  4678. func (s *UpdateTaskInput) SetTaskArn(v string) *UpdateTaskInput {
  4679. s.TaskArn = &v
  4680. return s
  4681. }
  4682. type UpdateTaskOutput struct {
  4683. _ struct{} `type:"structure"`
  4684. }
  4685. // String returns the string representation
  4686. func (s UpdateTaskOutput) String() string {
  4687. return awsutil.Prettify(s)
  4688. }
  4689. // GoString returns the string representation
  4690. func (s UpdateTaskOutput) GoString() string {
  4691. return s.String()
  4692. }
  4693. const (
  4694. // AgentStatusOnline is a AgentStatus enum value
  4695. AgentStatusOnline = "ONLINE"
  4696. // AgentStatusOffline is a AgentStatus enum value
  4697. AgentStatusOffline = "OFFLINE"
  4698. )
  4699. const (
  4700. // AtimeNone is a Atime enum value
  4701. AtimeNone = "NONE"
  4702. // AtimeBestEffort is a Atime enum value
  4703. AtimeBestEffort = "BEST_EFFORT"
  4704. )
  4705. const (
  4706. // GidNone is a Gid enum value
  4707. GidNone = "NONE"
  4708. // GidIntValue is a Gid enum value
  4709. GidIntValue = "INT_VALUE"
  4710. // GidName is a Gid enum value
  4711. GidName = "NAME"
  4712. // GidBoth is a Gid enum value
  4713. GidBoth = "BOTH"
  4714. )
  4715. const (
  4716. // MtimeNone is a Mtime enum value
  4717. MtimeNone = "NONE"
  4718. // MtimePreserve is a Mtime enum value
  4719. MtimePreserve = "PRESERVE"
  4720. )
  4721. const (
  4722. // PhaseStatusPending is a PhaseStatus enum value
  4723. PhaseStatusPending = "PENDING"
  4724. // PhaseStatusSuccess is a PhaseStatus enum value
  4725. PhaseStatusSuccess = "SUCCESS"
  4726. // PhaseStatusError is a PhaseStatus enum value
  4727. PhaseStatusError = "ERROR"
  4728. )
  4729. const (
  4730. // PosixPermissionsNone is a PosixPermissions enum value
  4731. PosixPermissionsNone = "NONE"
  4732. // PosixPermissionsBestEffort is a PosixPermissions enum value
  4733. PosixPermissionsBestEffort = "BEST_EFFORT"
  4734. // PosixPermissionsPreserve is a PosixPermissions enum value
  4735. PosixPermissionsPreserve = "PRESERVE"
  4736. )
  4737. const (
  4738. // PreserveDeletedFilesPreserve is a PreserveDeletedFiles enum value
  4739. PreserveDeletedFilesPreserve = "PRESERVE"
  4740. // PreserveDeletedFilesRemove is a PreserveDeletedFiles enum value
  4741. PreserveDeletedFilesRemove = "REMOVE"
  4742. )
  4743. const (
  4744. // PreserveDevicesNone is a PreserveDevices enum value
  4745. PreserveDevicesNone = "NONE"
  4746. // PreserveDevicesPreserve is a PreserveDevices enum value
  4747. PreserveDevicesPreserve = "PRESERVE"
  4748. )
  4749. const (
  4750. // TaskExecutionStatusLaunching is a TaskExecutionStatus enum value
  4751. TaskExecutionStatusLaunching = "LAUNCHING"
  4752. // TaskExecutionStatusPreparing is a TaskExecutionStatus enum value
  4753. TaskExecutionStatusPreparing = "PREPARING"
  4754. // TaskExecutionStatusTransferring is a TaskExecutionStatus enum value
  4755. TaskExecutionStatusTransferring = "TRANSFERRING"
  4756. // TaskExecutionStatusVerifying is a TaskExecutionStatus enum value
  4757. TaskExecutionStatusVerifying = "VERIFYING"
  4758. // TaskExecutionStatusSuccess is a TaskExecutionStatus enum value
  4759. TaskExecutionStatusSuccess = "SUCCESS"
  4760. // TaskExecutionStatusError is a TaskExecutionStatus enum value
  4761. TaskExecutionStatusError = "ERROR"
  4762. )
  4763. const (
  4764. // TaskStatusAvailable is a TaskStatus enum value
  4765. TaskStatusAvailable = "AVAILABLE"
  4766. // TaskStatusCreating is a TaskStatus enum value
  4767. TaskStatusCreating = "CREATING"
  4768. // TaskStatusRunning is a TaskStatus enum value
  4769. TaskStatusRunning = "RUNNING"
  4770. // TaskStatusUnavailable is a TaskStatus enum value
  4771. TaskStatusUnavailable = "UNAVAILABLE"
  4772. )
  4773. const (
  4774. // UidNone is a Uid enum value
  4775. UidNone = "NONE"
  4776. // UidIntValue is a Uid enum value
  4777. UidIntValue = "INT_VALUE"
  4778. // UidName is a Uid enum value
  4779. UidName = "NAME"
  4780. // UidBoth is a Uid enum value
  4781. UidBoth = "BOTH"
  4782. )
  4783. const (
  4784. // VerifyModePointInTimeConsistent is a VerifyMode enum value
  4785. VerifyModePointInTimeConsistent = "POINT_IN_TIME_CONSISTENT"
  4786. // VerifyModeNone is a VerifyMode enum value
  4787. VerifyModeNone = "NONE"
  4788. )