api.go 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package simpledb provides a client for Amazon SimpleDB.
  3. package simpledb
  4. import (
  5. "fmt"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/query"
  10. )
  11. const opBatchDeleteAttributes = "BatchDeleteAttributes"
  12. // BatchDeleteAttributesRequest generates a "aws/request.Request" representing the
  13. // client's request for the BatchDeleteAttributes operation. The "output" return
  14. // value can be used to capture response data after the request's "Send" method
  15. // is called.
  16. //
  17. // See BatchDeleteAttributes for usage and error information.
  18. //
  19. // Creating a request object using this method should be used when you want to inject
  20. // custom logic into the request's lifecycle using a custom handler, or if you want to
  21. // access properties on the request object before or after sending the request. If
  22. // you just want the service response, call the BatchDeleteAttributes method directly
  23. // instead.
  24. //
  25. // Note: You must call the "Send" method on the returned request object in order
  26. // to execute the request.
  27. //
  28. // // Example sending a request using the BatchDeleteAttributesRequest method.
  29. // req, resp := client.BatchDeleteAttributesRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. func (c *SimpleDB) BatchDeleteAttributesRequest(input *BatchDeleteAttributesInput) (req *request.Request, output *BatchDeleteAttributesOutput) {
  37. op := &request.Operation{
  38. Name: opBatchDeleteAttributes,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &BatchDeleteAttributesInput{}
  44. }
  45. req = c.newRequest(op, input, output)
  46. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  47. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  48. output = &BatchDeleteAttributesOutput{}
  49. req.Data = output
  50. return
  51. }
  52. // BatchDeleteAttributes API operation for Amazon SimpleDB.
  53. //
  54. // Performs multiple DeleteAttributes operations in a single call, which reduces
  55. // round trips and latencies. This enables Amazon SimpleDB to optimize requests,
  56. // which generally yields better throughput.
  57. //
  58. // If you specify BatchDeleteAttributes without attributes or values, all the
  59. // attributes for the item are deleted.
  60. //
  61. // BatchDeleteAttributes is an idempotent operation; running it multiple times
  62. // on the same item or attribute doesn't result in an error.
  63. //
  64. // The BatchDeleteAttributes operation succeeds or fails in its entirety. There
  65. // are no partial deletes. You can execute multiple BatchDeleteAttributes operations
  66. // and other operations in parallel. However, large numbers of concurrent BatchDeleteAttributes
  67. // calls can result in Service Unavailable (503) responses.
  68. //
  69. // This operation is vulnerable to exceeding the maximum URL size when making
  70. // a REST request using the HTTP GET method.
  71. //
  72. // This operation does not support conditions using Expected.X.Name, Expected.X.Value,
  73. // or Expected.X.Exists.
  74. //
  75. // The following limitations are enforced for this operation: 1 MB request size
  76. //
  77. // 25 item limit per BatchDeleteAttributes operation
  78. //
  79. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  80. // with awserr.Error's Code and Message methods to get detailed information about
  81. // the error.
  82. //
  83. // See the AWS API reference guide for Amazon SimpleDB's
  84. // API operation BatchDeleteAttributes for usage and error information.
  85. func (c *SimpleDB) BatchDeleteAttributes(input *BatchDeleteAttributesInput) (*BatchDeleteAttributesOutput, error) {
  86. req, out := c.BatchDeleteAttributesRequest(input)
  87. err := req.Send()
  88. return out, err
  89. }
  90. const opBatchPutAttributes = "BatchPutAttributes"
  91. // BatchPutAttributesRequest generates a "aws/request.Request" representing the
  92. // client's request for the BatchPutAttributes operation. The "output" return
  93. // value can be used to capture response data after the request's "Send" method
  94. // is called.
  95. //
  96. // See BatchPutAttributes for usage and error information.
  97. //
  98. // Creating a request object using this method should be used when you want to inject
  99. // custom logic into the request's lifecycle using a custom handler, or if you want to
  100. // access properties on the request object before or after sending the request. If
  101. // you just want the service response, call the BatchPutAttributes method directly
  102. // instead.
  103. //
  104. // Note: You must call the "Send" method on the returned request object in order
  105. // to execute the request.
  106. //
  107. // // Example sending a request using the BatchPutAttributesRequest method.
  108. // req, resp := client.BatchPutAttributesRequest(params)
  109. //
  110. // err := req.Send()
  111. // if err == nil { // resp is now filled
  112. // fmt.Println(resp)
  113. // }
  114. //
  115. func (c *SimpleDB) BatchPutAttributesRequest(input *BatchPutAttributesInput) (req *request.Request, output *BatchPutAttributesOutput) {
  116. op := &request.Operation{
  117. Name: opBatchPutAttributes,
  118. HTTPMethod: "POST",
  119. HTTPPath: "/",
  120. }
  121. if input == nil {
  122. input = &BatchPutAttributesInput{}
  123. }
  124. req = c.newRequest(op, input, output)
  125. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  126. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  127. output = &BatchPutAttributesOutput{}
  128. req.Data = output
  129. return
  130. }
  131. // BatchPutAttributes API operation for Amazon SimpleDB.
  132. //
  133. // The BatchPutAttributes operation creates or replaces attributes within one
  134. // or more items. By using this operation, the client can perform multiple PutAttribute
  135. // operation with a single call. This helps yield savings in round trips and
  136. // latencies, enabling Amazon SimpleDB to optimize requests and generally produce
  137. // better throughput.
  138. //
  139. // The client may specify the item name with the Item.X.ItemName parameter.
  140. // The client may specify new attributes using a combination of the Item.X.Attribute.Y.Name
  141. // and Item.X.Attribute.Y.Value parameters. The client may specify the first
  142. // attribute for the first item using the parameters Item.0.Attribute.0.Name
  143. // and Item.0.Attribute.0.Value, and for the second attribute for the first
  144. // item by the parameters Item.0.Attribute.1.Name and Item.0.Attribute.1.Value,
  145. // and so on.
  146. //
  147. // Attributes are uniquely identified within an item by their name/value combination.
  148. // For example, a single item can have the attributes { "first_name", "first_value"
  149. // } and { "first_name", "second_value" }. However, it cannot have two attribute
  150. // instances where both the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value
  151. // are the same.
  152. //
  153. // Optionally, the requester can supply the Replace parameter for each individual
  154. // value. Setting this value to true will cause the new attribute values to
  155. // replace the existing attribute values. For example, if an item I has the
  156. // attributes { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requester does
  157. // a BatchPutAttributes of {'I', 'b', '4' } with the Replace parameter set to
  158. // true, the final attributes of the item will be { 'a', '1' } and { 'b', '4'
  159. // }, replacing the previous values of the 'b' attribute with the new value.
  160. //
  161. // You cannot specify an empty string as an item or as an attribute name. The
  162. // BatchPutAttributes operation succeeds or fails in its entirety. There are
  163. // no partial puts. This operation is vulnerable to exceeding the maximum URL size when making
  164. // a REST request using the HTTP GET method. This operation does not support
  165. // conditions using Expected.X.Name, Expected.X.Value, or Expected.X.Exists.
  166. // You can execute multiple BatchPutAttributes operations and other operations
  167. // in parallel. However, large numbers of concurrent BatchPutAttributes calls
  168. // can result in Service Unavailable (503) responses.
  169. //
  170. // The following limitations are enforced for this operation: 256 attribute
  171. // name-value pairs per item
  172. // 1 MB request size
  173. // 1 billion attributes per domain
  174. // 10 GB of total user data storage per domain
  175. // 25 item limit per BatchPutAttributes operation
  176. //
  177. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  178. // with awserr.Error's Code and Message methods to get detailed information about
  179. // the error.
  180. //
  181. // See the AWS API reference guide for Amazon SimpleDB's
  182. // API operation BatchPutAttributes for usage and error information.
  183. //
  184. // Returned Error Codes:
  185. // * DuplicateItemName
  186. // The item name was specified more than once.
  187. //
  188. // * InvalidParameterValue
  189. // The value for a parameter is invalid.
  190. //
  191. // * MissingParameter
  192. // The request must contain the specified missing parameter.
  193. //
  194. // * NoSuchDomain
  195. // The specified domain does not exist.
  196. //
  197. // * NumberItemAttributesExceeded
  198. // Too many attributes in this item.
  199. //
  200. // * NumberDomainAttributesExceeded
  201. // Too many attributes in this domain.
  202. //
  203. // * NumberDomainBytesExceeded
  204. // Too many bytes in this domain.
  205. //
  206. // * NumberSubmittedItemsExceeded
  207. // Too many items exist in a single call.
  208. //
  209. // * NumberSubmittedAttributesExceeded
  210. // Too many attributes exist in a single call.
  211. //
  212. func (c *SimpleDB) BatchPutAttributes(input *BatchPutAttributesInput) (*BatchPutAttributesOutput, error) {
  213. req, out := c.BatchPutAttributesRequest(input)
  214. err := req.Send()
  215. return out, err
  216. }
  217. const opCreateDomain = "CreateDomain"
  218. // CreateDomainRequest generates a "aws/request.Request" representing the
  219. // client's request for the CreateDomain 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 CreateDomain 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 CreateDomain 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 CreateDomainRequest method.
  235. // req, resp := client.CreateDomainRequest(params)
  236. //
  237. // err := req.Send()
  238. // if err == nil { // resp is now filled
  239. // fmt.Println(resp)
  240. // }
  241. //
  242. func (c *SimpleDB) CreateDomainRequest(input *CreateDomainInput) (req *request.Request, output *CreateDomainOutput) {
  243. op := &request.Operation{
  244. Name: opCreateDomain,
  245. HTTPMethod: "POST",
  246. HTTPPath: "/",
  247. }
  248. if input == nil {
  249. input = &CreateDomainInput{}
  250. }
  251. req = c.newRequest(op, input, output)
  252. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  253. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  254. output = &CreateDomainOutput{}
  255. req.Data = output
  256. return
  257. }
  258. // CreateDomain API operation for Amazon SimpleDB.
  259. //
  260. // The CreateDomain operation creates a new domain. The domain name should be
  261. // unique among the domains associated with the Access Key ID provided in the
  262. // request. The CreateDomain operation may take 10 or more seconds to complete.
  263. //
  264. // CreateDomain is an idempotent operation; running it multiple times using
  265. // the same domain name will not result in an error response. The client can create up to 100 domains per account.
  266. //
  267. // If the client requires additional domains, go to http://aws.amazon.com/contact-us/simpledb-limit-request/
  268. // (http://aws.amazon.com/contact-us/simpledb-limit-request/).
  269. //
  270. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  271. // with awserr.Error's Code and Message methods to get detailed information about
  272. // the error.
  273. //
  274. // See the AWS API reference guide for Amazon SimpleDB's
  275. // API operation CreateDomain for usage and error information.
  276. //
  277. // Returned Error Codes:
  278. // * InvalidParameterValue
  279. // The value for a parameter is invalid.
  280. //
  281. // * MissingParameter
  282. // The request must contain the specified missing parameter.
  283. //
  284. // * NumberDomainsExceeded
  285. // Too many domains exist per this account.
  286. //
  287. func (c *SimpleDB) CreateDomain(input *CreateDomainInput) (*CreateDomainOutput, error) {
  288. req, out := c.CreateDomainRequest(input)
  289. err := req.Send()
  290. return out, err
  291. }
  292. const opDeleteAttributes = "DeleteAttributes"
  293. // DeleteAttributesRequest generates a "aws/request.Request" representing the
  294. // client's request for the DeleteAttributes operation. The "output" return
  295. // value can be used to capture response data after the request's "Send" method
  296. // is called.
  297. //
  298. // See DeleteAttributes for usage and error information.
  299. //
  300. // Creating a request object using this method should be used when you want to inject
  301. // custom logic into the request's lifecycle using a custom handler, or if you want to
  302. // access properties on the request object before or after sending the request. If
  303. // you just want the service response, call the DeleteAttributes method directly
  304. // instead.
  305. //
  306. // Note: You must call the "Send" method on the returned request object in order
  307. // to execute the request.
  308. //
  309. // // Example sending a request using the DeleteAttributesRequest method.
  310. // req, resp := client.DeleteAttributesRequest(params)
  311. //
  312. // err := req.Send()
  313. // if err == nil { // resp is now filled
  314. // fmt.Println(resp)
  315. // }
  316. //
  317. func (c *SimpleDB) DeleteAttributesRequest(input *DeleteAttributesInput) (req *request.Request, output *DeleteAttributesOutput) {
  318. op := &request.Operation{
  319. Name: opDeleteAttributes,
  320. HTTPMethod: "POST",
  321. HTTPPath: "/",
  322. }
  323. if input == nil {
  324. input = &DeleteAttributesInput{}
  325. }
  326. req = c.newRequest(op, input, output)
  327. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  328. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  329. output = &DeleteAttributesOutput{}
  330. req.Data = output
  331. return
  332. }
  333. // DeleteAttributes API operation for Amazon SimpleDB.
  334. //
  335. // Deletes one or more attributes associated with an item. If all attributes
  336. // of the item are deleted, the item is deleted.
  337. //
  338. // If DeleteAttributes is called without being passed any attributes or values
  339. // specified, all the attributes for the item are deleted. DeleteAttributes is an idempotent operation; running it multiple times on
  340. // the same item or attribute does not result in an error response.
  341. //
  342. // Because Amazon SimpleDB makes multiple copies of item data and uses an eventual
  343. // consistency update model, performing a GetAttributes or Select operation
  344. // (read) immediately after a DeleteAttributes or PutAttributes operation (write)
  345. // might not return updated item data.
  346. //
  347. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  348. // with awserr.Error's Code and Message methods to get detailed information about
  349. // the error.
  350. //
  351. // See the AWS API reference guide for Amazon SimpleDB's
  352. // API operation DeleteAttributes for usage and error information.
  353. //
  354. // Returned Error Codes:
  355. // * InvalidParameterValue
  356. // The value for a parameter is invalid.
  357. //
  358. // * MissingParameter
  359. // The request must contain the specified missing parameter.
  360. //
  361. // * NoSuchDomain
  362. // The specified domain does not exist.
  363. //
  364. // * AttributeDoesNotExist
  365. // The specified attribute does not exist.
  366. //
  367. func (c *SimpleDB) DeleteAttributes(input *DeleteAttributesInput) (*DeleteAttributesOutput, error) {
  368. req, out := c.DeleteAttributesRequest(input)
  369. err := req.Send()
  370. return out, err
  371. }
  372. const opDeleteDomain = "DeleteDomain"
  373. // DeleteDomainRequest generates a "aws/request.Request" representing the
  374. // client's request for the DeleteDomain operation. The "output" return
  375. // value can be used to capture response data after the request's "Send" method
  376. // is called.
  377. //
  378. // See DeleteDomain for usage and error information.
  379. //
  380. // Creating a request object using this method should be used when you want to inject
  381. // custom logic into the request's lifecycle using a custom handler, or if you want to
  382. // access properties on the request object before or after sending the request. If
  383. // you just want the service response, call the DeleteDomain method directly
  384. // instead.
  385. //
  386. // Note: You must call the "Send" method on the returned request object in order
  387. // to execute the request.
  388. //
  389. // // Example sending a request using the DeleteDomainRequest method.
  390. // req, resp := client.DeleteDomainRequest(params)
  391. //
  392. // err := req.Send()
  393. // if err == nil { // resp is now filled
  394. // fmt.Println(resp)
  395. // }
  396. //
  397. func (c *SimpleDB) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) {
  398. op := &request.Operation{
  399. Name: opDeleteDomain,
  400. HTTPMethod: "POST",
  401. HTTPPath: "/",
  402. }
  403. if input == nil {
  404. input = &DeleteDomainInput{}
  405. }
  406. req = c.newRequest(op, input, output)
  407. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  408. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  409. output = &DeleteDomainOutput{}
  410. req.Data = output
  411. return
  412. }
  413. // DeleteDomain API operation for Amazon SimpleDB.
  414. //
  415. // The DeleteDomain operation deletes a domain. Any items (and their attributes)
  416. // in the domain are deleted as well. The DeleteDomain operation might take
  417. // 10 or more seconds to complete.
  418. //
  419. // Running DeleteDomain on a domain that does not exist or running the function
  420. // multiple times using the same domain name will not result in an error response.
  421. //
  422. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  423. // with awserr.Error's Code and Message methods to get detailed information about
  424. // the error.
  425. //
  426. // See the AWS API reference guide for Amazon SimpleDB's
  427. // API operation DeleteDomain for usage and error information.
  428. //
  429. // Returned Error Codes:
  430. // * MissingParameter
  431. // The request must contain the specified missing parameter.
  432. //
  433. func (c *SimpleDB) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) {
  434. req, out := c.DeleteDomainRequest(input)
  435. err := req.Send()
  436. return out, err
  437. }
  438. const opDomainMetadata = "DomainMetadata"
  439. // DomainMetadataRequest generates a "aws/request.Request" representing the
  440. // client's request for the DomainMetadata operation. The "output" return
  441. // value can be used to capture response data after the request's "Send" method
  442. // is called.
  443. //
  444. // See DomainMetadata for usage and error information.
  445. //
  446. // Creating a request object using this method should be used when you want to inject
  447. // custom logic into the request's lifecycle using a custom handler, or if you want to
  448. // access properties on the request object before or after sending the request. If
  449. // you just want the service response, call the DomainMetadata method directly
  450. // instead.
  451. //
  452. // Note: You must call the "Send" method on the returned request object in order
  453. // to execute the request.
  454. //
  455. // // Example sending a request using the DomainMetadataRequest method.
  456. // req, resp := client.DomainMetadataRequest(params)
  457. //
  458. // err := req.Send()
  459. // if err == nil { // resp is now filled
  460. // fmt.Println(resp)
  461. // }
  462. //
  463. func (c *SimpleDB) DomainMetadataRequest(input *DomainMetadataInput) (req *request.Request, output *DomainMetadataOutput) {
  464. op := &request.Operation{
  465. Name: opDomainMetadata,
  466. HTTPMethod: "POST",
  467. HTTPPath: "/",
  468. }
  469. if input == nil {
  470. input = &DomainMetadataInput{}
  471. }
  472. req = c.newRequest(op, input, output)
  473. output = &DomainMetadataOutput{}
  474. req.Data = output
  475. return
  476. }
  477. // DomainMetadata API operation for Amazon SimpleDB.
  478. //
  479. // Returns information about the domain, including when the domain was created,
  480. // the number of items and attributes in the domain, and the size of the attribute
  481. // names and values.
  482. //
  483. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  484. // with awserr.Error's Code and Message methods to get detailed information about
  485. // the error.
  486. //
  487. // See the AWS API reference guide for Amazon SimpleDB's
  488. // API operation DomainMetadata for usage and error information.
  489. //
  490. // Returned Error Codes:
  491. // * MissingParameter
  492. // The request must contain the specified missing parameter.
  493. //
  494. // * NoSuchDomain
  495. // The specified domain does not exist.
  496. //
  497. func (c *SimpleDB) DomainMetadata(input *DomainMetadataInput) (*DomainMetadataOutput, error) {
  498. req, out := c.DomainMetadataRequest(input)
  499. err := req.Send()
  500. return out, err
  501. }
  502. const opGetAttributes = "GetAttributes"
  503. // GetAttributesRequest generates a "aws/request.Request" representing the
  504. // client's request for the GetAttributes operation. The "output" return
  505. // value can be used to capture response data after the request's "Send" method
  506. // is called.
  507. //
  508. // See GetAttributes for usage and error information.
  509. //
  510. // Creating a request object using this method should be used when you want to inject
  511. // custom logic into the request's lifecycle using a custom handler, or if you want to
  512. // access properties on the request object before or after sending the request. If
  513. // you just want the service response, call the GetAttributes method directly
  514. // instead.
  515. //
  516. // Note: You must call the "Send" method on the returned request object in order
  517. // to execute the request.
  518. //
  519. // // Example sending a request using the GetAttributesRequest method.
  520. // req, resp := client.GetAttributesRequest(params)
  521. //
  522. // err := req.Send()
  523. // if err == nil { // resp is now filled
  524. // fmt.Println(resp)
  525. // }
  526. //
  527. func (c *SimpleDB) GetAttributesRequest(input *GetAttributesInput) (req *request.Request, output *GetAttributesOutput) {
  528. op := &request.Operation{
  529. Name: opGetAttributes,
  530. HTTPMethod: "POST",
  531. HTTPPath: "/",
  532. }
  533. if input == nil {
  534. input = &GetAttributesInput{}
  535. }
  536. req = c.newRequest(op, input, output)
  537. output = &GetAttributesOutput{}
  538. req.Data = output
  539. return
  540. }
  541. // GetAttributes API operation for Amazon SimpleDB.
  542. //
  543. // Returns all of the attributes associated with the specified item. Optionally,
  544. // the attributes returned can be limited to one or more attributes by specifying
  545. // an attribute name parameter.
  546. //
  547. // If the item does not exist on the replica that was accessed for this operation,
  548. // an empty set is returned. The system does not return an error as it cannot
  549. // guarantee the item does not exist on other replicas.
  550. //
  551. // If GetAttributes is called without being passed any attribute names, all
  552. // the attributes for the item are returned.
  553. //
  554. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  555. // with awserr.Error's Code and Message methods to get detailed information about
  556. // the error.
  557. //
  558. // See the AWS API reference guide for Amazon SimpleDB's
  559. // API operation GetAttributes for usage and error information.
  560. //
  561. // Returned Error Codes:
  562. // * InvalidParameterValue
  563. // The value for a parameter is invalid.
  564. //
  565. // * MissingParameter
  566. // The request must contain the specified missing parameter.
  567. //
  568. // * NoSuchDomain
  569. // The specified domain does not exist.
  570. //
  571. func (c *SimpleDB) GetAttributes(input *GetAttributesInput) (*GetAttributesOutput, error) {
  572. req, out := c.GetAttributesRequest(input)
  573. err := req.Send()
  574. return out, err
  575. }
  576. const opListDomains = "ListDomains"
  577. // ListDomainsRequest generates a "aws/request.Request" representing the
  578. // client's request for the ListDomains operation. The "output" return
  579. // value can be used to capture response data after the request's "Send" method
  580. // is called.
  581. //
  582. // See ListDomains for usage and error information.
  583. //
  584. // Creating a request object using this method should be used when you want to inject
  585. // custom logic into the request's lifecycle using a custom handler, or if you want to
  586. // access properties on the request object before or after sending the request. If
  587. // you just want the service response, call the ListDomains method directly
  588. // instead.
  589. //
  590. // Note: You must call the "Send" method on the returned request object in order
  591. // to execute the request.
  592. //
  593. // // Example sending a request using the ListDomainsRequest method.
  594. // req, resp := client.ListDomainsRequest(params)
  595. //
  596. // err := req.Send()
  597. // if err == nil { // resp is now filled
  598. // fmt.Println(resp)
  599. // }
  600. //
  601. func (c *SimpleDB) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) {
  602. op := &request.Operation{
  603. Name: opListDomains,
  604. HTTPMethod: "POST",
  605. HTTPPath: "/",
  606. Paginator: &request.Paginator{
  607. InputTokens: []string{"NextToken"},
  608. OutputTokens: []string{"NextToken"},
  609. LimitToken: "MaxNumberOfDomains",
  610. TruncationToken: "",
  611. },
  612. }
  613. if input == nil {
  614. input = &ListDomainsInput{}
  615. }
  616. req = c.newRequest(op, input, output)
  617. output = &ListDomainsOutput{}
  618. req.Data = output
  619. return
  620. }
  621. // ListDomains API operation for Amazon SimpleDB.
  622. //
  623. // The ListDomains operation lists all domains associated with the Access Key
  624. // ID. It returns domain names up to the limit set by MaxNumberOfDomains (#MaxNumberOfDomains).
  625. // A NextToken (#NextToken) is returned if there are more than MaxNumberOfDomains
  626. // domains. Calling ListDomains successive times with the NextToken provided
  627. // by the operation returns up to MaxNumberOfDomains more domain names with
  628. // each successive operation call.
  629. //
  630. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  631. // with awserr.Error's Code and Message methods to get detailed information about
  632. // the error.
  633. //
  634. // See the AWS API reference guide for Amazon SimpleDB's
  635. // API operation ListDomains for usage and error information.
  636. //
  637. // Returned Error Codes:
  638. // * InvalidParameterValue
  639. // The value for a parameter is invalid.
  640. //
  641. // * InvalidNextToken
  642. // The specified NextToken is not valid.
  643. //
  644. func (c *SimpleDB) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) {
  645. req, out := c.ListDomainsRequest(input)
  646. err := req.Send()
  647. return out, err
  648. }
  649. // ListDomainsPages iterates over the pages of a ListDomains operation,
  650. // calling the "fn" function with the response data for each page. To stop
  651. // iterating, return false from the fn function.
  652. //
  653. // See ListDomains method for more information on how to use this operation.
  654. //
  655. // Note: This operation can generate multiple requests to a service.
  656. //
  657. // // Example iterating over at most 3 pages of a ListDomains operation.
  658. // pageNum := 0
  659. // err := client.ListDomainsPages(params,
  660. // func(page *ListDomainsOutput, lastPage bool) bool {
  661. // pageNum++
  662. // fmt.Println(page)
  663. // return pageNum <= 3
  664. // })
  665. //
  666. func (c *SimpleDB) ListDomainsPages(input *ListDomainsInput, fn func(p *ListDomainsOutput, lastPage bool) (shouldContinue bool)) error {
  667. page, _ := c.ListDomainsRequest(input)
  668. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  669. return page.EachPage(func(p interface{}, lastPage bool) bool {
  670. return fn(p.(*ListDomainsOutput), lastPage)
  671. })
  672. }
  673. const opPutAttributes = "PutAttributes"
  674. // PutAttributesRequest generates a "aws/request.Request" representing the
  675. // client's request for the PutAttributes operation. The "output" return
  676. // value can be used to capture response data after the request's "Send" method
  677. // is called.
  678. //
  679. // See PutAttributes for usage and error information.
  680. //
  681. // Creating a request object using this method should be used when you want to inject
  682. // custom logic into the request's lifecycle using a custom handler, or if you want to
  683. // access properties on the request object before or after sending the request. If
  684. // you just want the service response, call the PutAttributes method directly
  685. // instead.
  686. //
  687. // Note: You must call the "Send" method on the returned request object in order
  688. // to execute the request.
  689. //
  690. // // Example sending a request using the PutAttributesRequest method.
  691. // req, resp := client.PutAttributesRequest(params)
  692. //
  693. // err := req.Send()
  694. // if err == nil { // resp is now filled
  695. // fmt.Println(resp)
  696. // }
  697. //
  698. func (c *SimpleDB) PutAttributesRequest(input *PutAttributesInput) (req *request.Request, output *PutAttributesOutput) {
  699. op := &request.Operation{
  700. Name: opPutAttributes,
  701. HTTPMethod: "POST",
  702. HTTPPath: "/",
  703. }
  704. if input == nil {
  705. input = &PutAttributesInput{}
  706. }
  707. req = c.newRequest(op, input, output)
  708. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  709. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  710. output = &PutAttributesOutput{}
  711. req.Data = output
  712. return
  713. }
  714. // PutAttributes API operation for Amazon SimpleDB.
  715. //
  716. // The PutAttributes operation creates or replaces attributes in an item. The
  717. // client may specify new attributes using a combination of the Attribute.X.Name
  718. // and Attribute.X.Value parameters. The client specifies the first attribute
  719. // by the parameters Attribute.0.Name and Attribute.0.Value, the second attribute
  720. // by the parameters Attribute.1.Name and Attribute.1.Value, and so on.
  721. //
  722. // Attributes are uniquely identified in an item by their name/value combination.
  723. // For example, a single item can have the attributes { "first_name", "first_value"
  724. // } and { "first_name", second_value" }. However, it cannot have two attribute
  725. // instances where both the Attribute.X.Name and Attribute.X.Value are the same.
  726. //
  727. // Optionally, the requestor can supply the Replace parameter for each individual
  728. // attribute. Setting this value to true causes the new attribute value to replace
  729. // the existing attribute value(s). For example, if an item has the attributes
  730. // { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requestor calls PutAttributes
  731. // using the attributes { 'b', '4' } with the Replace parameter set to true,
  732. // the final attributes of the item are changed to { 'a', '1' } and { 'b', '4'
  733. // }, which replaces the previous values of the 'b' attribute with the new value.
  734. //
  735. // Using PutAttributes to replace attribute values that do not exist will not
  736. // result in an error response. You cannot specify an empty string as an attribute name.
  737. //
  738. // Because Amazon SimpleDB makes multiple copies of client data and uses an
  739. // eventual consistency update model, an immediate GetAttributes or Select operation
  740. // (read) immediately after a PutAttributes or DeleteAttributes operation (write)
  741. // might not return the updated data.
  742. //
  743. // The following limitations are enforced for this operation: 256 total attribute
  744. // name-value pairs per item
  745. // One billion attributes per domain
  746. // 10 GB of total user data storage per domain
  747. //
  748. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  749. // with awserr.Error's Code and Message methods to get detailed information about
  750. // the error.
  751. //
  752. // See the AWS API reference guide for Amazon SimpleDB's
  753. // API operation PutAttributes for usage and error information.
  754. //
  755. // Returned Error Codes:
  756. // * InvalidParameterValue
  757. // The value for a parameter is invalid.
  758. //
  759. // * MissingParameter
  760. // The request must contain the specified missing parameter.
  761. //
  762. // * NoSuchDomain
  763. // The specified domain does not exist.
  764. //
  765. // * NumberDomainAttributesExceeded
  766. // Too many attributes in this domain.
  767. //
  768. // * NumberDomainBytesExceeded
  769. // Too many bytes in this domain.
  770. //
  771. // * NumberItemAttributesExceeded
  772. // Too many attributes in this item.
  773. //
  774. // * AttributeDoesNotExist
  775. // The specified attribute does not exist.
  776. //
  777. func (c *SimpleDB) PutAttributes(input *PutAttributesInput) (*PutAttributesOutput, error) {
  778. req, out := c.PutAttributesRequest(input)
  779. err := req.Send()
  780. return out, err
  781. }
  782. const opSelect = "Select"
  783. // SelectRequest generates a "aws/request.Request" representing the
  784. // client's request for the Select operation. The "output" return
  785. // value can be used to capture response data after the request's "Send" method
  786. // is called.
  787. //
  788. // See Select for usage and error information.
  789. //
  790. // Creating a request object using this method should be used when you want to inject
  791. // custom logic into the request's lifecycle using a custom handler, or if you want to
  792. // access properties on the request object before or after sending the request. If
  793. // you just want the service response, call the Select method directly
  794. // instead.
  795. //
  796. // Note: You must call the "Send" method on the returned request object in order
  797. // to execute the request.
  798. //
  799. // // Example sending a request using the SelectRequest method.
  800. // req, resp := client.SelectRequest(params)
  801. //
  802. // err := req.Send()
  803. // if err == nil { // resp is now filled
  804. // fmt.Println(resp)
  805. // }
  806. //
  807. func (c *SimpleDB) SelectRequest(input *SelectInput) (req *request.Request, output *SelectOutput) {
  808. op := &request.Operation{
  809. Name: opSelect,
  810. HTTPMethod: "POST",
  811. HTTPPath: "/",
  812. Paginator: &request.Paginator{
  813. InputTokens: []string{"NextToken"},
  814. OutputTokens: []string{"NextToken"},
  815. LimitToken: "",
  816. TruncationToken: "",
  817. },
  818. }
  819. if input == nil {
  820. input = &SelectInput{}
  821. }
  822. req = c.newRequest(op, input, output)
  823. output = &SelectOutput{}
  824. req.Data = output
  825. return
  826. }
  827. // Select API operation for Amazon SimpleDB.
  828. //
  829. // The Select operation returns a set of attributes for ItemNames that match
  830. // the select expression. Select is similar to the standard SQL SELECT statement.
  831. //
  832. // The total size of the response cannot exceed 1 MB in total size. Amazon SimpleDB
  833. // automatically adjusts the number of items returned per page to enforce this
  834. // limit. For example, if the client asks to retrieve 2500 items, but each individual
  835. // item is 10 kB in size, the system returns 100 items and an appropriate NextToken
  836. // so the client can access the next page of results.
  837. //
  838. // For information on how to construct select expressions, see Using Select
  839. // to Create Amazon SimpleDB Queries in the Developer Guide.
  840. //
  841. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  842. // with awserr.Error's Code and Message methods to get detailed information about
  843. // the error.
  844. //
  845. // See the AWS API reference guide for Amazon SimpleDB's
  846. // API operation Select for usage and error information.
  847. //
  848. // Returned Error Codes:
  849. // * InvalidParameterValue
  850. // The value for a parameter is invalid.
  851. //
  852. // * InvalidNextToken
  853. // The specified NextToken is not valid.
  854. //
  855. // * InvalidNumberPredicates
  856. // Too many predicates exist in the query expression.
  857. //
  858. // * InvalidNumberValueTests
  859. // Too many predicates exist in the query expression.
  860. //
  861. // * InvalidQueryExpression
  862. // The specified query expression syntax is not valid.
  863. //
  864. // * MissingParameter
  865. // The request must contain the specified missing parameter.
  866. //
  867. // * NoSuchDomain
  868. // The specified domain does not exist.
  869. //
  870. // * RequestTimeout
  871. // A timeout occurred when attempting to query the specified domain with specified
  872. // query expression.
  873. //
  874. // * TooManyRequestedAttributes
  875. // Too many attributes requested.
  876. //
  877. func (c *SimpleDB) Select(input *SelectInput) (*SelectOutput, error) {
  878. req, out := c.SelectRequest(input)
  879. err := req.Send()
  880. return out, err
  881. }
  882. // SelectPages iterates over the pages of a Select operation,
  883. // calling the "fn" function with the response data for each page. To stop
  884. // iterating, return false from the fn function.
  885. //
  886. // See Select method for more information on how to use this operation.
  887. //
  888. // Note: This operation can generate multiple requests to a service.
  889. //
  890. // // Example iterating over at most 3 pages of a Select operation.
  891. // pageNum := 0
  892. // err := client.SelectPages(params,
  893. // func(page *SelectOutput, lastPage bool) bool {
  894. // pageNum++
  895. // fmt.Println(page)
  896. // return pageNum <= 3
  897. // })
  898. //
  899. func (c *SimpleDB) SelectPages(input *SelectInput, fn func(p *SelectOutput, lastPage bool) (shouldContinue bool)) error {
  900. page, _ := c.SelectRequest(input)
  901. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  902. return page.EachPage(func(p interface{}, lastPage bool) bool {
  903. return fn(p.(*SelectOutput), lastPage)
  904. })
  905. }
  906. type Attribute struct {
  907. _ struct{} `type:"structure"`
  908. AlternateNameEncoding *string `type:"string"`
  909. AlternateValueEncoding *string `type:"string"`
  910. // The name of the attribute.
  911. //
  912. // Name is a required field
  913. Name *string `type:"string" required:"true"`
  914. // The value of the attribute.
  915. //
  916. // Value is a required field
  917. Value *string `type:"string" required:"true"`
  918. }
  919. // String returns the string representation
  920. func (s Attribute) String() string {
  921. return awsutil.Prettify(s)
  922. }
  923. // GoString returns the string representation
  924. func (s Attribute) GoString() string {
  925. return s.String()
  926. }
  927. type BatchDeleteAttributesInput struct {
  928. _ struct{} `type:"structure"`
  929. // The name of the domain in which the attributes are being deleted.
  930. //
  931. // DomainName is a required field
  932. DomainName *string `type:"string" required:"true"`
  933. // A list of items on which to perform the operation.
  934. //
  935. // Items is a required field
  936. Items []*DeletableItem `locationNameList:"Item" type:"list" flattened:"true" required:"true"`
  937. }
  938. // String returns the string representation
  939. func (s BatchDeleteAttributesInput) String() string {
  940. return awsutil.Prettify(s)
  941. }
  942. // GoString returns the string representation
  943. func (s BatchDeleteAttributesInput) GoString() string {
  944. return s.String()
  945. }
  946. // Validate inspects the fields of the type to determine if they are valid.
  947. func (s *BatchDeleteAttributesInput) Validate() error {
  948. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteAttributesInput"}
  949. if s.DomainName == nil {
  950. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  951. }
  952. if s.Items == nil {
  953. invalidParams.Add(request.NewErrParamRequired("Items"))
  954. }
  955. if s.Items != nil {
  956. for i, v := range s.Items {
  957. if v == nil {
  958. continue
  959. }
  960. if err := v.Validate(); err != nil {
  961. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  962. }
  963. }
  964. }
  965. if invalidParams.Len() > 0 {
  966. return invalidParams
  967. }
  968. return nil
  969. }
  970. type BatchDeleteAttributesOutput struct {
  971. _ struct{} `type:"structure"`
  972. }
  973. // String returns the string representation
  974. func (s BatchDeleteAttributesOutput) String() string {
  975. return awsutil.Prettify(s)
  976. }
  977. // GoString returns the string representation
  978. func (s BatchDeleteAttributesOutput) GoString() string {
  979. return s.String()
  980. }
  981. type BatchPutAttributesInput struct {
  982. _ struct{} `type:"structure"`
  983. // The name of the domain in which the attributes are being stored.
  984. //
  985. // DomainName is a required field
  986. DomainName *string `type:"string" required:"true"`
  987. // A list of items on which to perform the operation.
  988. //
  989. // Items is a required field
  990. Items []*ReplaceableItem `locationNameList:"Item" type:"list" flattened:"true" required:"true"`
  991. }
  992. // String returns the string representation
  993. func (s BatchPutAttributesInput) String() string {
  994. return awsutil.Prettify(s)
  995. }
  996. // GoString returns the string representation
  997. func (s BatchPutAttributesInput) GoString() string {
  998. return s.String()
  999. }
  1000. // Validate inspects the fields of the type to determine if they are valid.
  1001. func (s *BatchPutAttributesInput) Validate() error {
  1002. invalidParams := request.ErrInvalidParams{Context: "BatchPutAttributesInput"}
  1003. if s.DomainName == nil {
  1004. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1005. }
  1006. if s.Items == nil {
  1007. invalidParams.Add(request.NewErrParamRequired("Items"))
  1008. }
  1009. if s.Items != nil {
  1010. for i, v := range s.Items {
  1011. if v == nil {
  1012. continue
  1013. }
  1014. if err := v.Validate(); err != nil {
  1015. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  1016. }
  1017. }
  1018. }
  1019. if invalidParams.Len() > 0 {
  1020. return invalidParams
  1021. }
  1022. return nil
  1023. }
  1024. type BatchPutAttributesOutput struct {
  1025. _ struct{} `type:"structure"`
  1026. }
  1027. // String returns the string representation
  1028. func (s BatchPutAttributesOutput) String() string {
  1029. return awsutil.Prettify(s)
  1030. }
  1031. // GoString returns the string representation
  1032. func (s BatchPutAttributesOutput) GoString() string {
  1033. return s.String()
  1034. }
  1035. type CreateDomainInput struct {
  1036. _ struct{} `type:"structure"`
  1037. // The name of the domain to create. The name can range between 3 and 255 characters
  1038. // and can contain the following characters: a-z, A-Z, 0-9, '_', '-', and '.'.
  1039. //
  1040. // DomainName is a required field
  1041. DomainName *string `type:"string" required:"true"`
  1042. }
  1043. // String returns the string representation
  1044. func (s CreateDomainInput) String() string {
  1045. return awsutil.Prettify(s)
  1046. }
  1047. // GoString returns the string representation
  1048. func (s CreateDomainInput) GoString() string {
  1049. return s.String()
  1050. }
  1051. // Validate inspects the fields of the type to determine if they are valid.
  1052. func (s *CreateDomainInput) Validate() error {
  1053. invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"}
  1054. if s.DomainName == nil {
  1055. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1056. }
  1057. if invalidParams.Len() > 0 {
  1058. return invalidParams
  1059. }
  1060. return nil
  1061. }
  1062. type CreateDomainOutput struct {
  1063. _ struct{} `type:"structure"`
  1064. }
  1065. // String returns the string representation
  1066. func (s CreateDomainOutput) String() string {
  1067. return awsutil.Prettify(s)
  1068. }
  1069. // GoString returns the string representation
  1070. func (s CreateDomainOutput) GoString() string {
  1071. return s.String()
  1072. }
  1073. type DeletableAttribute struct {
  1074. _ struct{} `type:"structure"`
  1075. // The name of the attribute.
  1076. //
  1077. // Name is a required field
  1078. Name *string `type:"string" required:"true"`
  1079. // The value of the attribute.
  1080. Value *string `type:"string"`
  1081. }
  1082. // String returns the string representation
  1083. func (s DeletableAttribute) String() string {
  1084. return awsutil.Prettify(s)
  1085. }
  1086. // GoString returns the string representation
  1087. func (s DeletableAttribute) GoString() string {
  1088. return s.String()
  1089. }
  1090. // Validate inspects the fields of the type to determine if they are valid.
  1091. func (s *DeletableAttribute) Validate() error {
  1092. invalidParams := request.ErrInvalidParams{Context: "DeletableAttribute"}
  1093. if s.Name == nil {
  1094. invalidParams.Add(request.NewErrParamRequired("Name"))
  1095. }
  1096. if invalidParams.Len() > 0 {
  1097. return invalidParams
  1098. }
  1099. return nil
  1100. }
  1101. type DeletableItem struct {
  1102. _ struct{} `type:"structure"`
  1103. Attributes []*DeletableAttribute `locationNameList:"Attribute" type:"list" flattened:"true"`
  1104. // Name is a required field
  1105. Name *string `locationName:"ItemName" type:"string" required:"true"`
  1106. }
  1107. // String returns the string representation
  1108. func (s DeletableItem) String() string {
  1109. return awsutil.Prettify(s)
  1110. }
  1111. // GoString returns the string representation
  1112. func (s DeletableItem) GoString() string {
  1113. return s.String()
  1114. }
  1115. // Validate inspects the fields of the type to determine if they are valid.
  1116. func (s *DeletableItem) Validate() error {
  1117. invalidParams := request.ErrInvalidParams{Context: "DeletableItem"}
  1118. if s.Name == nil {
  1119. invalidParams.Add(request.NewErrParamRequired("Name"))
  1120. }
  1121. if s.Attributes != nil {
  1122. for i, v := range s.Attributes {
  1123. if v == nil {
  1124. continue
  1125. }
  1126. if err := v.Validate(); err != nil {
  1127. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  1128. }
  1129. }
  1130. }
  1131. if invalidParams.Len() > 0 {
  1132. return invalidParams
  1133. }
  1134. return nil
  1135. }
  1136. type DeleteAttributesInput struct {
  1137. _ struct{} `type:"structure"`
  1138. // A list of Attributes. Similar to columns on a spreadsheet, attributes represent
  1139. // categories of data that can be assigned to items.
  1140. Attributes []*DeletableAttribute `locationNameList:"Attribute" type:"list" flattened:"true"`
  1141. // The name of the domain in which to perform the operation.
  1142. //
  1143. // DomainName is a required field
  1144. DomainName *string `type:"string" required:"true"`
  1145. // The update condition which, if specified, determines whether the specified
  1146. // attributes will be deleted or not. The update condition must be satisfied
  1147. // in order for this request to be processed and the attributes to be deleted.
  1148. Expected *UpdateCondition `type:"structure"`
  1149. // The name of the item. Similar to rows on a spreadsheet, items represent individual
  1150. // objects that contain one or more value-attribute pairs.
  1151. //
  1152. // ItemName is a required field
  1153. ItemName *string `type:"string" required:"true"`
  1154. }
  1155. // String returns the string representation
  1156. func (s DeleteAttributesInput) String() string {
  1157. return awsutil.Prettify(s)
  1158. }
  1159. // GoString returns the string representation
  1160. func (s DeleteAttributesInput) GoString() string {
  1161. return s.String()
  1162. }
  1163. // Validate inspects the fields of the type to determine if they are valid.
  1164. func (s *DeleteAttributesInput) Validate() error {
  1165. invalidParams := request.ErrInvalidParams{Context: "DeleteAttributesInput"}
  1166. if s.DomainName == nil {
  1167. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1168. }
  1169. if s.ItemName == nil {
  1170. invalidParams.Add(request.NewErrParamRequired("ItemName"))
  1171. }
  1172. if s.Attributes != nil {
  1173. for i, v := range s.Attributes {
  1174. if v == nil {
  1175. continue
  1176. }
  1177. if err := v.Validate(); err != nil {
  1178. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  1179. }
  1180. }
  1181. }
  1182. if invalidParams.Len() > 0 {
  1183. return invalidParams
  1184. }
  1185. return nil
  1186. }
  1187. type DeleteAttributesOutput struct {
  1188. _ struct{} `type:"structure"`
  1189. }
  1190. // String returns the string representation
  1191. func (s DeleteAttributesOutput) String() string {
  1192. return awsutil.Prettify(s)
  1193. }
  1194. // GoString returns the string representation
  1195. func (s DeleteAttributesOutput) GoString() string {
  1196. return s.String()
  1197. }
  1198. type DeleteDomainInput struct {
  1199. _ struct{} `type:"structure"`
  1200. // The name of the domain to delete.
  1201. //
  1202. // DomainName is a required field
  1203. DomainName *string `type:"string" required:"true"`
  1204. }
  1205. // String returns the string representation
  1206. func (s DeleteDomainInput) String() string {
  1207. return awsutil.Prettify(s)
  1208. }
  1209. // GoString returns the string representation
  1210. func (s DeleteDomainInput) GoString() string {
  1211. return s.String()
  1212. }
  1213. // Validate inspects the fields of the type to determine if they are valid.
  1214. func (s *DeleteDomainInput) Validate() error {
  1215. invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"}
  1216. if s.DomainName == nil {
  1217. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1218. }
  1219. if invalidParams.Len() > 0 {
  1220. return invalidParams
  1221. }
  1222. return nil
  1223. }
  1224. type DeleteDomainOutput struct {
  1225. _ struct{} `type:"structure"`
  1226. }
  1227. // String returns the string representation
  1228. func (s DeleteDomainOutput) String() string {
  1229. return awsutil.Prettify(s)
  1230. }
  1231. // GoString returns the string representation
  1232. func (s DeleteDomainOutput) GoString() string {
  1233. return s.String()
  1234. }
  1235. type DomainMetadataInput struct {
  1236. _ struct{} `type:"structure"`
  1237. // The name of the domain for which to display the metadata of.
  1238. //
  1239. // DomainName is a required field
  1240. DomainName *string `type:"string" required:"true"`
  1241. }
  1242. // String returns the string representation
  1243. func (s DomainMetadataInput) String() string {
  1244. return awsutil.Prettify(s)
  1245. }
  1246. // GoString returns the string representation
  1247. func (s DomainMetadataInput) GoString() string {
  1248. return s.String()
  1249. }
  1250. // Validate inspects the fields of the type to determine if they are valid.
  1251. func (s *DomainMetadataInput) Validate() error {
  1252. invalidParams := request.ErrInvalidParams{Context: "DomainMetadataInput"}
  1253. if s.DomainName == nil {
  1254. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1255. }
  1256. if invalidParams.Len() > 0 {
  1257. return invalidParams
  1258. }
  1259. return nil
  1260. }
  1261. type DomainMetadataOutput struct {
  1262. _ struct{} `type:"structure"`
  1263. // The number of unique attribute names in the domain.
  1264. AttributeNameCount *int64 `type:"integer"`
  1265. // The total size of all unique attribute names in the domain, in bytes.
  1266. AttributeNamesSizeBytes *int64 `type:"long"`
  1267. // The number of all attribute name/value pairs in the domain.
  1268. AttributeValueCount *int64 `type:"integer"`
  1269. // The total size of all attribute values in the domain, in bytes.
  1270. AttributeValuesSizeBytes *int64 `type:"long"`
  1271. // The number of all items in the domain.
  1272. ItemCount *int64 `type:"integer"`
  1273. // The total size of all item names in the domain, in bytes.
  1274. ItemNamesSizeBytes *int64 `type:"long"`
  1275. // The data and time when metadata was calculated, in Epoch (UNIX) seconds.
  1276. Timestamp *int64 `type:"integer"`
  1277. }
  1278. // String returns the string representation
  1279. func (s DomainMetadataOutput) String() string {
  1280. return awsutil.Prettify(s)
  1281. }
  1282. // GoString returns the string representation
  1283. func (s DomainMetadataOutput) GoString() string {
  1284. return s.String()
  1285. }
  1286. type GetAttributesInput struct {
  1287. _ struct{} `type:"structure"`
  1288. // The names of the attributes.
  1289. AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"`
  1290. // Determines whether or not strong consistency should be enforced when data
  1291. // is read from SimpleDB. If true
  1292. ConsistentRead *bool `type:"boolean"`
  1293. // The name of the domain in which to perform the operation.
  1294. //
  1295. // DomainName is a required field
  1296. DomainName *string `type:"string" required:"true"`
  1297. // The name of the item.
  1298. //
  1299. // ItemName is a required field
  1300. ItemName *string `type:"string" required:"true"`
  1301. }
  1302. // String returns the string representation
  1303. func (s GetAttributesInput) String() string {
  1304. return awsutil.Prettify(s)
  1305. }
  1306. // GoString returns the string representation
  1307. func (s GetAttributesInput) GoString() string {
  1308. return s.String()
  1309. }
  1310. // Validate inspects the fields of the type to determine if they are valid.
  1311. func (s *GetAttributesInput) Validate() error {
  1312. invalidParams := request.ErrInvalidParams{Context: "GetAttributesInput"}
  1313. if s.DomainName == nil {
  1314. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1315. }
  1316. if s.ItemName == nil {
  1317. invalidParams.Add(request.NewErrParamRequired("ItemName"))
  1318. }
  1319. if invalidParams.Len() > 0 {
  1320. return invalidParams
  1321. }
  1322. return nil
  1323. }
  1324. type GetAttributesOutput struct {
  1325. _ struct{} `type:"structure"`
  1326. // The list of attributes returned by the operation.
  1327. Attributes []*Attribute `locationNameList:"Attribute" type:"list" flattened:"true"`
  1328. }
  1329. // String returns the string representation
  1330. func (s GetAttributesOutput) String() string {
  1331. return awsutil.Prettify(s)
  1332. }
  1333. // GoString returns the string representation
  1334. func (s GetAttributesOutput) GoString() string {
  1335. return s.String()
  1336. }
  1337. type Item struct {
  1338. _ struct{} `type:"structure"`
  1339. AlternateNameEncoding *string `type:"string"`
  1340. // A list of attributes.
  1341. //
  1342. // Attributes is a required field
  1343. Attributes []*Attribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"`
  1344. // The name of the item.
  1345. //
  1346. // Name is a required field
  1347. Name *string `type:"string" required:"true"`
  1348. }
  1349. // String returns the string representation
  1350. func (s Item) String() string {
  1351. return awsutil.Prettify(s)
  1352. }
  1353. // GoString returns the string representation
  1354. func (s Item) GoString() string {
  1355. return s.String()
  1356. }
  1357. type ListDomainsInput struct {
  1358. _ struct{} `type:"structure"`
  1359. // The maximum number of domain names you want returned. The range is 1 to 100.
  1360. // The default setting is 100.
  1361. MaxNumberOfDomains *int64 `type:"integer"`
  1362. // A string informing Amazon SimpleDB where to start the next list of domain
  1363. // names.
  1364. NextToken *string `type:"string"`
  1365. }
  1366. // String returns the string representation
  1367. func (s ListDomainsInput) String() string {
  1368. return awsutil.Prettify(s)
  1369. }
  1370. // GoString returns the string representation
  1371. func (s ListDomainsInput) GoString() string {
  1372. return s.String()
  1373. }
  1374. type ListDomainsOutput struct {
  1375. _ struct{} `type:"structure"`
  1376. // A list of domain names that match the expression.
  1377. DomainNames []*string `locationNameList:"DomainName" type:"list" flattened:"true"`
  1378. // An opaque token indicating that there are more domains than the specified
  1379. // MaxNumberOfDomains
  1380. NextToken *string `type:"string"`
  1381. }
  1382. // String returns the string representation
  1383. func (s ListDomainsOutput) String() string {
  1384. return awsutil.Prettify(s)
  1385. }
  1386. // GoString returns the string representation
  1387. func (s ListDomainsOutput) GoString() string {
  1388. return s.String()
  1389. }
  1390. type PutAttributesInput struct {
  1391. _ struct{} `type:"structure"`
  1392. // The list of attributes.
  1393. //
  1394. // Attributes is a required field
  1395. Attributes []*ReplaceableAttribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"`
  1396. // The name of the domain in which to perform the operation.
  1397. //
  1398. // DomainName is a required field
  1399. DomainName *string `type:"string" required:"true"`
  1400. // The update condition which, if specified, determines whether the specified
  1401. // attributes will be updated or not. The update condition must be satisfied
  1402. // in order for this request to be processed and the attributes to be updated.
  1403. Expected *UpdateCondition `type:"structure"`
  1404. // The name of the item.
  1405. //
  1406. // ItemName is a required field
  1407. ItemName *string `type:"string" required:"true"`
  1408. }
  1409. // String returns the string representation
  1410. func (s PutAttributesInput) String() string {
  1411. return awsutil.Prettify(s)
  1412. }
  1413. // GoString returns the string representation
  1414. func (s PutAttributesInput) GoString() string {
  1415. return s.String()
  1416. }
  1417. // Validate inspects the fields of the type to determine if they are valid.
  1418. func (s *PutAttributesInput) Validate() error {
  1419. invalidParams := request.ErrInvalidParams{Context: "PutAttributesInput"}
  1420. if s.Attributes == nil {
  1421. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  1422. }
  1423. if s.DomainName == nil {
  1424. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1425. }
  1426. if s.ItemName == nil {
  1427. invalidParams.Add(request.NewErrParamRequired("ItemName"))
  1428. }
  1429. if s.Attributes != nil {
  1430. for i, v := range s.Attributes {
  1431. if v == nil {
  1432. continue
  1433. }
  1434. if err := v.Validate(); err != nil {
  1435. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  1436. }
  1437. }
  1438. }
  1439. if invalidParams.Len() > 0 {
  1440. return invalidParams
  1441. }
  1442. return nil
  1443. }
  1444. type PutAttributesOutput struct {
  1445. _ struct{} `type:"structure"`
  1446. }
  1447. // String returns the string representation
  1448. func (s PutAttributesOutput) String() string {
  1449. return awsutil.Prettify(s)
  1450. }
  1451. // GoString returns the string representation
  1452. func (s PutAttributesOutput) GoString() string {
  1453. return s.String()
  1454. }
  1455. type ReplaceableAttribute struct {
  1456. _ struct{} `type:"structure"`
  1457. // The name of the replaceable attribute.
  1458. //
  1459. // Name is a required field
  1460. Name *string `type:"string" required:"true"`
  1461. // A flag specifying whether or not to replace the attribute/value pair or to
  1462. // add a new attribute/value pair. The default setting is false
  1463. Replace *bool `type:"boolean"`
  1464. // The value of the replaceable attribute.
  1465. //
  1466. // Value is a required field
  1467. Value *string `type:"string" required:"true"`
  1468. }
  1469. // String returns the string representation
  1470. func (s ReplaceableAttribute) String() string {
  1471. return awsutil.Prettify(s)
  1472. }
  1473. // GoString returns the string representation
  1474. func (s ReplaceableAttribute) GoString() string {
  1475. return s.String()
  1476. }
  1477. // Validate inspects the fields of the type to determine if they are valid.
  1478. func (s *ReplaceableAttribute) Validate() error {
  1479. invalidParams := request.ErrInvalidParams{Context: "ReplaceableAttribute"}
  1480. if s.Name == nil {
  1481. invalidParams.Add(request.NewErrParamRequired("Name"))
  1482. }
  1483. if s.Value == nil {
  1484. invalidParams.Add(request.NewErrParamRequired("Value"))
  1485. }
  1486. if invalidParams.Len() > 0 {
  1487. return invalidParams
  1488. }
  1489. return nil
  1490. }
  1491. type ReplaceableItem struct {
  1492. _ struct{} `type:"structure"`
  1493. // The list of attributes for a replaceable item.
  1494. //
  1495. // Attributes is a required field
  1496. Attributes []*ReplaceableAttribute `locationNameList:"Attribute" type:"list" flattened:"true" required:"true"`
  1497. // The name of the replaceable item.
  1498. //
  1499. // Name is a required field
  1500. Name *string `locationName:"ItemName" type:"string" required:"true"`
  1501. }
  1502. // String returns the string representation
  1503. func (s ReplaceableItem) String() string {
  1504. return awsutil.Prettify(s)
  1505. }
  1506. // GoString returns the string representation
  1507. func (s ReplaceableItem) GoString() string {
  1508. return s.String()
  1509. }
  1510. // Validate inspects the fields of the type to determine if they are valid.
  1511. func (s *ReplaceableItem) Validate() error {
  1512. invalidParams := request.ErrInvalidParams{Context: "ReplaceableItem"}
  1513. if s.Attributes == nil {
  1514. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  1515. }
  1516. if s.Name == nil {
  1517. invalidParams.Add(request.NewErrParamRequired("Name"))
  1518. }
  1519. if s.Attributes != nil {
  1520. for i, v := range s.Attributes {
  1521. if v == nil {
  1522. continue
  1523. }
  1524. if err := v.Validate(); err != nil {
  1525. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  1526. }
  1527. }
  1528. }
  1529. if invalidParams.Len() > 0 {
  1530. return invalidParams
  1531. }
  1532. return nil
  1533. }
  1534. type SelectInput struct {
  1535. _ struct{} `type:"structure"`
  1536. // Determines whether or not strong consistency should be enforced when data
  1537. // is read from SimpleDB. If true
  1538. ConsistentRead *bool `type:"boolean"`
  1539. // A string informing Amazon SimpleDB where to start the next list of ItemNames
  1540. NextToken *string `type:"string"`
  1541. // The expression used to query the domain.
  1542. //
  1543. // SelectExpression is a required field
  1544. SelectExpression *string `type:"string" required:"true"`
  1545. }
  1546. // String returns the string representation
  1547. func (s SelectInput) String() string {
  1548. return awsutil.Prettify(s)
  1549. }
  1550. // GoString returns the string representation
  1551. func (s SelectInput) GoString() string {
  1552. return s.String()
  1553. }
  1554. // Validate inspects the fields of the type to determine if they are valid.
  1555. func (s *SelectInput) Validate() error {
  1556. invalidParams := request.ErrInvalidParams{Context: "SelectInput"}
  1557. if s.SelectExpression == nil {
  1558. invalidParams.Add(request.NewErrParamRequired("SelectExpression"))
  1559. }
  1560. if invalidParams.Len() > 0 {
  1561. return invalidParams
  1562. }
  1563. return nil
  1564. }
  1565. type SelectOutput struct {
  1566. _ struct{} `type:"structure"`
  1567. // A list of items that match the select expression.
  1568. Items []*Item `locationNameList:"Item" type:"list" flattened:"true"`
  1569. // An opaque token indicating that more items than MaxNumberOfItems
  1570. NextToken *string `type:"string"`
  1571. }
  1572. // String returns the string representation
  1573. func (s SelectOutput) String() string {
  1574. return awsutil.Prettify(s)
  1575. }
  1576. // GoString returns the string representation
  1577. func (s SelectOutput) GoString() string {
  1578. return s.String()
  1579. }
  1580. // Specifies the conditions under which data should be updated. If an update
  1581. // condition is specified for a request, the data will only be updated if the
  1582. // condition is satisfied. For example, if an attribute with a specific name
  1583. // and value exists, or if a specific attribute doesn't exist.
  1584. type UpdateCondition struct {
  1585. _ struct{} `type:"structure"`
  1586. // A value specifying whether or not the specified attribute must exist with
  1587. // the specified value in order for the update condition to be satisfied. Specify
  1588. // true if the attribute must exist for the update condition to be satisfied.
  1589. // Specify false if the attribute should not exist in order for the update condition
  1590. // to be satisfied.
  1591. Exists *bool `type:"boolean"`
  1592. // The name of the attribute involved in the condition.
  1593. Name *string `type:"string"`
  1594. // The value of an attribute. This value can only be specified when the Exists
  1595. // parameter is equal to true.
  1596. Value *string `type:"string"`
  1597. }
  1598. // String returns the string representation
  1599. func (s UpdateCondition) String() string {
  1600. return awsutil.Prettify(s)
  1601. }
  1602. // GoString returns the string representation
  1603. func (s UpdateCondition) GoString() string {
  1604. return s.String()
  1605. }