api.go 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package snowball provides a client for Amazon Import/Export Snowball.
  3. package snowball
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opCancelJob = "CancelJob"
  11. // CancelJobRequest generates a "aws/request.Request" representing the
  12. // client's request for the CancelJob operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // See CancelJob for usage and error information.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CancelJob method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CancelJobRequest method.
  28. // req, resp := client.CancelJobRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *Snowball) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) {
  36. op := &request.Operation{
  37. Name: opCancelJob,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &CancelJobInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &CancelJobOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // CancelJob API operation for Amazon Import/Export Snowball.
  50. //
  51. // Cancels the specified job. Note that you can only cancel a job before its
  52. // JobState value changes to PreparingAppliance. Requesting the ListJobs or
  53. // DescribeJob action will return a job's JobState as part of the response element
  54. // data returned.
  55. //
  56. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  57. // with awserr.Error's Code and Message methods to get detailed information about
  58. // the error.
  59. //
  60. // See the AWS API reference guide for Amazon Import/Export Snowball's
  61. // API operation CancelJob for usage and error information.
  62. //
  63. // Returned Error Codes:
  64. // * InvalidResourceException
  65. // The specified resource can't be found. Check the information you provided
  66. // in your last request, and try again.
  67. //
  68. // * InvalidJobStateException
  69. // The action can't be performed because the job's current state doesn't allow
  70. // that action to be performed.
  71. //
  72. // * KMSRequestFailedException
  73. // The provided AWS Key Management Service key lacks the permissions to perform
  74. // the specified CreateJob or UpdateJob action.
  75. //
  76. func (c *Snowball) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) {
  77. req, out := c.CancelJobRequest(input)
  78. err := req.Send()
  79. return out, err
  80. }
  81. const opCreateAddress = "CreateAddress"
  82. // CreateAddressRequest generates a "aws/request.Request" representing the
  83. // client's request for the CreateAddress operation. The "output" return
  84. // value can be used to capture response data after the request's "Send" method
  85. // is called.
  86. //
  87. // See CreateAddress for usage and error information.
  88. //
  89. // Creating a request object using this method should be used when you want to inject
  90. // custom logic into the request's lifecycle using a custom handler, or if you want to
  91. // access properties on the request object before or after sending the request. If
  92. // you just want the service response, call the CreateAddress method directly
  93. // instead.
  94. //
  95. // Note: You must call the "Send" method on the returned request object in order
  96. // to execute the request.
  97. //
  98. // // Example sending a request using the CreateAddressRequest method.
  99. // req, resp := client.CreateAddressRequest(params)
  100. //
  101. // err := req.Send()
  102. // if err == nil { // resp is now filled
  103. // fmt.Println(resp)
  104. // }
  105. //
  106. func (c *Snowball) CreateAddressRequest(input *CreateAddressInput) (req *request.Request, output *CreateAddressOutput) {
  107. op := &request.Operation{
  108. Name: opCreateAddress,
  109. HTTPMethod: "POST",
  110. HTTPPath: "/",
  111. }
  112. if input == nil {
  113. input = &CreateAddressInput{}
  114. }
  115. req = c.newRequest(op, input, output)
  116. output = &CreateAddressOutput{}
  117. req.Data = output
  118. return
  119. }
  120. // CreateAddress API operation for Amazon Import/Export Snowball.
  121. //
  122. // Creates an address for a Snowball to be shipped to.
  123. //
  124. // Addresses are validated at the time of creation. The address you provide
  125. // must be located within the serviceable area of your region. If the address
  126. // is invalid or unsupported, then an exception is thrown.
  127. //
  128. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  129. // with awserr.Error's Code and Message methods to get detailed information about
  130. // the error.
  131. //
  132. // See the AWS API reference guide for Amazon Import/Export Snowball's
  133. // API operation CreateAddress for usage and error information.
  134. //
  135. // Returned Error Codes:
  136. // * InvalidAddressException
  137. // The address provided was invalid. Check the address with your region's carrier,
  138. // and try again.
  139. //
  140. // * UnsupportedAddressException
  141. // The address is either outside the serviceable area for your region, or an
  142. // error occurred. Check the address with your region's carrier and try again.
  143. // If the issue persists, contact AWS Support.
  144. //
  145. func (c *Snowball) CreateAddress(input *CreateAddressInput) (*CreateAddressOutput, error) {
  146. req, out := c.CreateAddressRequest(input)
  147. err := req.Send()
  148. return out, err
  149. }
  150. const opCreateJob = "CreateJob"
  151. // CreateJobRequest generates a "aws/request.Request" representing the
  152. // client's request for the CreateJob operation. The "output" return
  153. // value can be used to capture response data after the request's "Send" method
  154. // is called.
  155. //
  156. // See CreateJob for usage and error information.
  157. //
  158. // Creating a request object using this method should be used when you want to inject
  159. // custom logic into the request's lifecycle using a custom handler, or if you want to
  160. // access properties on the request object before or after sending the request. If
  161. // you just want the service response, call the CreateJob method directly
  162. // instead.
  163. //
  164. // Note: You must call the "Send" method on the returned request object in order
  165. // to execute the request.
  166. //
  167. // // Example sending a request using the CreateJobRequest method.
  168. // req, resp := client.CreateJobRequest(params)
  169. //
  170. // err := req.Send()
  171. // if err == nil { // resp is now filled
  172. // fmt.Println(resp)
  173. // }
  174. //
  175. func (c *Snowball) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobOutput) {
  176. op := &request.Operation{
  177. Name: opCreateJob,
  178. HTTPMethod: "POST",
  179. HTTPPath: "/",
  180. }
  181. if input == nil {
  182. input = &CreateJobInput{}
  183. }
  184. req = c.newRequest(op, input, output)
  185. output = &CreateJobOutput{}
  186. req.Data = output
  187. return
  188. }
  189. // CreateJob API operation for Amazon Import/Export Snowball.
  190. //
  191. // Creates a job to import or export data between Amazon S3 and your on-premises
  192. // data center. Note that your AWS account must have the right trust policies
  193. // and permissions in place to create a job for Snowball. For more information,
  194. // see api-reference-policies.
  195. //
  196. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  197. // with awserr.Error's Code and Message methods to get detailed information about
  198. // the error.
  199. //
  200. // See the AWS API reference guide for Amazon Import/Export Snowball's
  201. // API operation CreateJob for usage and error information.
  202. //
  203. // Returned Error Codes:
  204. // * InvalidResourceException
  205. // The specified resource can't be found. Check the information you provided
  206. // in your last request, and try again.
  207. //
  208. // * KMSRequestFailedException
  209. // The provided AWS Key Management Service key lacks the permissions to perform
  210. // the specified CreateJob or UpdateJob action.
  211. //
  212. func (c *Snowball) CreateJob(input *CreateJobInput) (*CreateJobOutput, error) {
  213. req, out := c.CreateJobRequest(input)
  214. err := req.Send()
  215. return out, err
  216. }
  217. const opDescribeAddress = "DescribeAddress"
  218. // DescribeAddressRequest generates a "aws/request.Request" representing the
  219. // client's request for the DescribeAddress operation. The "output" return
  220. // value can be used to capture response data after the request's "Send" method
  221. // is called.
  222. //
  223. // See DescribeAddress for usage and error information.
  224. //
  225. // Creating a request object using this method should be used when you want to inject
  226. // custom logic into the request's lifecycle using a custom handler, or if you want to
  227. // access properties on the request object before or after sending the request. If
  228. // you just want the service response, call the DescribeAddress method directly
  229. // instead.
  230. //
  231. // Note: You must call the "Send" method on the returned request object in order
  232. // to execute the request.
  233. //
  234. // // Example sending a request using the DescribeAddressRequest method.
  235. // req, resp := client.DescribeAddressRequest(params)
  236. //
  237. // err := req.Send()
  238. // if err == nil { // resp is now filled
  239. // fmt.Println(resp)
  240. // }
  241. //
  242. func (c *Snowball) DescribeAddressRequest(input *DescribeAddressInput) (req *request.Request, output *DescribeAddressOutput) {
  243. op := &request.Operation{
  244. Name: opDescribeAddress,
  245. HTTPMethod: "POST",
  246. HTTPPath: "/",
  247. }
  248. if input == nil {
  249. input = &DescribeAddressInput{}
  250. }
  251. req = c.newRequest(op, input, output)
  252. output = &DescribeAddressOutput{}
  253. req.Data = output
  254. return
  255. }
  256. // DescribeAddress API operation for Amazon Import/Export Snowball.
  257. //
  258. // Takes an AddressId and returns specific details about that address in the
  259. // form of an Address object.
  260. //
  261. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  262. // with awserr.Error's Code and Message methods to get detailed information about
  263. // the error.
  264. //
  265. // See the AWS API reference guide for Amazon Import/Export Snowball's
  266. // API operation DescribeAddress for usage and error information.
  267. //
  268. // Returned Error Codes:
  269. // * InvalidResourceException
  270. // The specified resource can't be found. Check the information you provided
  271. // in your last request, and try again.
  272. //
  273. func (c *Snowball) DescribeAddress(input *DescribeAddressInput) (*DescribeAddressOutput, error) {
  274. req, out := c.DescribeAddressRequest(input)
  275. err := req.Send()
  276. return out, err
  277. }
  278. const opDescribeAddresses = "DescribeAddresses"
  279. // DescribeAddressesRequest generates a "aws/request.Request" representing the
  280. // client's request for the DescribeAddresses operation. The "output" return
  281. // value can be used to capture response data after the request's "Send" method
  282. // is called.
  283. //
  284. // See DescribeAddresses for usage and error information.
  285. //
  286. // Creating a request object using this method should be used when you want to inject
  287. // custom logic into the request's lifecycle using a custom handler, or if you want to
  288. // access properties on the request object before or after sending the request. If
  289. // you just want the service response, call the DescribeAddresses method directly
  290. // instead.
  291. //
  292. // Note: You must call the "Send" method on the returned request object in order
  293. // to execute the request.
  294. //
  295. // // Example sending a request using the DescribeAddressesRequest method.
  296. // req, resp := client.DescribeAddressesRequest(params)
  297. //
  298. // err := req.Send()
  299. // if err == nil { // resp is now filled
  300. // fmt.Println(resp)
  301. // }
  302. //
  303. func (c *Snowball) DescribeAddressesRequest(input *DescribeAddressesInput) (req *request.Request, output *DescribeAddressesOutput) {
  304. op := &request.Operation{
  305. Name: opDescribeAddresses,
  306. HTTPMethod: "POST",
  307. HTTPPath: "/",
  308. Paginator: &request.Paginator{
  309. InputTokens: []string{"NextToken"},
  310. OutputTokens: []string{"NextToken"},
  311. LimitToken: "MaxResults",
  312. TruncationToken: "",
  313. },
  314. }
  315. if input == nil {
  316. input = &DescribeAddressesInput{}
  317. }
  318. req = c.newRequest(op, input, output)
  319. output = &DescribeAddressesOutput{}
  320. req.Data = output
  321. return
  322. }
  323. // DescribeAddresses API operation for Amazon Import/Export Snowball.
  324. //
  325. // Returns a specified number of ADDRESS objects. Calling this API in one of
  326. // the US regions will return addresses from the list of all addresses associated
  327. // with this account in all US regions.
  328. //
  329. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  330. // with awserr.Error's Code and Message methods to get detailed information about
  331. // the error.
  332. //
  333. // See the AWS API reference guide for Amazon Import/Export Snowball's
  334. // API operation DescribeAddresses for usage and error information.
  335. //
  336. // Returned Error Codes:
  337. // * InvalidResourceException
  338. // The specified resource can't be found. Check the information you provided
  339. // in your last request, and try again.
  340. //
  341. func (c *Snowball) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error) {
  342. req, out := c.DescribeAddressesRequest(input)
  343. err := req.Send()
  344. return out, err
  345. }
  346. // DescribeAddressesPages iterates over the pages of a DescribeAddresses operation,
  347. // calling the "fn" function with the response data for each page. To stop
  348. // iterating, return false from the fn function.
  349. //
  350. // See DescribeAddresses method for more information on how to use this operation.
  351. //
  352. // Note: This operation can generate multiple requests to a service.
  353. //
  354. // // Example iterating over at most 3 pages of a DescribeAddresses operation.
  355. // pageNum := 0
  356. // err := client.DescribeAddressesPages(params,
  357. // func(page *DescribeAddressesOutput, lastPage bool) bool {
  358. // pageNum++
  359. // fmt.Println(page)
  360. // return pageNum <= 3
  361. // })
  362. //
  363. func (c *Snowball) DescribeAddressesPages(input *DescribeAddressesInput, fn func(p *DescribeAddressesOutput, lastPage bool) (shouldContinue bool)) error {
  364. page, _ := c.DescribeAddressesRequest(input)
  365. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  366. return page.EachPage(func(p interface{}, lastPage bool) bool {
  367. return fn(p.(*DescribeAddressesOutput), lastPage)
  368. })
  369. }
  370. const opDescribeJob = "DescribeJob"
  371. // DescribeJobRequest generates a "aws/request.Request" representing the
  372. // client's request for the DescribeJob operation. The "output" return
  373. // value can be used to capture response data after the request's "Send" method
  374. // is called.
  375. //
  376. // See DescribeJob for usage and error information.
  377. //
  378. // Creating a request object using this method should be used when you want to inject
  379. // custom logic into the request's lifecycle using a custom handler, or if you want to
  380. // access properties on the request object before or after sending the request. If
  381. // you just want the service response, call the DescribeJob method directly
  382. // instead.
  383. //
  384. // Note: You must call the "Send" method on the returned request object in order
  385. // to execute the request.
  386. //
  387. // // Example sending a request using the DescribeJobRequest method.
  388. // req, resp := client.DescribeJobRequest(params)
  389. //
  390. // err := req.Send()
  391. // if err == nil { // resp is now filled
  392. // fmt.Println(resp)
  393. // }
  394. //
  395. func (c *Snowball) DescribeJobRequest(input *DescribeJobInput) (req *request.Request, output *DescribeJobOutput) {
  396. op := &request.Operation{
  397. Name: opDescribeJob,
  398. HTTPMethod: "POST",
  399. HTTPPath: "/",
  400. }
  401. if input == nil {
  402. input = &DescribeJobInput{}
  403. }
  404. req = c.newRequest(op, input, output)
  405. output = &DescribeJobOutput{}
  406. req.Data = output
  407. return
  408. }
  409. // DescribeJob API operation for Amazon Import/Export Snowball.
  410. //
  411. // Returns information about a specific job including shipping information,
  412. // job status, and other important metadata.
  413. //
  414. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  415. // with awserr.Error's Code and Message methods to get detailed information about
  416. // the error.
  417. //
  418. // See the AWS API reference guide for Amazon Import/Export Snowball's
  419. // API operation DescribeJob for usage and error information.
  420. //
  421. // Returned Error Codes:
  422. // * InvalidResourceException
  423. // The specified resource can't be found. Check the information you provided
  424. // in your last request, and try again.
  425. //
  426. func (c *Snowball) DescribeJob(input *DescribeJobInput) (*DescribeJobOutput, error) {
  427. req, out := c.DescribeJobRequest(input)
  428. err := req.Send()
  429. return out, err
  430. }
  431. const opGetJobManifest = "GetJobManifest"
  432. // GetJobManifestRequest generates a "aws/request.Request" representing the
  433. // client's request for the GetJobManifest operation. The "output" return
  434. // value can be used to capture response data after the request's "Send" method
  435. // is called.
  436. //
  437. // See GetJobManifest for usage and error information.
  438. //
  439. // Creating a request object using this method should be used when you want to inject
  440. // custom logic into the request's lifecycle using a custom handler, or if you want to
  441. // access properties on the request object before or after sending the request. If
  442. // you just want the service response, call the GetJobManifest method directly
  443. // instead.
  444. //
  445. // Note: You must call the "Send" method on the returned request object in order
  446. // to execute the request.
  447. //
  448. // // Example sending a request using the GetJobManifestRequest method.
  449. // req, resp := client.GetJobManifestRequest(params)
  450. //
  451. // err := req.Send()
  452. // if err == nil { // resp is now filled
  453. // fmt.Println(resp)
  454. // }
  455. //
  456. func (c *Snowball) GetJobManifestRequest(input *GetJobManifestInput) (req *request.Request, output *GetJobManifestOutput) {
  457. op := &request.Operation{
  458. Name: opGetJobManifest,
  459. HTTPMethod: "POST",
  460. HTTPPath: "/",
  461. }
  462. if input == nil {
  463. input = &GetJobManifestInput{}
  464. }
  465. req = c.newRequest(op, input, output)
  466. output = &GetJobManifestOutput{}
  467. req.Data = output
  468. return
  469. }
  470. // GetJobManifest API operation for Amazon Import/Export Snowball.
  471. //
  472. // Returns a link to an Amazon S3 presigned URL for the manifest file associated
  473. // with the specified JobId value. You can access the manifest file for up to
  474. // 60 minutes after this request has been made. To access the manifest file
  475. // after 60 minutes have passed, you'll have to make another call to the GetJobManifest
  476. // action.
  477. //
  478. // The manifest is an encrypted file that you can download after your job enters
  479. // the WithCustomer status. The manifest is decrypted by using the UnlockCode
  480. // code value, when you pass both values to the Snowball through the Snowball
  481. // client when the client is started for the first time.
  482. //
  483. // As a best practice, we recommend that you don't save a copy of an UnlockCode
  484. // value in the same location as the manifest file for that job. Saving these
  485. // separately helps prevent unauthorized parties from gaining access to the
  486. // Snowball associated with that job.
  487. //
  488. // Note that the credentials of a given job, including its manifest file and
  489. // unlock code, expire 90 days after the job is created.
  490. //
  491. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  492. // with awserr.Error's Code and Message methods to get detailed information about
  493. // the error.
  494. //
  495. // See the AWS API reference guide for Amazon Import/Export Snowball's
  496. // API operation GetJobManifest for usage and error information.
  497. //
  498. // Returned Error Codes:
  499. // * InvalidResourceException
  500. // The specified resource can't be found. Check the information you provided
  501. // in your last request, and try again.
  502. //
  503. // * InvalidJobStateException
  504. // The action can't be performed because the job's current state doesn't allow
  505. // that action to be performed.
  506. //
  507. func (c *Snowball) GetJobManifest(input *GetJobManifestInput) (*GetJobManifestOutput, error) {
  508. req, out := c.GetJobManifestRequest(input)
  509. err := req.Send()
  510. return out, err
  511. }
  512. const opGetJobUnlockCode = "GetJobUnlockCode"
  513. // GetJobUnlockCodeRequest generates a "aws/request.Request" representing the
  514. // client's request for the GetJobUnlockCode operation. The "output" return
  515. // value can be used to capture response data after the request's "Send" method
  516. // is called.
  517. //
  518. // See GetJobUnlockCode for usage and error information.
  519. //
  520. // Creating a request object using this method should be used when you want to inject
  521. // custom logic into the request's lifecycle using a custom handler, or if you want to
  522. // access properties on the request object before or after sending the request. If
  523. // you just want the service response, call the GetJobUnlockCode method directly
  524. // instead.
  525. //
  526. // Note: You must call the "Send" method on the returned request object in order
  527. // to execute the request.
  528. //
  529. // // Example sending a request using the GetJobUnlockCodeRequest method.
  530. // req, resp := client.GetJobUnlockCodeRequest(params)
  531. //
  532. // err := req.Send()
  533. // if err == nil { // resp is now filled
  534. // fmt.Println(resp)
  535. // }
  536. //
  537. func (c *Snowball) GetJobUnlockCodeRequest(input *GetJobUnlockCodeInput) (req *request.Request, output *GetJobUnlockCodeOutput) {
  538. op := &request.Operation{
  539. Name: opGetJobUnlockCode,
  540. HTTPMethod: "POST",
  541. HTTPPath: "/",
  542. }
  543. if input == nil {
  544. input = &GetJobUnlockCodeInput{}
  545. }
  546. req = c.newRequest(op, input, output)
  547. output = &GetJobUnlockCodeOutput{}
  548. req.Data = output
  549. return
  550. }
  551. // GetJobUnlockCode API operation for Amazon Import/Export Snowball.
  552. //
  553. // Returns the UnlockCode code value for the specified job. A particular UnlockCode
  554. // value can be accessed for up to 90 days after the associated job has been
  555. // created.
  556. //
  557. // The UnlockCode value is a 29-character code with 25 alphanumeric characters
  558. // and 4 hyphens. This code is used to decrypt the manifest file when it is
  559. // passed along with the manifest to the Snowball through the Snowball client
  560. // when the client is started for the first time.
  561. //
  562. // As a best practice, we recommend that you don't save a copy of the UnlockCode
  563. // in the same location as the manifest file for that job. Saving these separately
  564. // helps prevent unauthorized parties from gaining access to the Snowball associated
  565. // with that job.
  566. //
  567. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  568. // with awserr.Error's Code and Message methods to get detailed information about
  569. // the error.
  570. //
  571. // See the AWS API reference guide for Amazon Import/Export Snowball's
  572. // API operation GetJobUnlockCode for usage and error information.
  573. //
  574. // Returned Error Codes:
  575. // * InvalidResourceException
  576. // The specified resource can't be found. Check the information you provided
  577. // in your last request, and try again.
  578. //
  579. // * InvalidJobStateException
  580. // The action can't be performed because the job's current state doesn't allow
  581. // that action to be performed.
  582. //
  583. func (c *Snowball) GetJobUnlockCode(input *GetJobUnlockCodeInput) (*GetJobUnlockCodeOutput, error) {
  584. req, out := c.GetJobUnlockCodeRequest(input)
  585. err := req.Send()
  586. return out, err
  587. }
  588. const opGetSnowballUsage = "GetSnowballUsage"
  589. // GetSnowballUsageRequest generates a "aws/request.Request" representing the
  590. // client's request for the GetSnowballUsage operation. The "output" return
  591. // value can be used to capture response data after the request's "Send" method
  592. // is called.
  593. //
  594. // See GetSnowballUsage for usage and error information.
  595. //
  596. // Creating a request object using this method should be used when you want to inject
  597. // custom logic into the request's lifecycle using a custom handler, or if you want to
  598. // access properties on the request object before or after sending the request. If
  599. // you just want the service response, call the GetSnowballUsage method directly
  600. // instead.
  601. //
  602. // Note: You must call the "Send" method on the returned request object in order
  603. // to execute the request.
  604. //
  605. // // Example sending a request using the GetSnowballUsageRequest method.
  606. // req, resp := client.GetSnowballUsageRequest(params)
  607. //
  608. // err := req.Send()
  609. // if err == nil { // resp is now filled
  610. // fmt.Println(resp)
  611. // }
  612. //
  613. func (c *Snowball) GetSnowballUsageRequest(input *GetSnowballUsageInput) (req *request.Request, output *GetSnowballUsageOutput) {
  614. op := &request.Operation{
  615. Name: opGetSnowballUsage,
  616. HTTPMethod: "POST",
  617. HTTPPath: "/",
  618. }
  619. if input == nil {
  620. input = &GetSnowballUsageInput{}
  621. }
  622. req = c.newRequest(op, input, output)
  623. output = &GetSnowballUsageOutput{}
  624. req.Data = output
  625. return
  626. }
  627. // GetSnowballUsage API operation for Amazon Import/Export Snowball.
  628. //
  629. // Returns information about the Snowball service limit for your account, and
  630. // also the number of Snowballs your account has in use.
  631. //
  632. // Note that the default service limit for the number of Snowballs that you
  633. // can have at one time is 1. If you want to increase your service limit, contact
  634. // AWS Support.
  635. //
  636. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  637. // with awserr.Error's Code and Message methods to get detailed information about
  638. // the error.
  639. //
  640. // See the AWS API reference guide for Amazon Import/Export Snowball's
  641. // API operation GetSnowballUsage for usage and error information.
  642. func (c *Snowball) GetSnowballUsage(input *GetSnowballUsageInput) (*GetSnowballUsageOutput, error) {
  643. req, out := c.GetSnowballUsageRequest(input)
  644. err := req.Send()
  645. return out, err
  646. }
  647. const opListJobs = "ListJobs"
  648. // ListJobsRequest generates a "aws/request.Request" representing the
  649. // client's request for the ListJobs operation. The "output" return
  650. // value can be used to capture response data after the request's "Send" method
  651. // is called.
  652. //
  653. // See ListJobs for usage and error information.
  654. //
  655. // Creating a request object using this method should be used when you want to inject
  656. // custom logic into the request's lifecycle using a custom handler, or if you want to
  657. // access properties on the request object before or after sending the request. If
  658. // you just want the service response, call the ListJobs method directly
  659. // instead.
  660. //
  661. // Note: You must call the "Send" method on the returned request object in order
  662. // to execute the request.
  663. //
  664. // // Example sending a request using the ListJobsRequest method.
  665. // req, resp := client.ListJobsRequest(params)
  666. //
  667. // err := req.Send()
  668. // if err == nil { // resp is now filled
  669. // fmt.Println(resp)
  670. // }
  671. //
  672. func (c *Snowball) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) {
  673. op := &request.Operation{
  674. Name: opListJobs,
  675. HTTPMethod: "POST",
  676. HTTPPath: "/",
  677. Paginator: &request.Paginator{
  678. InputTokens: []string{"NextToken"},
  679. OutputTokens: []string{"NextToken"},
  680. LimitToken: "MaxResults",
  681. TruncationToken: "",
  682. },
  683. }
  684. if input == nil {
  685. input = &ListJobsInput{}
  686. }
  687. req = c.newRequest(op, input, output)
  688. output = &ListJobsOutput{}
  689. req.Data = output
  690. return
  691. }
  692. // ListJobs API operation for Amazon Import/Export Snowball.
  693. //
  694. // Returns an array of JobListEntry objects of the specified length. Each JobListEntry
  695. // object contains a job's state, a job's ID, and a value that indicates whether
  696. // the job is a job part, in the case of export jobs. Calling this API action
  697. // in one of the US regions will return jobs from the list of all jobs associated
  698. // with this account in all US regions.
  699. //
  700. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  701. // with awserr.Error's Code and Message methods to get detailed information about
  702. // the error.
  703. //
  704. // See the AWS API reference guide for Amazon Import/Export Snowball's
  705. // API operation ListJobs for usage and error information.
  706. func (c *Snowball) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) {
  707. req, out := c.ListJobsRequest(input)
  708. err := req.Send()
  709. return out, err
  710. }
  711. // ListJobsPages iterates over the pages of a ListJobs operation,
  712. // calling the "fn" function with the response data for each page. To stop
  713. // iterating, return false from the fn function.
  714. //
  715. // See ListJobs method for more information on how to use this operation.
  716. //
  717. // Note: This operation can generate multiple requests to a service.
  718. //
  719. // // Example iterating over at most 3 pages of a ListJobs operation.
  720. // pageNum := 0
  721. // err := client.ListJobsPages(params,
  722. // func(page *ListJobsOutput, lastPage bool) bool {
  723. // pageNum++
  724. // fmt.Println(page)
  725. // return pageNum <= 3
  726. // })
  727. //
  728. func (c *Snowball) ListJobsPages(input *ListJobsInput, fn func(p *ListJobsOutput, lastPage bool) (shouldContinue bool)) error {
  729. page, _ := c.ListJobsRequest(input)
  730. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  731. return page.EachPage(func(p interface{}, lastPage bool) bool {
  732. return fn(p.(*ListJobsOutput), lastPage)
  733. })
  734. }
  735. const opUpdateJob = "UpdateJob"
  736. // UpdateJobRequest generates a "aws/request.Request" representing the
  737. // client's request for the UpdateJob operation. The "output" return
  738. // value can be used to capture response data after the request's "Send" method
  739. // is called.
  740. //
  741. // See UpdateJob for usage and error information.
  742. //
  743. // Creating a request object using this method should be used when you want to inject
  744. // custom logic into the request's lifecycle using a custom handler, or if you want to
  745. // access properties on the request object before or after sending the request. If
  746. // you just want the service response, call the UpdateJob method directly
  747. // instead.
  748. //
  749. // Note: You must call the "Send" method on the returned request object in order
  750. // to execute the request.
  751. //
  752. // // Example sending a request using the UpdateJobRequest method.
  753. // req, resp := client.UpdateJobRequest(params)
  754. //
  755. // err := req.Send()
  756. // if err == nil { // resp is now filled
  757. // fmt.Println(resp)
  758. // }
  759. //
  760. func (c *Snowball) UpdateJobRequest(input *UpdateJobInput) (req *request.Request, output *UpdateJobOutput) {
  761. op := &request.Operation{
  762. Name: opUpdateJob,
  763. HTTPMethod: "POST",
  764. HTTPPath: "/",
  765. }
  766. if input == nil {
  767. input = &UpdateJobInput{}
  768. }
  769. req = c.newRequest(op, input, output)
  770. output = &UpdateJobOutput{}
  771. req.Data = output
  772. return
  773. }
  774. // UpdateJob API operation for Amazon Import/Export Snowball.
  775. //
  776. // While a job's JobState value is New, you can update some of the information
  777. // associated with a job. Once the job changes to a different job state, usually
  778. // within 60 minutes of the job being created, this action is no longer available.
  779. //
  780. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  781. // with awserr.Error's Code and Message methods to get detailed information about
  782. // the error.
  783. //
  784. // See the AWS API reference guide for Amazon Import/Export Snowball's
  785. // API operation UpdateJob for usage and error information.
  786. //
  787. // Returned Error Codes:
  788. // * InvalidResourceException
  789. // The specified resource can't be found. Check the information you provided
  790. // in your last request, and try again.
  791. //
  792. // * InvalidJobStateException
  793. // The action can't be performed because the job's current state doesn't allow
  794. // that action to be performed.
  795. //
  796. // * KMSRequestFailedException
  797. // The provided AWS Key Management Service key lacks the permissions to perform
  798. // the specified CreateJob or UpdateJob action.
  799. //
  800. func (c *Snowball) UpdateJob(input *UpdateJobInput) (*UpdateJobOutput, error) {
  801. req, out := c.UpdateJobRequest(input)
  802. err := req.Send()
  803. return out, err
  804. }
  805. // The address that you want the Snowball or Snowballs associated with a specific
  806. // job to be shipped to. Addresses are validated at the time of creation. The
  807. // address you provide must be located within the serviceable area of your region.
  808. // Although no individual elements of the Address are required, if the address
  809. // is invalid or unsupported, then an exception is thrown.
  810. type Address struct {
  811. _ struct{} `type:"structure"`
  812. // The unique ID for an address.
  813. AddressId *string `min:"40" type:"string"`
  814. // The city in an address that a Snowball is to be delivered to.
  815. City *string `min:"1" type:"string"`
  816. // The name of the company to receive a Snowball at an address.
  817. Company *string `min:"1" type:"string"`
  818. // The country in an address that a Snowball is to be delivered to.
  819. Country *string `min:"1" type:"string"`
  820. // A landmark listed in an address that a Snowball is to be delivered to.
  821. Landmark *string `min:"1" type:"string"`
  822. // The name of a person to receive a Snowball at an address.
  823. Name *string `min:"1" type:"string"`
  824. // The phone number associated with an address that a Snowball is to be delivered
  825. // to.
  826. PhoneNumber *string `min:"1" type:"string"`
  827. // The postal code in an address that a Snowball is to be delivered to.
  828. PostalCode *string `min:"1" type:"string"`
  829. // The prefecture or district in an address that a Snowball is to be delivered
  830. // to.
  831. PrefectureOrDistrict *string `min:"1" type:"string"`
  832. // The state or province in an address that a Snowball is to be delivered to.
  833. StateOrProvince *string `min:"1" type:"string"`
  834. // The first line in a street address that a Snowball is to be delivered to.
  835. Street1 *string `min:"1" type:"string"`
  836. // The second line in a street address that a Snowball is to be delivered to.
  837. Street2 *string `min:"1" type:"string"`
  838. // The third line in a street address that a Snowball is to be delivered to.
  839. Street3 *string `min:"1" type:"string"`
  840. }
  841. // String returns the string representation
  842. func (s Address) String() string {
  843. return awsutil.Prettify(s)
  844. }
  845. // GoString returns the string representation
  846. func (s Address) GoString() string {
  847. return s.String()
  848. }
  849. // Validate inspects the fields of the type to determine if they are valid.
  850. func (s *Address) Validate() error {
  851. invalidParams := request.ErrInvalidParams{Context: "Address"}
  852. if s.AddressId != nil && len(*s.AddressId) < 40 {
  853. invalidParams.Add(request.NewErrParamMinLen("AddressId", 40))
  854. }
  855. if s.City != nil && len(*s.City) < 1 {
  856. invalidParams.Add(request.NewErrParamMinLen("City", 1))
  857. }
  858. if s.Company != nil && len(*s.Company) < 1 {
  859. invalidParams.Add(request.NewErrParamMinLen("Company", 1))
  860. }
  861. if s.Country != nil && len(*s.Country) < 1 {
  862. invalidParams.Add(request.NewErrParamMinLen("Country", 1))
  863. }
  864. if s.Landmark != nil && len(*s.Landmark) < 1 {
  865. invalidParams.Add(request.NewErrParamMinLen("Landmark", 1))
  866. }
  867. if s.Name != nil && len(*s.Name) < 1 {
  868. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  869. }
  870. if s.PhoneNumber != nil && len(*s.PhoneNumber) < 1 {
  871. invalidParams.Add(request.NewErrParamMinLen("PhoneNumber", 1))
  872. }
  873. if s.PostalCode != nil && len(*s.PostalCode) < 1 {
  874. invalidParams.Add(request.NewErrParamMinLen("PostalCode", 1))
  875. }
  876. if s.PrefectureOrDistrict != nil && len(*s.PrefectureOrDistrict) < 1 {
  877. invalidParams.Add(request.NewErrParamMinLen("PrefectureOrDistrict", 1))
  878. }
  879. if s.StateOrProvince != nil && len(*s.StateOrProvince) < 1 {
  880. invalidParams.Add(request.NewErrParamMinLen("StateOrProvince", 1))
  881. }
  882. if s.Street1 != nil && len(*s.Street1) < 1 {
  883. invalidParams.Add(request.NewErrParamMinLen("Street1", 1))
  884. }
  885. if s.Street2 != nil && len(*s.Street2) < 1 {
  886. invalidParams.Add(request.NewErrParamMinLen("Street2", 1))
  887. }
  888. if s.Street3 != nil && len(*s.Street3) < 1 {
  889. invalidParams.Add(request.NewErrParamMinLen("Street3", 1))
  890. }
  891. if invalidParams.Len() > 0 {
  892. return invalidParams
  893. }
  894. return nil
  895. }
  896. type CancelJobInput struct {
  897. _ struct{} `type:"structure"`
  898. // The 39 character job ID for the job that you want to cancel, for example
  899. // JID123e4567-e89b-12d3-a456-426655440000.
  900. //
  901. // JobId is a required field
  902. JobId *string `min:"39" type:"string" required:"true"`
  903. }
  904. // String returns the string representation
  905. func (s CancelJobInput) String() string {
  906. return awsutil.Prettify(s)
  907. }
  908. // GoString returns the string representation
  909. func (s CancelJobInput) GoString() string {
  910. return s.String()
  911. }
  912. // Validate inspects the fields of the type to determine if they are valid.
  913. func (s *CancelJobInput) Validate() error {
  914. invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"}
  915. if s.JobId == nil {
  916. invalidParams.Add(request.NewErrParamRequired("JobId"))
  917. }
  918. if s.JobId != nil && len(*s.JobId) < 39 {
  919. invalidParams.Add(request.NewErrParamMinLen("JobId", 39))
  920. }
  921. if invalidParams.Len() > 0 {
  922. return invalidParams
  923. }
  924. return nil
  925. }
  926. type CancelJobOutput struct {
  927. _ struct{} `type:"structure"`
  928. }
  929. // String returns the string representation
  930. func (s CancelJobOutput) String() string {
  931. return awsutil.Prettify(s)
  932. }
  933. // GoString returns the string representation
  934. func (s CancelJobOutput) GoString() string {
  935. return s.String()
  936. }
  937. type CreateAddressInput struct {
  938. _ struct{} `type:"structure"`
  939. // The address that you want the Snowball shipped to.
  940. //
  941. // Address is a required field
  942. Address *Address `type:"structure" required:"true"`
  943. }
  944. // String returns the string representation
  945. func (s CreateAddressInput) String() string {
  946. return awsutil.Prettify(s)
  947. }
  948. // GoString returns the string representation
  949. func (s CreateAddressInput) GoString() string {
  950. return s.String()
  951. }
  952. // Validate inspects the fields of the type to determine if they are valid.
  953. func (s *CreateAddressInput) Validate() error {
  954. invalidParams := request.ErrInvalidParams{Context: "CreateAddressInput"}
  955. if s.Address == nil {
  956. invalidParams.Add(request.NewErrParamRequired("Address"))
  957. }
  958. if s.Address != nil {
  959. if err := s.Address.Validate(); err != nil {
  960. invalidParams.AddNested("Address", err.(request.ErrInvalidParams))
  961. }
  962. }
  963. if invalidParams.Len() > 0 {
  964. return invalidParams
  965. }
  966. return nil
  967. }
  968. type CreateAddressOutput struct {
  969. _ struct{} `type:"structure"`
  970. // The automatically generated ID for a specific address. You'll use this ID
  971. // when you create a job to specify which address you want the Snowball for
  972. // that job shipped to.
  973. AddressId *string `min:"1" type:"string"`
  974. }
  975. // String returns the string representation
  976. func (s CreateAddressOutput) String() string {
  977. return awsutil.Prettify(s)
  978. }
  979. // GoString returns the string representation
  980. func (s CreateAddressOutput) GoString() string {
  981. return s.String()
  982. }
  983. type CreateJobInput struct {
  984. _ struct{} `type:"structure"`
  985. // The ID for the address that you want the Snowball shipped to.
  986. //
  987. // AddressId is a required field
  988. AddressId *string `min:"40" type:"string" required:"true"`
  989. // Defines an optional description of this specific job, for example Important
  990. // Photos 2016-08-11.
  991. Description *string `min:"1" type:"string"`
  992. // Defines the type of job that you're creating.
  993. //
  994. // JobType is a required field
  995. JobType *string `type:"string" required:"true" enum:"JobType"`
  996. // The KmsKeyARN that you want to associate with this job. KmsKeyARNs are created
  997. // using the CreateKey (http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html)
  998. // AWS Key Management Service (KMS) API action.
  999. KmsKeyARN *string `type:"string"`
  1000. // Defines the Amazon Simple Notification Service (Amazon SNS) notification
  1001. // settings for this job.
  1002. Notification *Notification `type:"structure"`
  1003. // Defines the Amazon S3 buckets associated with this job.
  1004. //
  1005. // With IMPORT jobs, you specify the bucket or buckets that your transferred
  1006. // data will be imported into.
  1007. //
  1008. // With EXPORT jobs, you specify the bucket or buckets that your transferred
  1009. // data will be exported from. Optionally, you can also specify a KeyRange value.
  1010. // If you choose to export a range, you define the length of the range by providing
  1011. // either an inclusive BeginMarker value, an inclusive EndMarker value, or both.
  1012. // Ranges are UTF-8 binary sorted.
  1013. //
  1014. // Resources is a required field
  1015. Resources *JobResource `type:"structure" required:"true"`
  1016. // The RoleARN that you want to associate with this job. RoleArns are created
  1017. // using the CreateRole (http://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html)
  1018. // AWS Identity and Access Management (IAM) API action.
  1019. //
  1020. // RoleARN is a required field
  1021. RoleARN *string `type:"string" required:"true"`
  1022. // The shipping speed for this job. Note that this speed does not dictate how
  1023. // soon you'll get the Snowball, rather it represents how quickly the Snowball
  1024. // moves to its destination while in transit. Regional shipping speeds are as
  1025. // follows:
  1026. //
  1027. // * In Australia, you have access to express shipping. Typically, Snowballs
  1028. // shipped express are delivered in about a day.
  1029. //
  1030. // * In the European Union (EU), you have access to express shipping. Typically,
  1031. // Snowballs shipped express are delivered in about a day. In addition, most
  1032. // countries in the EU have access to standard shipping, which typically
  1033. // takes less than a week, one way.
  1034. //
  1035. // * In India, Snowballs are delivered in one to seven days.
  1036. //
  1037. // * In the US, you have access to one-day shipping and two-day shipping.
  1038. //
  1039. // ShippingOption is a required field
  1040. ShippingOption *string `type:"string" required:"true" enum:"ShippingOption"`
  1041. // If your job is being created in one of the US regions, you have the option
  1042. // of specifying what size Snowball you'd like for this job. In all other regions,
  1043. // Snowballs come with 80 TB in storage capacity.
  1044. SnowballCapacityPreference *string `type:"string" enum:"Capacity"`
  1045. }
  1046. // String returns the string representation
  1047. func (s CreateJobInput) String() string {
  1048. return awsutil.Prettify(s)
  1049. }
  1050. // GoString returns the string representation
  1051. func (s CreateJobInput) GoString() string {
  1052. return s.String()
  1053. }
  1054. // Validate inspects the fields of the type to determine if they are valid.
  1055. func (s *CreateJobInput) Validate() error {
  1056. invalidParams := request.ErrInvalidParams{Context: "CreateJobInput"}
  1057. if s.AddressId == nil {
  1058. invalidParams.Add(request.NewErrParamRequired("AddressId"))
  1059. }
  1060. if s.AddressId != nil && len(*s.AddressId) < 40 {
  1061. invalidParams.Add(request.NewErrParamMinLen("AddressId", 40))
  1062. }
  1063. if s.Description != nil && len(*s.Description) < 1 {
  1064. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  1065. }
  1066. if s.JobType == nil {
  1067. invalidParams.Add(request.NewErrParamRequired("JobType"))
  1068. }
  1069. if s.Resources == nil {
  1070. invalidParams.Add(request.NewErrParamRequired("Resources"))
  1071. }
  1072. if s.RoleARN == nil {
  1073. invalidParams.Add(request.NewErrParamRequired("RoleARN"))
  1074. }
  1075. if s.ShippingOption == nil {
  1076. invalidParams.Add(request.NewErrParamRequired("ShippingOption"))
  1077. }
  1078. if s.Resources != nil {
  1079. if err := s.Resources.Validate(); err != nil {
  1080. invalidParams.AddNested("Resources", err.(request.ErrInvalidParams))
  1081. }
  1082. }
  1083. if invalidParams.Len() > 0 {
  1084. return invalidParams
  1085. }
  1086. return nil
  1087. }
  1088. type CreateJobOutput struct {
  1089. _ struct{} `type:"structure"`
  1090. // The automatically generated ID for a job, for example JID123e4567-e89b-12d3-a456-426655440000.
  1091. JobId *string `min:"39" type:"string"`
  1092. }
  1093. // String returns the string representation
  1094. func (s CreateJobOutput) String() string {
  1095. return awsutil.Prettify(s)
  1096. }
  1097. // GoString returns the string representation
  1098. func (s CreateJobOutput) GoString() string {
  1099. return s.String()
  1100. }
  1101. // Defines the real-time status of a Snowball's data transfer while the appliance
  1102. // is at AWS. Note that this data is only available while a job has a JobState
  1103. // value of InProgress, for both import and export jobs.
  1104. type DataTransfer struct {
  1105. _ struct{} `type:"structure"`
  1106. // The number of bytes transferred between a Snowball and Amazon S3.
  1107. BytesTransferred *int64 `type:"long"`
  1108. // The number of objects transferred between a Snowball and Amazon S3.
  1109. ObjectsTransferred *int64 `type:"long"`
  1110. // The total bytes of data for a transfer between a Snowball and Amazon S3.
  1111. // This value is set to 0 (zero) until all the keys that will be transferred
  1112. // have been listed.
  1113. TotalBytes *int64 `type:"long"`
  1114. // The total number of objects for a transfer between a Snowball and Amazon
  1115. // S3. This value is set to 0 (zero) until all the keys that will be transferred
  1116. // have been listed.
  1117. TotalObjects *int64 `type:"long"`
  1118. }
  1119. // String returns the string representation
  1120. func (s DataTransfer) String() string {
  1121. return awsutil.Prettify(s)
  1122. }
  1123. // GoString returns the string representation
  1124. func (s DataTransfer) GoString() string {
  1125. return s.String()
  1126. }
  1127. type DescribeAddressInput struct {
  1128. _ struct{} `type:"structure"`
  1129. // The automatically generated ID for a specific address.
  1130. //
  1131. // AddressId is a required field
  1132. AddressId *string `min:"40" type:"string" required:"true"`
  1133. }
  1134. // String returns the string representation
  1135. func (s DescribeAddressInput) String() string {
  1136. return awsutil.Prettify(s)
  1137. }
  1138. // GoString returns the string representation
  1139. func (s DescribeAddressInput) GoString() string {
  1140. return s.String()
  1141. }
  1142. // Validate inspects the fields of the type to determine if they are valid.
  1143. func (s *DescribeAddressInput) Validate() error {
  1144. invalidParams := request.ErrInvalidParams{Context: "DescribeAddressInput"}
  1145. if s.AddressId == nil {
  1146. invalidParams.Add(request.NewErrParamRequired("AddressId"))
  1147. }
  1148. if s.AddressId != nil && len(*s.AddressId) < 40 {
  1149. invalidParams.Add(request.NewErrParamMinLen("AddressId", 40))
  1150. }
  1151. if invalidParams.Len() > 0 {
  1152. return invalidParams
  1153. }
  1154. return nil
  1155. }
  1156. type DescribeAddressOutput struct {
  1157. _ struct{} `type:"structure"`
  1158. // The address that you want the Snowball or Snowballs associated with a specific
  1159. // job to be shipped to.
  1160. Address *Address `type:"structure"`
  1161. }
  1162. // String returns the string representation
  1163. func (s DescribeAddressOutput) String() string {
  1164. return awsutil.Prettify(s)
  1165. }
  1166. // GoString returns the string representation
  1167. func (s DescribeAddressOutput) GoString() string {
  1168. return s.String()
  1169. }
  1170. type DescribeAddressesInput struct {
  1171. _ struct{} `type:"structure"`
  1172. // The number of ADDRESS objects to return.
  1173. MaxResults *int64 `type:"integer"`
  1174. // HTTP requests are stateless. To identify what object comes "next" in the
  1175. // list of ADDRESS objects, you have the option of specifying a value for NextToken
  1176. // as the starting point for your list of returned addresses.
  1177. NextToken *string `min:"1" type:"string"`
  1178. }
  1179. // String returns the string representation
  1180. func (s DescribeAddressesInput) String() string {
  1181. return awsutil.Prettify(s)
  1182. }
  1183. // GoString returns the string representation
  1184. func (s DescribeAddressesInput) GoString() string {
  1185. return s.String()
  1186. }
  1187. // Validate inspects the fields of the type to determine if they are valid.
  1188. func (s *DescribeAddressesInput) Validate() error {
  1189. invalidParams := request.ErrInvalidParams{Context: "DescribeAddressesInput"}
  1190. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1191. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1192. }
  1193. if invalidParams.Len() > 0 {
  1194. return invalidParams
  1195. }
  1196. return nil
  1197. }
  1198. type DescribeAddressesOutput struct {
  1199. _ struct{} `type:"structure"`
  1200. // The Snowball shipping addresses that were created for this account.
  1201. Addresses []*Address `type:"list"`
  1202. // HTTP requests are stateless. If you use the automatically generated NextToken
  1203. // value in your next DescribeAddresses call, your list of returned addresses
  1204. // will start from this point in the array.
  1205. NextToken *string `min:"1" type:"string"`
  1206. }
  1207. // String returns the string representation
  1208. func (s DescribeAddressesOutput) String() string {
  1209. return awsutil.Prettify(s)
  1210. }
  1211. // GoString returns the string representation
  1212. func (s DescribeAddressesOutput) GoString() string {
  1213. return s.String()
  1214. }
  1215. type DescribeJobInput struct {
  1216. _ struct{} `type:"structure"`
  1217. // The automatically generated ID for a job, for example JID123e4567-e89b-12d3-a456-426655440000.
  1218. //
  1219. // JobId is a required field
  1220. JobId *string `min:"39" type:"string" required:"true"`
  1221. }
  1222. // String returns the string representation
  1223. func (s DescribeJobInput) String() string {
  1224. return awsutil.Prettify(s)
  1225. }
  1226. // GoString returns the string representation
  1227. func (s DescribeJobInput) GoString() string {
  1228. return s.String()
  1229. }
  1230. // Validate inspects the fields of the type to determine if they are valid.
  1231. func (s *DescribeJobInput) Validate() error {
  1232. invalidParams := request.ErrInvalidParams{Context: "DescribeJobInput"}
  1233. if s.JobId == nil {
  1234. invalidParams.Add(request.NewErrParamRequired("JobId"))
  1235. }
  1236. if s.JobId != nil && len(*s.JobId) < 39 {
  1237. invalidParams.Add(request.NewErrParamMinLen("JobId", 39))
  1238. }
  1239. if invalidParams.Len() > 0 {
  1240. return invalidParams
  1241. }
  1242. return nil
  1243. }
  1244. type DescribeJobOutput struct {
  1245. _ struct{} `type:"structure"`
  1246. // Information about a specific job, including shipping information, job status,
  1247. // and other important metadata.
  1248. JobMetadata *JobMetadata `type:"structure"`
  1249. // Information about a specific job part (in the case of an export job), including
  1250. // shipping information, job status, and other important metadata.
  1251. SubJobMetadata []*JobMetadata `type:"list"`
  1252. }
  1253. // String returns the string representation
  1254. func (s DescribeJobOutput) String() string {
  1255. return awsutil.Prettify(s)
  1256. }
  1257. // GoString returns the string representation
  1258. func (s DescribeJobOutput) GoString() string {
  1259. return s.String()
  1260. }
  1261. type GetJobManifestInput struct {
  1262. _ struct{} `type:"structure"`
  1263. // The ID for a job that you want to get the manifest file for, for example
  1264. // JID123e4567-e89b-12d3-a456-426655440000.
  1265. //
  1266. // JobId is a required field
  1267. JobId *string `min:"39" type:"string" required:"true"`
  1268. }
  1269. // String returns the string representation
  1270. func (s GetJobManifestInput) String() string {
  1271. return awsutil.Prettify(s)
  1272. }
  1273. // GoString returns the string representation
  1274. func (s GetJobManifestInput) GoString() string {
  1275. return s.String()
  1276. }
  1277. // Validate inspects the fields of the type to determine if they are valid.
  1278. func (s *GetJobManifestInput) Validate() error {
  1279. invalidParams := request.ErrInvalidParams{Context: "GetJobManifestInput"}
  1280. if s.JobId == nil {
  1281. invalidParams.Add(request.NewErrParamRequired("JobId"))
  1282. }
  1283. if s.JobId != nil && len(*s.JobId) < 39 {
  1284. invalidParams.Add(request.NewErrParamMinLen("JobId", 39))
  1285. }
  1286. if invalidParams.Len() > 0 {
  1287. return invalidParams
  1288. }
  1289. return nil
  1290. }
  1291. type GetJobManifestOutput struct {
  1292. _ struct{} `type:"structure"`
  1293. // The Amazon S3 presigned URL for the manifest file associated with the specified
  1294. // JobId value.
  1295. ManifestURI *string `min:"1" type:"string"`
  1296. }
  1297. // String returns the string representation
  1298. func (s GetJobManifestOutput) String() string {
  1299. return awsutil.Prettify(s)
  1300. }
  1301. // GoString returns the string representation
  1302. func (s GetJobManifestOutput) GoString() string {
  1303. return s.String()
  1304. }
  1305. type GetJobUnlockCodeInput struct {
  1306. _ struct{} `type:"structure"`
  1307. // The ID for the job that you want to get the UnlockCode value for, for example
  1308. // JID123e4567-e89b-12d3-a456-426655440000.
  1309. //
  1310. // JobId is a required field
  1311. JobId *string `min:"39" type:"string" required:"true"`
  1312. }
  1313. // String returns the string representation
  1314. func (s GetJobUnlockCodeInput) String() string {
  1315. return awsutil.Prettify(s)
  1316. }
  1317. // GoString returns the string representation
  1318. func (s GetJobUnlockCodeInput) GoString() string {
  1319. return s.String()
  1320. }
  1321. // Validate inspects the fields of the type to determine if they are valid.
  1322. func (s *GetJobUnlockCodeInput) Validate() error {
  1323. invalidParams := request.ErrInvalidParams{Context: "GetJobUnlockCodeInput"}
  1324. if s.JobId == nil {
  1325. invalidParams.Add(request.NewErrParamRequired("JobId"))
  1326. }
  1327. if s.JobId != nil && len(*s.JobId) < 39 {
  1328. invalidParams.Add(request.NewErrParamMinLen("JobId", 39))
  1329. }
  1330. if invalidParams.Len() > 0 {
  1331. return invalidParams
  1332. }
  1333. return nil
  1334. }
  1335. type GetJobUnlockCodeOutput struct {
  1336. _ struct{} `type:"structure"`
  1337. // The UnlockCode value for the specified job. The UnlockCode value can be accessed
  1338. // for up to 90 days after the job has been created.
  1339. UnlockCode *string `min:"1" type:"string"`
  1340. }
  1341. // String returns the string representation
  1342. func (s GetJobUnlockCodeOutput) String() string {
  1343. return awsutil.Prettify(s)
  1344. }
  1345. // GoString returns the string representation
  1346. func (s GetJobUnlockCodeOutput) GoString() string {
  1347. return s.String()
  1348. }
  1349. type GetSnowballUsageInput struct {
  1350. _ struct{} `type:"structure"`
  1351. }
  1352. // String returns the string representation
  1353. func (s GetSnowballUsageInput) String() string {
  1354. return awsutil.Prettify(s)
  1355. }
  1356. // GoString returns the string representation
  1357. func (s GetSnowballUsageInput) GoString() string {
  1358. return s.String()
  1359. }
  1360. type GetSnowballUsageOutput struct {
  1361. _ struct{} `type:"structure"`
  1362. // The service limit for number of Snowballs this account can have at once.
  1363. // The default service limit is 1 (one).
  1364. SnowballLimit *int64 `type:"integer"`
  1365. // The number of Snowballs that this account is currently using.
  1366. SnowballsInUse *int64 `type:"integer"`
  1367. }
  1368. // String returns the string representation
  1369. func (s GetSnowballUsageOutput) String() string {
  1370. return awsutil.Prettify(s)
  1371. }
  1372. // GoString returns the string representation
  1373. func (s GetSnowballUsageOutput) GoString() string {
  1374. return s.String()
  1375. }
  1376. // Each JobListEntry object contains a job's state, a job's ID, and a value
  1377. // that indicates whether the job is a job part, in the case of an export job.
  1378. type JobListEntry struct {
  1379. _ struct{} `type:"structure"`
  1380. // A value that indicates that this job is a master job. A master job represents
  1381. // a successful request to create an export job. Master jobs aren't associated
  1382. // with any Snowballs. Instead, each master job will have at least one job part,
  1383. // and each job part is associated with a Snowball. It might take some time
  1384. // before the job parts associated with a particular master job are listed,
  1385. // because they are created after the master job is created.
  1386. IsMaster *bool `type:"boolean"`
  1387. // The automatically generated ID for a job, for example JID123e4567-e89b-12d3-a456-426655440000.
  1388. JobId *string `min:"1" type:"string"`
  1389. // The current state of this job.
  1390. JobState *string `type:"string" enum:"JobState"`
  1391. }
  1392. // String returns the string representation
  1393. func (s JobListEntry) String() string {
  1394. return awsutil.Prettify(s)
  1395. }
  1396. // GoString returns the string representation
  1397. func (s JobListEntry) GoString() string {
  1398. return s.String()
  1399. }
  1400. // Contains job logs. Whenever Snowball is used to import data into or export
  1401. // data out of Amazon S3, you'll have the option of downloading a PDF job report.
  1402. // Job logs are returned as a part of the response syntax of the DescribeJob
  1403. // action in the JobMetadata data type. The job logs can be accessed for up
  1404. // to 60 minutes after this request has been made. To access any of the job
  1405. // logs after 60 minutes have passed, you'll have to make another call to the
  1406. // DescribeJob action.
  1407. //
  1408. // For import jobs, the PDF job report becomes available at the end of the import
  1409. // process. For export jobs, your job report typically becomes available while
  1410. // the Snowball for your job part is being delivered to you.
  1411. //
  1412. // The job report provides you insight into the state of your Amazon S3 data
  1413. // transfer. The report includes details about your job or job part for your
  1414. // records.
  1415. //
  1416. // For deeper visibility into the status of your transferred objects, you can
  1417. // look at the two associated logs: a success log and a failure log. The logs
  1418. // are saved in comma-separated value (CSV) format, and the name of each log
  1419. // includes the ID of the job or job part that the log describes.
  1420. type JobLogs struct {
  1421. _ struct{} `type:"structure"`
  1422. // A link to an Amazon S3 presigned URL where the job completion report is located.
  1423. JobCompletionReportURI *string `min:"1" type:"string"`
  1424. // A link to an Amazon S3 presigned URL where the job failure log is located.
  1425. JobFailureLogURI *string `min:"1" type:"string"`
  1426. // A link to an Amazon S3 presigned URL where the job success log is located.
  1427. JobSuccessLogURI *string `min:"1" type:"string"`
  1428. }
  1429. // String returns the string representation
  1430. func (s JobLogs) String() string {
  1431. return awsutil.Prettify(s)
  1432. }
  1433. // GoString returns the string representation
  1434. func (s JobLogs) GoString() string {
  1435. return s.String()
  1436. }
  1437. // Contains information about a specific job including shipping information,
  1438. // job status, and other important metadata. This information is returned as
  1439. // a part of the response syntax of the DescribeJob action.
  1440. type JobMetadata struct {
  1441. _ struct{} `type:"structure"`
  1442. // The ID for the address that you want the Snowball shipped to.
  1443. AddressId *string `min:"40" type:"string"`
  1444. // The creation date for this job.
  1445. CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1446. // A value that defines the real-time status of a Snowball's data transfer while
  1447. // the appliance is at AWS. Note that this data is only available while a job
  1448. // has a JobState value of InProgress, for both import and export jobs.
  1449. DataTransferProgress *DataTransfer `type:"structure"`
  1450. // The description of the job, provided at job creation.
  1451. Description *string `min:"1" type:"string"`
  1452. // The automatically generated ID for a job, for example JID123e4567-e89b-12d3-a456-426655440000.
  1453. JobId *string `min:"1" type:"string"`
  1454. // Links to Amazon S3 presigned URLs for the job report and logs. For import
  1455. // jobs, the PDF job report becomes available at the end of the import process.
  1456. // For export jobs, your job report typically becomes available while the Snowball
  1457. // for your job part is being delivered to you.
  1458. JobLogInfo *JobLogs `type:"structure"`
  1459. // The current state of the jobs.
  1460. JobState *string `type:"string" enum:"JobState"`
  1461. // The type of job.
  1462. JobType *string `type:"string" enum:"JobType"`
  1463. // The Amazon Resource Name (ARN) for the AWS Key Management Service (AWS KMS)
  1464. // key associated with this job. This ARN was created using the CreateKey API
  1465. // action in AWS KMS.
  1466. KmsKeyARN *string `type:"string"`
  1467. // The Amazon Simple Notification Service (Amazon SNS) notification settings
  1468. // associated with a specific job. The Notification object is returned as a
  1469. // part of the response syntax of the DescribeJob action in the JobMetadata
  1470. // data type.
  1471. Notification *Notification `type:"structure"`
  1472. // An array of S3Resource objects. Each S3Resource object represents an Amazon
  1473. // S3 bucket that your transferred data will be exported from or imported into.
  1474. Resources *JobResource `type:"structure"`
  1475. // The role ARN associated with this job. This ARN was created using the CreateRole
  1476. // API action in AWS Identity and Access Management (IAM).
  1477. RoleARN *string `type:"string"`
  1478. // A job's shipping information, including inbound and outbound tracking numbers
  1479. // and shipping speed options.
  1480. ShippingDetails *ShippingDetails `type:"structure"`
  1481. // The Snowball capacity preference for this job, specified at job creation.
  1482. // In US regions, you can choose between 50 TB and 80 TB Snowballs. All other
  1483. // regions use 80 TB capacity Snowballs.
  1484. SnowballCapacityPreference *string `type:"string" enum:"Capacity"`
  1485. }
  1486. // String returns the string representation
  1487. func (s JobMetadata) String() string {
  1488. return awsutil.Prettify(s)
  1489. }
  1490. // GoString returns the string representation
  1491. func (s JobMetadata) GoString() string {
  1492. return s.String()
  1493. }
  1494. // Contains an array of S3Resource objects. Each S3Resource object represents
  1495. // an Amazon S3 bucket that your transferred data will be exported from or imported
  1496. // into.
  1497. type JobResource struct {
  1498. _ struct{} `type:"structure"`
  1499. // An array of S3Resource objects.
  1500. S3Resources []*S3Resource `type:"list"`
  1501. }
  1502. // String returns the string representation
  1503. func (s JobResource) String() string {
  1504. return awsutil.Prettify(s)
  1505. }
  1506. // GoString returns the string representation
  1507. func (s JobResource) GoString() string {
  1508. return s.String()
  1509. }
  1510. // Validate inspects the fields of the type to determine if they are valid.
  1511. func (s *JobResource) Validate() error {
  1512. invalidParams := request.ErrInvalidParams{Context: "JobResource"}
  1513. if s.S3Resources != nil {
  1514. for i, v := range s.S3Resources {
  1515. if v == nil {
  1516. continue
  1517. }
  1518. if err := v.Validate(); err != nil {
  1519. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3Resources", i), err.(request.ErrInvalidParams))
  1520. }
  1521. }
  1522. }
  1523. if invalidParams.Len() > 0 {
  1524. return invalidParams
  1525. }
  1526. return nil
  1527. }
  1528. // Contains a key range. For export jobs, a S3Resource object can have an optional
  1529. // KeyRange value. The length of the range is defined at job creation, and has
  1530. // either an inclusive BeginMarker, an inclusive EndMarker, or both. Ranges
  1531. // are UTF-8 binary sorted.
  1532. type KeyRange struct {
  1533. _ struct{} `type:"structure"`
  1534. // The key that starts an optional key range for an export job. Ranges are inclusive
  1535. // and UTF-8 binary sorted.
  1536. BeginMarker *string `min:"1" type:"string"`
  1537. // The key that ends an optional key range for an export job. Ranges are inclusive
  1538. // and UTF-8 binary sorted.
  1539. EndMarker *string `min:"1" type:"string"`
  1540. }
  1541. // String returns the string representation
  1542. func (s KeyRange) String() string {
  1543. return awsutil.Prettify(s)
  1544. }
  1545. // GoString returns the string representation
  1546. func (s KeyRange) GoString() string {
  1547. return s.String()
  1548. }
  1549. // Validate inspects the fields of the type to determine if they are valid.
  1550. func (s *KeyRange) Validate() error {
  1551. invalidParams := request.ErrInvalidParams{Context: "KeyRange"}
  1552. if s.BeginMarker != nil && len(*s.BeginMarker) < 1 {
  1553. invalidParams.Add(request.NewErrParamMinLen("BeginMarker", 1))
  1554. }
  1555. if s.EndMarker != nil && len(*s.EndMarker) < 1 {
  1556. invalidParams.Add(request.NewErrParamMinLen("EndMarker", 1))
  1557. }
  1558. if invalidParams.Len() > 0 {
  1559. return invalidParams
  1560. }
  1561. return nil
  1562. }
  1563. type ListJobsInput struct {
  1564. _ struct{} `type:"structure"`
  1565. // The number of JobListEntry objects to return.
  1566. MaxResults *int64 `type:"integer"`
  1567. // HTTP requests are stateless. To identify what object comes "next" in the
  1568. // list of JobListEntry objects, you have the option of specifying NextToken
  1569. // as the starting point for your returned list.
  1570. NextToken *string `min:"1" type:"string"`
  1571. }
  1572. // String returns the string representation
  1573. func (s ListJobsInput) String() string {
  1574. return awsutil.Prettify(s)
  1575. }
  1576. // GoString returns the string representation
  1577. func (s ListJobsInput) GoString() string {
  1578. return s.String()
  1579. }
  1580. // Validate inspects the fields of the type to determine if they are valid.
  1581. func (s *ListJobsInput) Validate() error {
  1582. invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"}
  1583. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1584. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1585. }
  1586. if invalidParams.Len() > 0 {
  1587. return invalidParams
  1588. }
  1589. return nil
  1590. }
  1591. type ListJobsOutput struct {
  1592. _ struct{} `type:"structure"`
  1593. // Each JobListEntry object contains a job's state, a job's ID, and a value
  1594. // that indicates whether the job is a job part, in the case of export jobs.
  1595. JobListEntries []*JobListEntry `type:"list"`
  1596. // HTTP requests are stateless. If you use this automatically generated NextToken
  1597. // value in your next ListJobs call, your returned JobListEntry objects will
  1598. // start from this point in the array.
  1599. NextToken *string `min:"1" type:"string"`
  1600. }
  1601. // String returns the string representation
  1602. func (s ListJobsOutput) String() string {
  1603. return awsutil.Prettify(s)
  1604. }
  1605. // GoString returns the string representation
  1606. func (s ListJobsOutput) GoString() string {
  1607. return s.String()
  1608. }
  1609. // The Amazon Simple Notification Service (Amazon SNS) notification settings
  1610. // associated with a specific job. The Notification object is returned as a
  1611. // part of the response syntax of the DescribeJob action in the JobMetadata
  1612. // data type.
  1613. //
  1614. // When the notification settings are defined during job creation, you can choose
  1615. // to notify based on a specific set of job states using the JobStatesToNotify
  1616. // array of strings, or you can specify that you want to have Amazon SNS notifications
  1617. // sent out for all job states with NotifyAll set to true.
  1618. type Notification struct {
  1619. _ struct{} `type:"structure"`
  1620. // The list of job states that will trigger a notification for this job.
  1621. JobStatesToNotify []*string `type:"list"`
  1622. // Any change in job state will trigger a notification for this job.
  1623. NotifyAll *bool `type:"boolean"`
  1624. // The new SNS TopicArn that you want to associate with this job. You can create
  1625. // Amazon Resource Names (ARNs) for topics by using the CreateTopic (http://docs.aws.amazon.com/sns/latest/api/API_CreateTopic.html)
  1626. // Amazon SNS API action.
  1627. //
  1628. // Note that you can subscribe email addresses to an Amazon SNS topic through
  1629. // the AWS Management Console, or by using the Subscribe (http://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html)
  1630. // AWS Simple Notification Service (SNS) API action.
  1631. SnsTopicARN *string `type:"string"`
  1632. }
  1633. // String returns the string representation
  1634. func (s Notification) String() string {
  1635. return awsutil.Prettify(s)
  1636. }
  1637. // GoString returns the string representation
  1638. func (s Notification) GoString() string {
  1639. return s.String()
  1640. }
  1641. // Each S3Resource object represents an Amazon S3 bucket that your transferred
  1642. // data will be exported from or imported into. For export jobs, this object
  1643. // can have an optional KeyRange value. The length of the range is defined at
  1644. // job creation, and has either an inclusive BeginMarker, an inclusive EndMarker,
  1645. // or both. Ranges are UTF-8 binary sorted.
  1646. type S3Resource struct {
  1647. _ struct{} `type:"structure"`
  1648. // The Amazon Resource Name (ARN) of an Amazon S3 bucket.
  1649. BucketArn *string `type:"string"`
  1650. // For export jobs, you can provide an optional KeyRange within a specific Amazon
  1651. // S3 bucket. The length of the range is defined at job creation, and has either
  1652. // an inclusive BeginMarker, an inclusive EndMarker, or both. Ranges are UTF-8
  1653. // binary sorted.
  1654. KeyRange *KeyRange `type:"structure"`
  1655. }
  1656. // String returns the string representation
  1657. func (s S3Resource) String() string {
  1658. return awsutil.Prettify(s)
  1659. }
  1660. // GoString returns the string representation
  1661. func (s S3Resource) GoString() string {
  1662. return s.String()
  1663. }
  1664. // Validate inspects the fields of the type to determine if they are valid.
  1665. func (s *S3Resource) Validate() error {
  1666. invalidParams := request.ErrInvalidParams{Context: "S3Resource"}
  1667. if s.KeyRange != nil {
  1668. if err := s.KeyRange.Validate(); err != nil {
  1669. invalidParams.AddNested("KeyRange", err.(request.ErrInvalidParams))
  1670. }
  1671. }
  1672. if invalidParams.Len() > 0 {
  1673. return invalidParams
  1674. }
  1675. return nil
  1676. }
  1677. // The Status and TrackingNumber information for an inbound or outbound shipment.
  1678. type Shipment struct {
  1679. _ struct{} `type:"structure"`
  1680. // Status information for a shipment. Valid statuses include NEW, IN_TRANSIT,
  1681. // and DELIVERED.
  1682. Status *string `min:"1" type:"string"`
  1683. // The tracking number for this job. Using this tracking number with your region's
  1684. // carrier's website, you can track a Snowball as the carrier transports it.
  1685. //
  1686. // For India, the carrier is Amazon Logistics. For all other regions, UPS is
  1687. // the carrier.
  1688. TrackingNumber *string `min:"1" type:"string"`
  1689. }
  1690. // String returns the string representation
  1691. func (s Shipment) String() string {
  1692. return awsutil.Prettify(s)
  1693. }
  1694. // GoString returns the string representation
  1695. func (s Shipment) GoString() string {
  1696. return s.String()
  1697. }
  1698. // A job's shipping information, including inbound and outbound tracking numbers
  1699. // and shipping speed options.
  1700. type ShippingDetails struct {
  1701. _ struct{} `type:"structure"`
  1702. // The Status and TrackingNumber values for a Snowball being delivered to the
  1703. // address that you specified for a particular job.
  1704. InboundShipment *Shipment `type:"structure"`
  1705. // The Status and TrackingNumber values for a Snowball being returned to AWS
  1706. // for a particular job.
  1707. OutboundShipment *Shipment `type:"structure"`
  1708. // The shipping speed for a particular job. Note that this speed does not dictate
  1709. // how soon you'll get the Snowball from the job's creation date. This speed
  1710. // represents how quickly it moves to its destination while in transit. Regional
  1711. // shipping speeds are as follows:
  1712. //
  1713. // * In Australia, you have access to express shipping. Typically, Snowballs
  1714. // shipped express are delivered in about a day.
  1715. //
  1716. // * In the European Union (EU), you have access to express shipping. Typically,
  1717. // Snowballs shipped express are delivered in about a day. In addition, most
  1718. // countries in the EU have access to standard shipping, which typically
  1719. // takes less than a week, one way.
  1720. //
  1721. // * In India, Snowballs are delivered in one to seven days.
  1722. //
  1723. // * In the United States of America (US), you have access to one-day shipping
  1724. // and two-day shipping.
  1725. ShippingOption *string `type:"string" enum:"ShippingOption"`
  1726. }
  1727. // String returns the string representation
  1728. func (s ShippingDetails) String() string {
  1729. return awsutil.Prettify(s)
  1730. }
  1731. // GoString returns the string representation
  1732. func (s ShippingDetails) GoString() string {
  1733. return s.String()
  1734. }
  1735. type UpdateJobInput struct {
  1736. _ struct{} `type:"structure"`
  1737. // The ID of the updated Address object.
  1738. AddressId *string `min:"40" type:"string"`
  1739. // The updated description of this job's JobMetadata object.
  1740. Description *string `min:"1" type:"string"`
  1741. // The job ID of the job that you want to update, for example JID123e4567-e89b-12d3-a456-426655440000.
  1742. //
  1743. // JobId is a required field
  1744. JobId *string `min:"39" type:"string" required:"true"`
  1745. // The new or updated Notification object.
  1746. Notification *Notification `type:"structure"`
  1747. // The updated S3Resource object (for a single Amazon S3 bucket or key range),
  1748. // or the updated JobResource object (for multiple buckets or key ranges).
  1749. Resources *JobResource `type:"structure"`
  1750. // The new role Amazon Resource Name (ARN) that you want to associate with this
  1751. // job. To create a role ARN, use the CreateRole (http://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html)
  1752. // AWS Identity and Access Management (IAM) API action.
  1753. RoleARN *string `type:"string"`
  1754. // The updated shipping option value of this job's ShippingDetails object.
  1755. ShippingOption *string `type:"string" enum:"ShippingOption"`
  1756. // The updated SnowballCapacityPreference of this job's JobMetadata object.
  1757. // Note that the 50 TB Snowballs are only available in the US regions.
  1758. SnowballCapacityPreference *string `type:"string" enum:"Capacity"`
  1759. }
  1760. // String returns the string representation
  1761. func (s UpdateJobInput) String() string {
  1762. return awsutil.Prettify(s)
  1763. }
  1764. // GoString returns the string representation
  1765. func (s UpdateJobInput) GoString() string {
  1766. return s.String()
  1767. }
  1768. // Validate inspects the fields of the type to determine if they are valid.
  1769. func (s *UpdateJobInput) Validate() error {
  1770. invalidParams := request.ErrInvalidParams{Context: "UpdateJobInput"}
  1771. if s.AddressId != nil && len(*s.AddressId) < 40 {
  1772. invalidParams.Add(request.NewErrParamMinLen("AddressId", 40))
  1773. }
  1774. if s.Description != nil && len(*s.Description) < 1 {
  1775. invalidParams.Add(request.NewErrParamMinLen("Description", 1))
  1776. }
  1777. if s.JobId == nil {
  1778. invalidParams.Add(request.NewErrParamRequired("JobId"))
  1779. }
  1780. if s.JobId != nil && len(*s.JobId) < 39 {
  1781. invalidParams.Add(request.NewErrParamMinLen("JobId", 39))
  1782. }
  1783. if s.Resources != nil {
  1784. if err := s.Resources.Validate(); err != nil {
  1785. invalidParams.AddNested("Resources", err.(request.ErrInvalidParams))
  1786. }
  1787. }
  1788. if invalidParams.Len() > 0 {
  1789. return invalidParams
  1790. }
  1791. return nil
  1792. }
  1793. type UpdateJobOutput struct {
  1794. _ struct{} `type:"structure"`
  1795. }
  1796. // String returns the string representation
  1797. func (s UpdateJobOutput) String() string {
  1798. return awsutil.Prettify(s)
  1799. }
  1800. // GoString returns the string representation
  1801. func (s UpdateJobOutput) GoString() string {
  1802. return s.String()
  1803. }
  1804. const (
  1805. // CapacityT50 is a Capacity enum value
  1806. CapacityT50 = "T50"
  1807. // CapacityT80 is a Capacity enum value
  1808. CapacityT80 = "T80"
  1809. // CapacityNoPreference is a Capacity enum value
  1810. CapacityNoPreference = "NoPreference"
  1811. )
  1812. const (
  1813. // JobStateNew is a JobState enum value
  1814. JobStateNew = "New"
  1815. // JobStatePreparingAppliance is a JobState enum value
  1816. JobStatePreparingAppliance = "PreparingAppliance"
  1817. // JobStatePreparingShipment is a JobState enum value
  1818. JobStatePreparingShipment = "PreparingShipment"
  1819. // JobStateInTransitToCustomer is a JobState enum value
  1820. JobStateInTransitToCustomer = "InTransitToCustomer"
  1821. // JobStateWithCustomer is a JobState enum value
  1822. JobStateWithCustomer = "WithCustomer"
  1823. // JobStateInTransitToAws is a JobState enum value
  1824. JobStateInTransitToAws = "InTransitToAWS"
  1825. // JobStateWithAws is a JobState enum value
  1826. JobStateWithAws = "WithAWS"
  1827. // JobStateInProgress is a JobState enum value
  1828. JobStateInProgress = "InProgress"
  1829. // JobStateComplete is a JobState enum value
  1830. JobStateComplete = "Complete"
  1831. // JobStateCancelled is a JobState enum value
  1832. JobStateCancelled = "Cancelled"
  1833. // JobStateListing is a JobState enum value
  1834. JobStateListing = "Listing"
  1835. // JobStatePending is a JobState enum value
  1836. JobStatePending = "Pending"
  1837. )
  1838. const (
  1839. // JobTypeImport is a JobType enum value
  1840. JobTypeImport = "IMPORT"
  1841. // JobTypeExport is a JobType enum value
  1842. JobTypeExport = "EXPORT"
  1843. )
  1844. const (
  1845. // ShippingOptionSecondDay is a ShippingOption enum value
  1846. ShippingOptionSecondDay = "SECOND_DAY"
  1847. // ShippingOptionNextDay is a ShippingOption enum value
  1848. ShippingOptionNextDay = "NEXT_DAY"
  1849. // ShippingOptionExpress is a ShippingOption enum value
  1850. ShippingOptionExpress = "EXPRESS"
  1851. // ShippingOptionStandard is a ShippingOption enum value
  1852. ShippingOptionStandard = "STANDARD"
  1853. )