api.go 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package sqs provides a client for Amazon Simple Queue Service.
  3. package sqs
  4. import (
  5. "github.com/aws/aws-sdk-go/aws/awsutil"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. )
  8. const opAddPermission = "AddPermission"
  9. // AddPermissionRequest generates a request for the AddPermission operation.
  10. func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) {
  11. op := &request.Operation{
  12. Name: opAddPermission,
  13. HTTPMethod: "POST",
  14. HTTPPath: "/",
  15. }
  16. if input == nil {
  17. input = &AddPermissionInput{}
  18. }
  19. req = c.newRequest(op, input, output)
  20. output = &AddPermissionOutput{}
  21. req.Data = output
  22. return
  23. }
  24. // Adds a permission to a queue for a specific principal (http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P).
  25. // This allows for sharing access to the queue.
  26. //
  27. // When you create a queue, you have full control access rights for the queue.
  28. // Only you (as owner of the queue) can grant or deny permissions to the queue.
  29. // For more information about these permissions, see Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html)
  30. // in the Amazon SQS Developer Guide.
  31. //
  32. // AddPermission writes an Amazon SQS-generated policy. If you want to write
  33. // your own policy, use SetQueueAttributes to upload your policy. For more information
  34. // about writing your own policy, see Using The Access Policy Language (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AccessPolicyLanguage.html)
  35. // in the Amazon SQS Developer Guide.
  36. //
  37. // Some API actions take lists of parameters. These lists are specified using
  38. // the param.n notation. Values of n are integers starting from 1. For example,
  39. // a parameter list with two elements looks like this: &Attribute.1=this
  40. //
  41. // &Attribute.2=that
  42. func (c *SQS) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) {
  43. req, out := c.AddPermissionRequest(input)
  44. err := req.Send()
  45. return out, err
  46. }
  47. const opChangeMessageVisibility = "ChangeMessageVisibility"
  48. // ChangeMessageVisibilityRequest generates a request for the ChangeMessageVisibility operation.
  49. func (c *SQS) ChangeMessageVisibilityRequest(input *ChangeMessageVisibilityInput) (req *request.Request, output *ChangeMessageVisibilityOutput) {
  50. op := &request.Operation{
  51. Name: opChangeMessageVisibility,
  52. HTTPMethod: "POST",
  53. HTTPPath: "/",
  54. }
  55. if input == nil {
  56. input = &ChangeMessageVisibilityInput{}
  57. }
  58. req = c.newRequest(op, input, output)
  59. output = &ChangeMessageVisibilityOutput{}
  60. req.Data = output
  61. return
  62. }
  63. // Changes the visibility timeout of a specified message in a queue to a new
  64. // value. The maximum allowed timeout value you can set the value to is 12 hours.
  65. // This means you can't extend the timeout of a message in an existing queue
  66. // to more than a total visibility timeout of 12 hours. (For more information
  67. // visibility timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html)
  68. // in the Amazon SQS Developer Guide.)
  69. //
  70. // For example, let's say you have a message and its default message visibility
  71. // timeout is 30 minutes. You could call ChangeMessageVisiblity with a value
  72. // of two hours and the effective timeout would be two hours and 30 minutes.
  73. // When that time comes near you could again extend the time out by calling
  74. // ChangeMessageVisiblity, but this time the maximum allowed timeout would be
  75. // 9 hours and 30 minutes.
  76. //
  77. // There is a 120,000 limit for the number of inflight messages per queue.
  78. // Messages are inflight after they have been received from the queue by a consuming
  79. // component, but have not yet been deleted from the queue. If you reach the
  80. // 120,000 limit, you will receive an OverLimit error message from Amazon SQS.
  81. // To help avoid reaching the limit, you should delete the messages from the
  82. // queue after they have been processed. You can also increase the number of
  83. // queues you use to process the messages.
  84. //
  85. // If you attempt to set the VisibilityTimeout to an amount more than the maximum
  86. // time left, Amazon SQS returns an error. It will not automatically recalculate
  87. // and increase the timeout to the maximum time remaining. Unlike with a queue,
  88. // when you change the visibility timeout for a specific message, that timeout
  89. // value is applied immediately but is not saved in memory for that message.
  90. // If you don't delete a message after it is received, the visibility timeout
  91. // for the message the next time it is received reverts to the original timeout
  92. // value, not the value you set with the ChangeMessageVisibility action.
  93. func (c *SQS) ChangeMessageVisibility(input *ChangeMessageVisibilityInput) (*ChangeMessageVisibilityOutput, error) {
  94. req, out := c.ChangeMessageVisibilityRequest(input)
  95. err := req.Send()
  96. return out, err
  97. }
  98. const opChangeMessageVisibilityBatch = "ChangeMessageVisibilityBatch"
  99. // ChangeMessageVisibilityBatchRequest generates a request for the ChangeMessageVisibilityBatch operation.
  100. func (c *SQS) ChangeMessageVisibilityBatchRequest(input *ChangeMessageVisibilityBatchInput) (req *request.Request, output *ChangeMessageVisibilityBatchOutput) {
  101. op := &request.Operation{
  102. Name: opChangeMessageVisibilityBatch,
  103. HTTPMethod: "POST",
  104. HTTPPath: "/",
  105. }
  106. if input == nil {
  107. input = &ChangeMessageVisibilityBatchInput{}
  108. }
  109. req = c.newRequest(op, input, output)
  110. output = &ChangeMessageVisibilityBatchOutput{}
  111. req.Data = output
  112. return
  113. }
  114. // Changes the visibility timeout of multiple messages. This is a batch version
  115. // of ChangeMessageVisibility. The result of the action on each message is reported
  116. // individually in the response. You can send up to 10 ChangeMessageVisibility
  117. // requests with each ChangeMessageVisibilityBatch action.
  118. //
  119. // Because the batch request can result in a combination of successful and
  120. // unsuccessful actions, you should check for batch errors even when the call
  121. // returns an HTTP status code of 200. Some API actions take lists of parameters.
  122. // These lists are specified using the param.n notation. Values of n are integers
  123. // starting from 1. For example, a parameter list with two elements looks like
  124. // this: &Attribute.1=this
  125. //
  126. // &Attribute.2=that
  127. func (c *SQS) ChangeMessageVisibilityBatch(input *ChangeMessageVisibilityBatchInput) (*ChangeMessageVisibilityBatchOutput, error) {
  128. req, out := c.ChangeMessageVisibilityBatchRequest(input)
  129. err := req.Send()
  130. return out, err
  131. }
  132. const opCreateQueue = "CreateQueue"
  133. // CreateQueueRequest generates a request for the CreateQueue operation.
  134. func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, output *CreateQueueOutput) {
  135. op := &request.Operation{
  136. Name: opCreateQueue,
  137. HTTPMethod: "POST",
  138. HTTPPath: "/",
  139. }
  140. if input == nil {
  141. input = &CreateQueueInput{}
  142. }
  143. req = c.newRequest(op, input, output)
  144. output = &CreateQueueOutput{}
  145. req.Data = output
  146. return
  147. }
  148. // Creates a new queue, or returns the URL of an existing one. When you request
  149. // CreateQueue, you provide a name for the queue. To successfully create a new
  150. // queue, you must provide a name that is unique within the scope of your own
  151. // queues.
  152. //
  153. // If you delete a queue, you must wait at least 60 seconds before creating
  154. // a queue with the same name.
  155. //
  156. // You may pass one or more attributes in the request. If you do not provide
  157. // a value for any attribute, the queue will have the default value for that
  158. // attribute. Permitted attributes are the same that can be set using SetQueueAttributes.
  159. //
  160. // Use GetQueueUrl to get a queue's URL. GetQueueUrl requires only the QueueName
  161. // parameter.
  162. //
  163. // If you provide the name of an existing queue, along with the exact names
  164. // and values of all the queue's attributes, CreateQueue returns the queue URL
  165. // for the existing queue. If the queue name, attribute names, or attribute
  166. // values do not match an existing queue, CreateQueue returns an error.
  167. //
  168. // Some API actions take lists of parameters. These lists are specified using
  169. // the param.n notation. Values of n are integers starting from 1. For example,
  170. // a parameter list with two elements looks like this: &Attribute.1=this
  171. //
  172. // &Attribute.2=that
  173. func (c *SQS) CreateQueue(input *CreateQueueInput) (*CreateQueueOutput, error) {
  174. req, out := c.CreateQueueRequest(input)
  175. err := req.Send()
  176. return out, err
  177. }
  178. const opDeleteMessage = "DeleteMessage"
  179. // DeleteMessageRequest generates a request for the DeleteMessage operation.
  180. func (c *SQS) DeleteMessageRequest(input *DeleteMessageInput) (req *request.Request, output *DeleteMessageOutput) {
  181. op := &request.Operation{
  182. Name: opDeleteMessage,
  183. HTTPMethod: "POST",
  184. HTTPPath: "/",
  185. }
  186. if input == nil {
  187. input = &DeleteMessageInput{}
  188. }
  189. req = c.newRequest(op, input, output)
  190. output = &DeleteMessageOutput{}
  191. req.Data = output
  192. return
  193. }
  194. // Deletes the specified message from the specified queue. You specify the message
  195. // by using the message's receipt handle and not the message ID you received
  196. // when you sent the message. Even if the message is locked by another reader
  197. // due to the visibility timeout setting, it is still deleted from the queue.
  198. // If you leave a message in the queue for longer than the queue's configured
  199. // retention period, Amazon SQS automatically deletes it.
  200. //
  201. // The receipt handle is associated with a specific instance of receiving
  202. // the message. If you receive a message more than once, the receipt handle
  203. // you get each time you receive the message is different. When you request
  204. // DeleteMessage, if you don't provide the most recently received receipt handle
  205. // for the message, the request will still succeed, but the message might not
  206. // be deleted.
  207. //
  208. // It is possible you will receive a message even after you have deleted
  209. // it. This might happen on rare occasions if one of the servers storing a copy
  210. // of the message is unavailable when you request to delete the message. The
  211. // copy remains on the server and might be returned to you again on a subsequent
  212. // receive request. You should create your system to be idempotent so that receiving
  213. // a particular message more than once is not a problem.
  214. func (c *SQS) DeleteMessage(input *DeleteMessageInput) (*DeleteMessageOutput, error) {
  215. req, out := c.DeleteMessageRequest(input)
  216. err := req.Send()
  217. return out, err
  218. }
  219. const opDeleteMessageBatch = "DeleteMessageBatch"
  220. // DeleteMessageBatchRequest generates a request for the DeleteMessageBatch operation.
  221. func (c *SQS) DeleteMessageBatchRequest(input *DeleteMessageBatchInput) (req *request.Request, output *DeleteMessageBatchOutput) {
  222. op := &request.Operation{
  223. Name: opDeleteMessageBatch,
  224. HTTPMethod: "POST",
  225. HTTPPath: "/",
  226. }
  227. if input == nil {
  228. input = &DeleteMessageBatchInput{}
  229. }
  230. req = c.newRequest(op, input, output)
  231. output = &DeleteMessageBatchOutput{}
  232. req.Data = output
  233. return
  234. }
  235. // Deletes up to ten messages from the specified queue. This is a batch version
  236. // of DeleteMessage. The result of the delete action on each message is reported
  237. // individually in the response.
  238. //
  239. // Because the batch request can result in a combination of successful and
  240. // unsuccessful actions, you should check for batch errors even when the call
  241. // returns an HTTP status code of 200.
  242. //
  243. // Some API actions take lists of parameters. These lists are specified using
  244. // the param.n notation. Values of n are integers starting from 1. For example,
  245. // a parameter list with two elements looks like this: &Attribute.1=this
  246. //
  247. // &Attribute.2=that
  248. func (c *SQS) DeleteMessageBatch(input *DeleteMessageBatchInput) (*DeleteMessageBatchOutput, error) {
  249. req, out := c.DeleteMessageBatchRequest(input)
  250. err := req.Send()
  251. return out, err
  252. }
  253. const opDeleteQueue = "DeleteQueue"
  254. // DeleteQueueRequest generates a request for the DeleteQueue operation.
  255. func (c *SQS) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, output *DeleteQueueOutput) {
  256. op := &request.Operation{
  257. Name: opDeleteQueue,
  258. HTTPMethod: "POST",
  259. HTTPPath: "/",
  260. }
  261. if input == nil {
  262. input = &DeleteQueueInput{}
  263. }
  264. req = c.newRequest(op, input, output)
  265. output = &DeleteQueueOutput{}
  266. req.Data = output
  267. return
  268. }
  269. // Deletes the queue specified by the queue URL, regardless of whether the queue
  270. // is empty. If the specified queue does not exist, Amazon SQS returns a successful
  271. // response.
  272. //
  273. // Use DeleteQueue with care; once you delete your queue, any messages in
  274. // the queue are no longer available.
  275. //
  276. // When you delete a queue, the deletion process takes up to 60 seconds.
  277. // Requests you send involving that queue during the 60 seconds might succeed.
  278. // For example, a SendMessage request might succeed, but after the 60 seconds,
  279. // the queue and that message you sent no longer exist. Also, when you delete
  280. // a queue, you must wait at least 60 seconds before creating a queue with the
  281. // same name.
  282. //
  283. // We reserve the right to delete queues that have had no activity for more
  284. // than 30 days. For more information, see How Amazon SQS Queues Work (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSConcepts.html)
  285. // in the Amazon SQS Developer Guide.
  286. func (c *SQS) DeleteQueue(input *DeleteQueueInput) (*DeleteQueueOutput, error) {
  287. req, out := c.DeleteQueueRequest(input)
  288. err := req.Send()
  289. return out, err
  290. }
  291. const opGetQueueAttributes = "GetQueueAttributes"
  292. // GetQueueAttributesRequest generates a request for the GetQueueAttributes operation.
  293. func (c *SQS) GetQueueAttributesRequest(input *GetQueueAttributesInput) (req *request.Request, output *GetQueueAttributesOutput) {
  294. op := &request.Operation{
  295. Name: opGetQueueAttributes,
  296. HTTPMethod: "POST",
  297. HTTPPath: "/",
  298. }
  299. if input == nil {
  300. input = &GetQueueAttributesInput{}
  301. }
  302. req = c.newRequest(op, input, output)
  303. output = &GetQueueAttributesOutput{}
  304. req.Data = output
  305. return
  306. }
  307. // Gets attributes for the specified queue. The following attributes are supported:
  308. // All - returns all values. ApproximateNumberOfMessages - returns the approximate
  309. // number of visible messages in a queue. For more information, see Resources
  310. // Required to Process Messages (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ApproximateNumber.html)
  311. // in the Amazon SQS Developer Guide. ApproximateNumberOfMessagesNotVisible
  312. // - returns the approximate number of messages that are not timed-out and not
  313. // deleted. For more information, see Resources Required to Process Messages
  314. // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ApproximateNumber.html)
  315. // in the Amazon SQS Developer Guide. VisibilityTimeout - returns the visibility
  316. // timeout for the queue. For more information about visibility timeout, see
  317. // Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html)
  318. // in the Amazon SQS Developer Guide. CreatedTimestamp - returns the time when
  319. // the queue was created (epoch time in seconds). LastModifiedTimestamp - returns
  320. // the time when the queue was last changed (epoch time in seconds). Policy
  321. // - returns the queue's policy. MaximumMessageSize - returns the limit of
  322. // how many bytes a message can contain before Amazon SQS rejects it. MessageRetentionPeriod
  323. // - returns the number of seconds Amazon SQS retains a message. QueueArn -
  324. // returns the queue's Amazon resource name (ARN). ApproximateNumberOfMessagesDelayed
  325. // - returns the approximate number of messages that are pending to be added
  326. // to the queue. DelaySeconds - returns the default delay on the queue in seconds.
  327. // ReceiveMessageWaitTimeSeconds - returns the time for which a ReceiveMessage
  328. // call will wait for a message to arrive. RedrivePolicy - returns the parameters
  329. // for dead letter queue functionality of the source queue. For more information
  330. // about RedrivePolicy and dead letter queues, see Using Amazon SQS Dead Letter
  331. // Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html)
  332. // in the Amazon SQS Developer Guide.
  333. //
  334. // Going forward, new attributes might be added. If you are writing code that
  335. // calls this action, we recommend that you structure your code so that it can
  336. // handle new attributes gracefully. Some API actions take lists of parameters.
  337. // These lists are specified using the param.n notation. Values of n are integers
  338. // starting from 1. For example, a parameter list with two elements looks like
  339. // this: &Attribute.1=this
  340. //
  341. // &Attribute.2=that
  342. func (c *SQS) GetQueueAttributes(input *GetQueueAttributesInput) (*GetQueueAttributesOutput, error) {
  343. req, out := c.GetQueueAttributesRequest(input)
  344. err := req.Send()
  345. return out, err
  346. }
  347. const opGetQueueUrl = "GetQueueUrl"
  348. // GetQueueUrlRequest generates a request for the GetQueueUrl operation.
  349. func (c *SQS) GetQueueUrlRequest(input *GetQueueUrlInput) (req *request.Request, output *GetQueueUrlOutput) {
  350. op := &request.Operation{
  351. Name: opGetQueueUrl,
  352. HTTPMethod: "POST",
  353. HTTPPath: "/",
  354. }
  355. if input == nil {
  356. input = &GetQueueUrlInput{}
  357. }
  358. req = c.newRequest(op, input, output)
  359. output = &GetQueueUrlOutput{}
  360. req.Data = output
  361. return
  362. }
  363. // Returns the URL of an existing queue. This action provides a simple way to
  364. // retrieve the URL of an Amazon SQS queue.
  365. //
  366. // To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId
  367. // parameter to specify the account ID of the queue's owner. The queue's owner
  368. // must grant you permission to access the queue. For more information about
  369. // shared queue access, see AddPermission or go to Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html)
  370. // in the Amazon SQS Developer Guide.
  371. func (c *SQS) GetQueueUrl(input *GetQueueUrlInput) (*GetQueueUrlOutput, error) {
  372. req, out := c.GetQueueUrlRequest(input)
  373. err := req.Send()
  374. return out, err
  375. }
  376. const opListDeadLetterSourceQueues = "ListDeadLetterSourceQueues"
  377. // ListDeadLetterSourceQueuesRequest generates a request for the ListDeadLetterSourceQueues operation.
  378. func (c *SQS) ListDeadLetterSourceQueuesRequest(input *ListDeadLetterSourceQueuesInput) (req *request.Request, output *ListDeadLetterSourceQueuesOutput) {
  379. op := &request.Operation{
  380. Name: opListDeadLetterSourceQueues,
  381. HTTPMethod: "POST",
  382. HTTPPath: "/",
  383. }
  384. if input == nil {
  385. input = &ListDeadLetterSourceQueuesInput{}
  386. }
  387. req = c.newRequest(op, input, output)
  388. output = &ListDeadLetterSourceQueuesOutput{}
  389. req.Data = output
  390. return
  391. }
  392. // Returns a list of your queues that have the RedrivePolicy queue attribute
  393. // configured with a dead letter queue.
  394. //
  395. // For more information about using dead letter queues, see Using Amazon SQS
  396. // Dead Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html).
  397. func (c *SQS) ListDeadLetterSourceQueues(input *ListDeadLetterSourceQueuesInput) (*ListDeadLetterSourceQueuesOutput, error) {
  398. req, out := c.ListDeadLetterSourceQueuesRequest(input)
  399. err := req.Send()
  400. return out, err
  401. }
  402. const opListQueues = "ListQueues"
  403. // ListQueuesRequest generates a request for the ListQueues operation.
  404. func (c *SQS) ListQueuesRequest(input *ListQueuesInput) (req *request.Request, output *ListQueuesOutput) {
  405. op := &request.Operation{
  406. Name: opListQueues,
  407. HTTPMethod: "POST",
  408. HTTPPath: "/",
  409. }
  410. if input == nil {
  411. input = &ListQueuesInput{}
  412. }
  413. req = c.newRequest(op, input, output)
  414. output = &ListQueuesOutput{}
  415. req.Data = output
  416. return
  417. }
  418. // Returns a list of your queues. The maximum number of queues that can be returned
  419. // is 1000. If you specify a value for the optional QueueNamePrefix parameter,
  420. // only queues with a name beginning with the specified value are returned.
  421. func (c *SQS) ListQueues(input *ListQueuesInput) (*ListQueuesOutput, error) {
  422. req, out := c.ListQueuesRequest(input)
  423. err := req.Send()
  424. return out, err
  425. }
  426. const opPurgeQueue = "PurgeQueue"
  427. // PurgeQueueRequest generates a request for the PurgeQueue operation.
  428. func (c *SQS) PurgeQueueRequest(input *PurgeQueueInput) (req *request.Request, output *PurgeQueueOutput) {
  429. op := &request.Operation{
  430. Name: opPurgeQueue,
  431. HTTPMethod: "POST",
  432. HTTPPath: "/",
  433. }
  434. if input == nil {
  435. input = &PurgeQueueInput{}
  436. }
  437. req = c.newRequest(op, input, output)
  438. output = &PurgeQueueOutput{}
  439. req.Data = output
  440. return
  441. }
  442. // Deletes the messages in a queue specified by the queue URL.
  443. //
  444. // When you use the PurgeQueue API, the deleted messages in the queue cannot
  445. // be retrieved. When you purge a queue, the message deletion process takes
  446. // up to 60 seconds. All messages sent to the queue before calling PurgeQueue
  447. // will be deleted; messages sent to the queue while it is being purged may
  448. // be deleted. While the queue is being purged, messages sent to the queue before
  449. // PurgeQueue was called may be received, but will be deleted within the next
  450. // minute.
  451. func (c *SQS) PurgeQueue(input *PurgeQueueInput) (*PurgeQueueOutput, error) {
  452. req, out := c.PurgeQueueRequest(input)
  453. err := req.Send()
  454. return out, err
  455. }
  456. const opReceiveMessage = "ReceiveMessage"
  457. // ReceiveMessageRequest generates a request for the ReceiveMessage operation.
  458. func (c *SQS) ReceiveMessageRequest(input *ReceiveMessageInput) (req *request.Request, output *ReceiveMessageOutput) {
  459. op := &request.Operation{
  460. Name: opReceiveMessage,
  461. HTTPMethod: "POST",
  462. HTTPPath: "/",
  463. }
  464. if input == nil {
  465. input = &ReceiveMessageInput{}
  466. }
  467. req = c.newRequest(op, input, output)
  468. output = &ReceiveMessageOutput{}
  469. req.Data = output
  470. return
  471. }
  472. // Retrieves one or more messages, with a maximum limit of 10 messages, from
  473. // the specified queue. Long poll support is enabled by using the WaitTimeSeconds
  474. // parameter. For more information, see Amazon SQS Long Poll (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html)
  475. // in the Amazon SQS Developer Guide.
  476. //
  477. // Short poll is the default behavior where a weighted random set of machines
  478. // is sampled on a ReceiveMessage call. This means only the messages on the
  479. // sampled machines are returned. If the number of messages in the queue is
  480. // small (less than 1000), it is likely you will get fewer messages than you
  481. // requested per ReceiveMessage call. If the number of messages in the queue
  482. // is extremely small, you might not receive any messages in a particular ReceiveMessage
  483. // response; in which case you should repeat the request.
  484. //
  485. // For each message returned, the response includes the following:
  486. //
  487. // Message body
  488. //
  489. // MD5 digest of the message body. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html
  490. // (http://www.faqs.org/rfcs/rfc1321.html).
  491. //
  492. // Message ID you received when you sent the message to the queue.
  493. //
  494. // Receipt handle.
  495. //
  496. // Message attributes.
  497. //
  498. // MD5 digest of the message attributes.
  499. //
  500. // The receipt handle is the identifier you must provide when deleting the
  501. // message. For more information, see Queue and Message Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ImportantIdentifiers.html)
  502. // in the Amazon SQS Developer Guide.
  503. //
  504. // You can provide the VisibilityTimeout parameter in your request, which
  505. // will be applied to the messages that Amazon SQS returns in the response.
  506. // If you do not include the parameter, the overall visibility timeout for the
  507. // queue is used for the returned messages. For more information, see Visibility
  508. // Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html)
  509. // in the Amazon SQS Developer Guide.
  510. //
  511. // Going forward, new attributes might be added. If you are writing code
  512. // that calls this action, we recommend that you structure your code so that
  513. // it can handle new attributes gracefully.
  514. func (c *SQS) ReceiveMessage(input *ReceiveMessageInput) (*ReceiveMessageOutput, error) {
  515. req, out := c.ReceiveMessageRequest(input)
  516. err := req.Send()
  517. return out, err
  518. }
  519. const opRemovePermission = "RemovePermission"
  520. // RemovePermissionRequest generates a request for the RemovePermission operation.
  521. func (c *SQS) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) {
  522. op := &request.Operation{
  523. Name: opRemovePermission,
  524. HTTPMethod: "POST",
  525. HTTPPath: "/",
  526. }
  527. if input == nil {
  528. input = &RemovePermissionInput{}
  529. }
  530. req = c.newRequest(op, input, output)
  531. output = &RemovePermissionOutput{}
  532. req.Data = output
  533. return
  534. }
  535. // Revokes any permissions in the queue policy that matches the specified Label
  536. // parameter. Only the owner of the queue can remove permissions.
  537. func (c *SQS) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) {
  538. req, out := c.RemovePermissionRequest(input)
  539. err := req.Send()
  540. return out, err
  541. }
  542. const opSendMessage = "SendMessage"
  543. // SendMessageRequest generates a request for the SendMessage operation.
  544. func (c *SQS) SendMessageRequest(input *SendMessageInput) (req *request.Request, output *SendMessageOutput) {
  545. op := &request.Operation{
  546. Name: opSendMessage,
  547. HTTPMethod: "POST",
  548. HTTPPath: "/",
  549. }
  550. if input == nil {
  551. input = &SendMessageInput{}
  552. }
  553. req = c.newRequest(op, input, output)
  554. output = &SendMessageOutput{}
  555. req.Data = output
  556. return
  557. }
  558. // Delivers a message to the specified queue. With Amazon SQS, you now have
  559. // the ability to send large payload messages that are up to 256KB (262,144
  560. // bytes) in size. To send large payloads, you must use an AWS SDK that supports
  561. // SigV4 signing. To verify whether SigV4 is supported for an AWS SDK, check
  562. // the SDK release notes.
  563. //
  564. // The following list shows the characters (in Unicode) allowed in your message,
  565. // according to the W3C XML specification. For more information, go to http://www.w3.org/TR/REC-xml/#charsets
  566. // (http://www.w3.org/TR/REC-xml/#charsets) If you send any characters not included
  567. // in the list, your request will be rejected.
  568. //
  569. // #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]
  570. func (c *SQS) SendMessage(input *SendMessageInput) (*SendMessageOutput, error) {
  571. req, out := c.SendMessageRequest(input)
  572. err := req.Send()
  573. return out, err
  574. }
  575. const opSendMessageBatch = "SendMessageBatch"
  576. // SendMessageBatchRequest generates a request for the SendMessageBatch operation.
  577. func (c *SQS) SendMessageBatchRequest(input *SendMessageBatchInput) (req *request.Request, output *SendMessageBatchOutput) {
  578. op := &request.Operation{
  579. Name: opSendMessageBatch,
  580. HTTPMethod: "POST",
  581. HTTPPath: "/",
  582. }
  583. if input == nil {
  584. input = &SendMessageBatchInput{}
  585. }
  586. req = c.newRequest(op, input, output)
  587. output = &SendMessageBatchOutput{}
  588. req.Data = output
  589. return
  590. }
  591. // Delivers up to ten messages to the specified queue. This is a batch version
  592. // of SendMessage. The result of the send action on each message is reported
  593. // individually in the response. The maximum allowed individual message size
  594. // is 256 KB (262,144 bytes).
  595. //
  596. // The maximum total payload size (i.e., the sum of all a batch's individual
  597. // message lengths) is also 256 KB (262,144 bytes).
  598. //
  599. // If the DelaySeconds parameter is not specified for an entry, the default
  600. // for the queue is used.
  601. //
  602. // The following list shows the characters (in Unicode) that are allowed in
  603. // your message, according to the W3C XML specification. For more information,
  604. // go to http://www.faqs.org/rfcs/rfc1321.html (http://www.faqs.org/rfcs/rfc1321.html).
  605. // If you send any characters that are not included in the list, your request
  606. // will be rejected. #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD]
  607. // | [#x10000 to #x10FFFF]
  608. //
  609. // Because the batch request can result in a combination of successful and
  610. // unsuccessful actions, you should check for batch errors even when the call
  611. // returns an HTTP status code of 200. Some API actions take lists of parameters.
  612. // These lists are specified using the param.n notation. Values of n are integers
  613. // starting from 1. For example, a parameter list with two elements looks like
  614. // this: &Attribute.1=this
  615. //
  616. // &Attribute.2=that
  617. func (c *SQS) SendMessageBatch(input *SendMessageBatchInput) (*SendMessageBatchOutput, error) {
  618. req, out := c.SendMessageBatchRequest(input)
  619. err := req.Send()
  620. return out, err
  621. }
  622. const opSetQueueAttributes = "SetQueueAttributes"
  623. // SetQueueAttributesRequest generates a request for the SetQueueAttributes operation.
  624. func (c *SQS) SetQueueAttributesRequest(input *SetQueueAttributesInput) (req *request.Request, output *SetQueueAttributesOutput) {
  625. op := &request.Operation{
  626. Name: opSetQueueAttributes,
  627. HTTPMethod: "POST",
  628. HTTPPath: "/",
  629. }
  630. if input == nil {
  631. input = &SetQueueAttributesInput{}
  632. }
  633. req = c.newRequest(op, input, output)
  634. output = &SetQueueAttributesOutput{}
  635. req.Data = output
  636. return
  637. }
  638. // Sets the value of one or more queue attributes. When you change a queue's
  639. // attributes, the change can take up to 60 seconds for most of the attributes
  640. // to propagate throughout the SQS system. Changes made to the MessageRetentionPeriod
  641. // attribute can take up to 15 minutes.
  642. //
  643. // Going forward, new attributes might be added. If you are writing code that
  644. // calls this action, we recommend that you structure your code so that it can
  645. // handle new attributes gracefully.
  646. func (c *SQS) SetQueueAttributes(input *SetQueueAttributesInput) (*SetQueueAttributesOutput, error) {
  647. req, out := c.SetQueueAttributesRequest(input)
  648. err := req.Send()
  649. return out, err
  650. }
  651. type AddPermissionInput struct {
  652. // The AWS account number of the principal (http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P)
  653. // who will be given permission. The principal must have an AWS account, but
  654. // does not need to be signed up for Amazon SQS. For information about locating
  655. // the AWS account identification, see Your AWS Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AWSCredentials.html)
  656. // in the Amazon SQS Developer Guide.
  657. AWSAccountIds []*string `locationNameList:"AWSAccountId" type:"list" flattened:"true" required:"true"`
  658. // The action the client wants to allow for the specified principal. The following
  659. // are valid values: * | SendMessage | ReceiveMessage | DeleteMessage | ChangeMessageVisibility
  660. // | GetQueueAttributes | GetQueueUrl. For more information about these actions,
  661. // see Understanding Permissions (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html#PermissionTypes)
  662. // in the Amazon SQS Developer Guide.
  663. //
  664. // Specifying SendMessage, DeleteMessage, or ChangeMessageVisibility for the
  665. // ActionName.n also grants permissions for the corresponding batch versions
  666. // of those actions: SendMessageBatch, DeleteMessageBatch, and ChangeMessageVisibilityBatch.
  667. Actions []*string `locationNameList:"ActionName" type:"list" flattened:"true" required:"true"`
  668. // The unique identification of the permission you're setting (e.g., AliceSendMessage).
  669. // Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-),
  670. // and underscores (_) are allowed.
  671. Label *string `type:"string" required:"true"`
  672. // The URL of the Amazon SQS queue to take action on.
  673. QueueUrl *string `type:"string" required:"true"`
  674. metadataAddPermissionInput `json:"-" xml:"-"`
  675. }
  676. type metadataAddPermissionInput struct {
  677. SDKShapeTraits bool `type:"structure"`
  678. }
  679. // String returns the string representation
  680. func (s AddPermissionInput) String() string {
  681. return awsutil.Prettify(s)
  682. }
  683. // GoString returns the string representation
  684. func (s AddPermissionInput) GoString() string {
  685. return s.String()
  686. }
  687. type AddPermissionOutput struct {
  688. metadataAddPermissionOutput `json:"-" xml:"-"`
  689. }
  690. type metadataAddPermissionOutput struct {
  691. SDKShapeTraits bool `type:"structure"`
  692. }
  693. // String returns the string representation
  694. func (s AddPermissionOutput) String() string {
  695. return awsutil.Prettify(s)
  696. }
  697. // GoString returns the string representation
  698. func (s AddPermissionOutput) GoString() string {
  699. return s.String()
  700. }
  701. // This is used in the responses of batch API to give a detailed description
  702. // of the result of an action on each entry in the request.
  703. type BatchResultErrorEntry struct {
  704. // An error code representing why the action failed on this entry.
  705. Code *string `type:"string" required:"true"`
  706. // The id of an entry in a batch request.
  707. Id *string `type:"string" required:"true"`
  708. // A message explaining why the action failed on this entry.
  709. Message *string `type:"string"`
  710. // Whether the error happened due to the sender's fault.
  711. SenderFault *bool `type:"boolean" required:"true"`
  712. metadataBatchResultErrorEntry `json:"-" xml:"-"`
  713. }
  714. type metadataBatchResultErrorEntry struct {
  715. SDKShapeTraits bool `type:"structure"`
  716. }
  717. // String returns the string representation
  718. func (s BatchResultErrorEntry) String() string {
  719. return awsutil.Prettify(s)
  720. }
  721. // GoString returns the string representation
  722. func (s BatchResultErrorEntry) GoString() string {
  723. return s.String()
  724. }
  725. type ChangeMessageVisibilityBatchInput struct {
  726. // A list of receipt handles of the messages for which the visibility timeout
  727. // must be changed.
  728. Entries []*ChangeMessageVisibilityBatchRequestEntry `locationNameList:"ChangeMessageVisibilityBatchRequestEntry" type:"list" flattened:"true" required:"true"`
  729. // The URL of the Amazon SQS queue to take action on.
  730. QueueUrl *string `type:"string" required:"true"`
  731. metadataChangeMessageVisibilityBatchInput `json:"-" xml:"-"`
  732. }
  733. type metadataChangeMessageVisibilityBatchInput struct {
  734. SDKShapeTraits bool `type:"structure"`
  735. }
  736. // String returns the string representation
  737. func (s ChangeMessageVisibilityBatchInput) String() string {
  738. return awsutil.Prettify(s)
  739. }
  740. // GoString returns the string representation
  741. func (s ChangeMessageVisibilityBatchInput) GoString() string {
  742. return s.String()
  743. }
  744. // For each message in the batch, the response contains a ChangeMessageVisibilityBatchResultEntry
  745. // tag if the message succeeds or a BatchResultErrorEntry tag if the message
  746. // fails.
  747. type ChangeMessageVisibilityBatchOutput struct {
  748. // A list of BatchResultErrorEntry items.
  749. Failed []*BatchResultErrorEntry `locationNameList:"BatchResultErrorEntry" type:"list" flattened:"true" required:"true"`
  750. // A list of ChangeMessageVisibilityBatchResultEntry items.
  751. Successful []*ChangeMessageVisibilityBatchResultEntry `locationNameList:"ChangeMessageVisibilityBatchResultEntry" type:"list" flattened:"true" required:"true"`
  752. metadataChangeMessageVisibilityBatchOutput `json:"-" xml:"-"`
  753. }
  754. type metadataChangeMessageVisibilityBatchOutput struct {
  755. SDKShapeTraits bool `type:"structure"`
  756. }
  757. // String returns the string representation
  758. func (s ChangeMessageVisibilityBatchOutput) String() string {
  759. return awsutil.Prettify(s)
  760. }
  761. // GoString returns the string representation
  762. func (s ChangeMessageVisibilityBatchOutput) GoString() string {
  763. return s.String()
  764. }
  765. // Encloses a receipt handle and an entry id for each message in ChangeMessageVisibilityBatch.
  766. //
  767. // All of the following parameters are list parameters that must be prefixed
  768. // with ChangeMessageVisibilityBatchRequestEntry.n, where n is an integer value
  769. // starting with 1. For example, a parameter list for this action might look
  770. // like this:
  771. //
  772. // &ChangeMessageVisibilityBatchRequestEntry.1.Id=change_visibility_msg_2
  773. //
  774. // &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=Your_Receipt_Handle
  775. //
  776. // &ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45
  777. type ChangeMessageVisibilityBatchRequestEntry struct {
  778. // An identifier for this particular receipt handle. This is used to communicate
  779. // the result. Note that the Ids of a batch request need to be unique within
  780. // the request.
  781. Id *string `type:"string" required:"true"`
  782. // A receipt handle.
  783. ReceiptHandle *string `type:"string" required:"true"`
  784. // The new value (in seconds) for the message's visibility timeout.
  785. VisibilityTimeout *int64 `type:"integer"`
  786. metadataChangeMessageVisibilityBatchRequestEntry `json:"-" xml:"-"`
  787. }
  788. type metadataChangeMessageVisibilityBatchRequestEntry struct {
  789. SDKShapeTraits bool `type:"structure"`
  790. }
  791. // String returns the string representation
  792. func (s ChangeMessageVisibilityBatchRequestEntry) String() string {
  793. return awsutil.Prettify(s)
  794. }
  795. // GoString returns the string representation
  796. func (s ChangeMessageVisibilityBatchRequestEntry) GoString() string {
  797. return s.String()
  798. }
  799. // Encloses the id of an entry in ChangeMessageVisibilityBatch.
  800. type ChangeMessageVisibilityBatchResultEntry struct {
  801. // Represents a message whose visibility timeout has been changed successfully.
  802. Id *string `type:"string" required:"true"`
  803. metadataChangeMessageVisibilityBatchResultEntry `json:"-" xml:"-"`
  804. }
  805. type metadataChangeMessageVisibilityBatchResultEntry struct {
  806. SDKShapeTraits bool `type:"structure"`
  807. }
  808. // String returns the string representation
  809. func (s ChangeMessageVisibilityBatchResultEntry) String() string {
  810. return awsutil.Prettify(s)
  811. }
  812. // GoString returns the string representation
  813. func (s ChangeMessageVisibilityBatchResultEntry) GoString() string {
  814. return s.String()
  815. }
  816. type ChangeMessageVisibilityInput struct {
  817. // The URL of the Amazon SQS queue to take action on.
  818. QueueUrl *string `type:"string" required:"true"`
  819. // The receipt handle associated with the message whose visibility timeout should
  820. // be changed. This parameter is returned by the ReceiveMessage action.
  821. ReceiptHandle *string `type:"string" required:"true"`
  822. // The new value (in seconds - from 0 to 43200 - maximum 12 hours) for the message's
  823. // visibility timeout.
  824. VisibilityTimeout *int64 `type:"integer" required:"true"`
  825. metadataChangeMessageVisibilityInput `json:"-" xml:"-"`
  826. }
  827. type metadataChangeMessageVisibilityInput struct {
  828. SDKShapeTraits bool `type:"structure"`
  829. }
  830. // String returns the string representation
  831. func (s ChangeMessageVisibilityInput) String() string {
  832. return awsutil.Prettify(s)
  833. }
  834. // GoString returns the string representation
  835. func (s ChangeMessageVisibilityInput) GoString() string {
  836. return s.String()
  837. }
  838. type ChangeMessageVisibilityOutput struct {
  839. metadataChangeMessageVisibilityOutput `json:"-" xml:"-"`
  840. }
  841. type metadataChangeMessageVisibilityOutput struct {
  842. SDKShapeTraits bool `type:"structure"`
  843. }
  844. // String returns the string representation
  845. func (s ChangeMessageVisibilityOutput) String() string {
  846. return awsutil.Prettify(s)
  847. }
  848. // GoString returns the string representation
  849. func (s ChangeMessageVisibilityOutput) GoString() string {
  850. return s.String()
  851. }
  852. type CreateQueueInput struct {
  853. // A map of attributes with their corresponding values.
  854. //
  855. // The following lists the names, descriptions, and values of the special request
  856. // parameters the CreateQueue action uses:
  857. //
  858. // DelaySeconds - The time in seconds that the delivery of all messages
  859. // in the queue will be delayed. An integer from 0 to 900 (15 minutes). The
  860. // default for this attribute is 0 (zero). MaximumMessageSize - The limit of
  861. // how many bytes a message can contain before Amazon SQS rejects it. An integer
  862. // from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this
  863. // attribute is 262144 (256 KiB). MessageRetentionPeriod - The number of seconds
  864. // Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute)
  865. // to 1209600 (14 days). The default for this attribute is 345600 (4 days).
  866. // Policy - The queue's policy. A valid AWS policy. For more information about
  867. // policy structure, see Overview of AWS IAM Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html)
  868. // in the Amazon IAM User Guide. ReceiveMessageWaitTimeSeconds - The time for
  869. // which a ReceiveMessage call will wait for a message to arrive. An integer
  870. // from 0 to 20 (seconds). The default for this attribute is 0. VisibilityTimeout
  871. // - The visibility timeout for the queue. An integer from 0 to 43200 (12 hours).
  872. // The default for this attribute is 30. For more information about visibility
  873. // timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html)
  874. // in the Amazon SQS Developer Guide.
  875. Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
  876. // The name for the queue to be created.
  877. QueueName *string `type:"string" required:"true"`
  878. metadataCreateQueueInput `json:"-" xml:"-"`
  879. }
  880. type metadataCreateQueueInput struct {
  881. SDKShapeTraits bool `type:"structure"`
  882. }
  883. // String returns the string representation
  884. func (s CreateQueueInput) String() string {
  885. return awsutil.Prettify(s)
  886. }
  887. // GoString returns the string representation
  888. func (s CreateQueueInput) GoString() string {
  889. return s.String()
  890. }
  891. // Returns the QueueUrl element of the created queue.
  892. type CreateQueueOutput struct {
  893. // The URL for the created Amazon SQS queue.
  894. QueueUrl *string `type:"string"`
  895. metadataCreateQueueOutput `json:"-" xml:"-"`
  896. }
  897. type metadataCreateQueueOutput struct {
  898. SDKShapeTraits bool `type:"structure"`
  899. }
  900. // String returns the string representation
  901. func (s CreateQueueOutput) String() string {
  902. return awsutil.Prettify(s)
  903. }
  904. // GoString returns the string representation
  905. func (s CreateQueueOutput) GoString() string {
  906. return s.String()
  907. }
  908. type DeleteMessageBatchInput struct {
  909. // A list of receipt handles for the messages to be deleted.
  910. Entries []*DeleteMessageBatchRequestEntry `locationNameList:"DeleteMessageBatchRequestEntry" type:"list" flattened:"true" required:"true"`
  911. // The URL of the Amazon SQS queue to take action on.
  912. QueueUrl *string `type:"string" required:"true"`
  913. metadataDeleteMessageBatchInput `json:"-" xml:"-"`
  914. }
  915. type metadataDeleteMessageBatchInput struct {
  916. SDKShapeTraits bool `type:"structure"`
  917. }
  918. // String returns the string representation
  919. func (s DeleteMessageBatchInput) String() string {
  920. return awsutil.Prettify(s)
  921. }
  922. // GoString returns the string representation
  923. func (s DeleteMessageBatchInput) GoString() string {
  924. return s.String()
  925. }
  926. // For each message in the batch, the response contains a DeleteMessageBatchResultEntry
  927. // tag if the message is deleted or a BatchResultErrorEntry tag if the message
  928. // cannot be deleted.
  929. type DeleteMessageBatchOutput struct {
  930. // A list of BatchResultErrorEntry items.
  931. Failed []*BatchResultErrorEntry `locationNameList:"BatchResultErrorEntry" type:"list" flattened:"true" required:"true"`
  932. // A list of DeleteMessageBatchResultEntry items.
  933. Successful []*DeleteMessageBatchResultEntry `locationNameList:"DeleteMessageBatchResultEntry" type:"list" flattened:"true" required:"true"`
  934. metadataDeleteMessageBatchOutput `json:"-" xml:"-"`
  935. }
  936. type metadataDeleteMessageBatchOutput struct {
  937. SDKShapeTraits bool `type:"structure"`
  938. }
  939. // String returns the string representation
  940. func (s DeleteMessageBatchOutput) String() string {
  941. return awsutil.Prettify(s)
  942. }
  943. // GoString returns the string representation
  944. func (s DeleteMessageBatchOutput) GoString() string {
  945. return s.String()
  946. }
  947. // Encloses a receipt handle and an identifier for it.
  948. type DeleteMessageBatchRequestEntry struct {
  949. // An identifier for this particular receipt handle. This is used to communicate
  950. // the result. Note that the Ids of a batch request need to be unique within
  951. // the request.
  952. Id *string `type:"string" required:"true"`
  953. // A receipt handle.
  954. ReceiptHandle *string `type:"string" required:"true"`
  955. metadataDeleteMessageBatchRequestEntry `json:"-" xml:"-"`
  956. }
  957. type metadataDeleteMessageBatchRequestEntry struct {
  958. SDKShapeTraits bool `type:"structure"`
  959. }
  960. // String returns the string representation
  961. func (s DeleteMessageBatchRequestEntry) String() string {
  962. return awsutil.Prettify(s)
  963. }
  964. // GoString returns the string representation
  965. func (s DeleteMessageBatchRequestEntry) GoString() string {
  966. return s.String()
  967. }
  968. // Encloses the id an entry in DeleteMessageBatch.
  969. type DeleteMessageBatchResultEntry struct {
  970. // Represents a successfully deleted message.
  971. Id *string `type:"string" required:"true"`
  972. metadataDeleteMessageBatchResultEntry `json:"-" xml:"-"`
  973. }
  974. type metadataDeleteMessageBatchResultEntry struct {
  975. SDKShapeTraits bool `type:"structure"`
  976. }
  977. // String returns the string representation
  978. func (s DeleteMessageBatchResultEntry) String() string {
  979. return awsutil.Prettify(s)
  980. }
  981. // GoString returns the string representation
  982. func (s DeleteMessageBatchResultEntry) GoString() string {
  983. return s.String()
  984. }
  985. type DeleteMessageInput struct {
  986. // The URL of the Amazon SQS queue to take action on.
  987. QueueUrl *string `type:"string" required:"true"`
  988. // The receipt handle associated with the message to delete.
  989. ReceiptHandle *string `type:"string" required:"true"`
  990. metadataDeleteMessageInput `json:"-" xml:"-"`
  991. }
  992. type metadataDeleteMessageInput struct {
  993. SDKShapeTraits bool `type:"structure"`
  994. }
  995. // String returns the string representation
  996. func (s DeleteMessageInput) String() string {
  997. return awsutil.Prettify(s)
  998. }
  999. // GoString returns the string representation
  1000. func (s DeleteMessageInput) GoString() string {
  1001. return s.String()
  1002. }
  1003. type DeleteMessageOutput struct {
  1004. metadataDeleteMessageOutput `json:"-" xml:"-"`
  1005. }
  1006. type metadataDeleteMessageOutput struct {
  1007. SDKShapeTraits bool `type:"structure"`
  1008. }
  1009. // String returns the string representation
  1010. func (s DeleteMessageOutput) String() string {
  1011. return awsutil.Prettify(s)
  1012. }
  1013. // GoString returns the string representation
  1014. func (s DeleteMessageOutput) GoString() string {
  1015. return s.String()
  1016. }
  1017. type DeleteQueueInput struct {
  1018. // The URL of the Amazon SQS queue to take action on.
  1019. QueueUrl *string `type:"string" required:"true"`
  1020. metadataDeleteQueueInput `json:"-" xml:"-"`
  1021. }
  1022. type metadataDeleteQueueInput struct {
  1023. SDKShapeTraits bool `type:"structure"`
  1024. }
  1025. // String returns the string representation
  1026. func (s DeleteQueueInput) String() string {
  1027. return awsutil.Prettify(s)
  1028. }
  1029. // GoString returns the string representation
  1030. func (s DeleteQueueInput) GoString() string {
  1031. return s.String()
  1032. }
  1033. type DeleteQueueOutput struct {
  1034. metadataDeleteQueueOutput `json:"-" xml:"-"`
  1035. }
  1036. type metadataDeleteQueueOutput struct {
  1037. SDKShapeTraits bool `type:"structure"`
  1038. }
  1039. // String returns the string representation
  1040. func (s DeleteQueueOutput) String() string {
  1041. return awsutil.Prettify(s)
  1042. }
  1043. // GoString returns the string representation
  1044. func (s DeleteQueueOutput) GoString() string {
  1045. return s.String()
  1046. }
  1047. type GetQueueAttributesInput struct {
  1048. // A list of attributes to retrieve information for.
  1049. AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"`
  1050. // The URL of the Amazon SQS queue to take action on.
  1051. QueueUrl *string `type:"string" required:"true"`
  1052. metadataGetQueueAttributesInput `json:"-" xml:"-"`
  1053. }
  1054. type metadataGetQueueAttributesInput struct {
  1055. SDKShapeTraits bool `type:"structure"`
  1056. }
  1057. // String returns the string representation
  1058. func (s GetQueueAttributesInput) String() string {
  1059. return awsutil.Prettify(s)
  1060. }
  1061. // GoString returns the string representation
  1062. func (s GetQueueAttributesInput) GoString() string {
  1063. return s.String()
  1064. }
  1065. // A list of returned queue attributes.
  1066. type GetQueueAttributesOutput struct {
  1067. // A map of attributes to the respective values.
  1068. Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
  1069. metadataGetQueueAttributesOutput `json:"-" xml:"-"`
  1070. }
  1071. type metadataGetQueueAttributesOutput struct {
  1072. SDKShapeTraits bool `type:"structure"`
  1073. }
  1074. // String returns the string representation
  1075. func (s GetQueueAttributesOutput) String() string {
  1076. return awsutil.Prettify(s)
  1077. }
  1078. // GoString returns the string representation
  1079. func (s GetQueueAttributesOutput) GoString() string {
  1080. return s.String()
  1081. }
  1082. type GetQueueUrlInput struct {
  1083. // The name of the queue whose URL must be fetched. Maximum 80 characters; alphanumeric
  1084. // characters, hyphens (-), and underscores (_) are allowed.
  1085. QueueName *string `type:"string" required:"true"`
  1086. // The AWS account ID of the account that created the queue.
  1087. QueueOwnerAWSAccountId *string `type:"string"`
  1088. metadataGetQueueUrlInput `json:"-" xml:"-"`
  1089. }
  1090. type metadataGetQueueUrlInput struct {
  1091. SDKShapeTraits bool `type:"structure"`
  1092. }
  1093. // String returns the string representation
  1094. func (s GetQueueUrlInput) String() string {
  1095. return awsutil.Prettify(s)
  1096. }
  1097. // GoString returns the string representation
  1098. func (s GetQueueUrlInput) GoString() string {
  1099. return s.String()
  1100. }
  1101. // For more information, see Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/UnderstandingResponses.html)
  1102. // in the Amazon SQS Developer Guide.
  1103. type GetQueueUrlOutput struct {
  1104. // The URL for the queue.
  1105. QueueUrl *string `type:"string"`
  1106. metadataGetQueueUrlOutput `json:"-" xml:"-"`
  1107. }
  1108. type metadataGetQueueUrlOutput struct {
  1109. SDKShapeTraits bool `type:"structure"`
  1110. }
  1111. // String returns the string representation
  1112. func (s GetQueueUrlOutput) String() string {
  1113. return awsutil.Prettify(s)
  1114. }
  1115. // GoString returns the string representation
  1116. func (s GetQueueUrlOutput) GoString() string {
  1117. return s.String()
  1118. }
  1119. type ListDeadLetterSourceQueuesInput struct {
  1120. // The queue URL of a dead letter queue.
  1121. QueueUrl *string `type:"string" required:"true"`
  1122. metadataListDeadLetterSourceQueuesInput `json:"-" xml:"-"`
  1123. }
  1124. type metadataListDeadLetterSourceQueuesInput struct {
  1125. SDKShapeTraits bool `type:"structure"`
  1126. }
  1127. // String returns the string representation
  1128. func (s ListDeadLetterSourceQueuesInput) String() string {
  1129. return awsutil.Prettify(s)
  1130. }
  1131. // GoString returns the string representation
  1132. func (s ListDeadLetterSourceQueuesInput) GoString() string {
  1133. return s.String()
  1134. }
  1135. // A list of your dead letter source queues.
  1136. type ListDeadLetterSourceQueuesOutput struct {
  1137. // A list of source queue URLs that have the RedrivePolicy queue attribute configured
  1138. // with a dead letter queue.
  1139. QueueUrls []*string `locationName:"queueUrls" locationNameList:"QueueUrl" type:"list" flattened:"true" required:"true"`
  1140. metadataListDeadLetterSourceQueuesOutput `json:"-" xml:"-"`
  1141. }
  1142. type metadataListDeadLetterSourceQueuesOutput struct {
  1143. SDKShapeTraits bool `type:"structure"`
  1144. }
  1145. // String returns the string representation
  1146. func (s ListDeadLetterSourceQueuesOutput) String() string {
  1147. return awsutil.Prettify(s)
  1148. }
  1149. // GoString returns the string representation
  1150. func (s ListDeadLetterSourceQueuesOutput) GoString() string {
  1151. return s.String()
  1152. }
  1153. type ListQueuesInput struct {
  1154. // A string to use for filtering the list results. Only those queues whose name
  1155. // begins with the specified string are returned.
  1156. QueueNamePrefix *string `type:"string"`
  1157. metadataListQueuesInput `json:"-" xml:"-"`
  1158. }
  1159. type metadataListQueuesInput struct {
  1160. SDKShapeTraits bool `type:"structure"`
  1161. }
  1162. // String returns the string representation
  1163. func (s ListQueuesInput) String() string {
  1164. return awsutil.Prettify(s)
  1165. }
  1166. // GoString returns the string representation
  1167. func (s ListQueuesInput) GoString() string {
  1168. return s.String()
  1169. }
  1170. // A list of your queues.
  1171. type ListQueuesOutput struct {
  1172. // A list of queue URLs, up to 1000 entries.
  1173. QueueUrls []*string `locationNameList:"QueueUrl" type:"list" flattened:"true"`
  1174. metadataListQueuesOutput `json:"-" xml:"-"`
  1175. }
  1176. type metadataListQueuesOutput struct {
  1177. SDKShapeTraits bool `type:"structure"`
  1178. }
  1179. // String returns the string representation
  1180. func (s ListQueuesOutput) String() string {
  1181. return awsutil.Prettify(s)
  1182. }
  1183. // GoString returns the string representation
  1184. func (s ListQueuesOutput) GoString() string {
  1185. return s.String()
  1186. }
  1187. // An Amazon SQS message.
  1188. type Message struct {
  1189. // SenderId, SentTimestamp, ApproximateReceiveCount, and/or ApproximateFirstReceiveTimestamp.
  1190. // SentTimestamp and ApproximateFirstReceiveTimestamp are each returned as an
  1191. // integer representing the epoch time (http://en.wikipedia.org/wiki/Unix_time)
  1192. // in milliseconds.
  1193. Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
  1194. // The message's contents (not URL-encoded).
  1195. Body *string `type:"string"`
  1196. // An MD5 digest of the non-URL-encoded message body string.
  1197. MD5OfBody *string `type:"string"`
  1198. // An MD5 digest of the non-URL-encoded message attribute string. This can be
  1199. // used to verify that Amazon SQS received the message correctly. Amazon SQS
  1200. // first URL decodes the message before creating the MD5 digest. For information
  1201. // about MD5, go to http://www.faqs.org/rfcs/rfc1321.html (http://www.faqs.org/rfcs/rfc1321.html).
  1202. MD5OfMessageAttributes *string `type:"string"`
  1203. // Each message attribute consists of a Name, Type, and Value. For more information,
  1204. // see Message Attribute Items (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSMessageAttributes.html#SQSMessageAttributesNTV).
  1205. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
  1206. // A unique identifier for the message. Message IDs are considered unique across
  1207. // all AWS accounts for an extended period of time.
  1208. MessageId *string `type:"string"`
  1209. // An identifier associated with the act of receiving the message. A new receipt
  1210. // handle is returned every time you receive a message. When deleting a message,
  1211. // you provide the last received receipt handle to delete the message.
  1212. ReceiptHandle *string `type:"string"`
  1213. metadataMessage `json:"-" xml:"-"`
  1214. }
  1215. type metadataMessage struct {
  1216. SDKShapeTraits bool `type:"structure"`
  1217. }
  1218. // String returns the string representation
  1219. func (s Message) String() string {
  1220. return awsutil.Prettify(s)
  1221. }
  1222. // GoString returns the string representation
  1223. func (s Message) GoString() string {
  1224. return s.String()
  1225. }
  1226. // The user-specified message attribute value. For string data types, the value
  1227. // attribute has the same restrictions on the content as the message body. For
  1228. // more information, see SendMessage (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html).
  1229. //
  1230. // Name, type, and value must not be empty or null. In addition, the message
  1231. // body should not be empty or null. All parts of the message attribute, including
  1232. // name, type, and value, are included in the message size restriction, which
  1233. // is currently 256 KB (262,144 bytes).
  1234. type MessageAttributeValue struct {
  1235. // Not implemented. Reserved for future use.
  1236. BinaryListValues [][]byte `locationName:"BinaryListValue" locationNameList:"BinaryListValue" type:"list" flattened:"true"`
  1237. // Binary type attributes can store any binary data, for example, compressed
  1238. // data, encrypted data, or images.
  1239. BinaryValue []byte `type:"blob"`
  1240. // Amazon SQS supports the following logical data types: String, Number, and
  1241. // Binary. In addition, you can append your own custom labels. For more information,
  1242. // see Message Attribute Data Types (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSMessageAttributes.html#SQSMessageAttributes.DataTypes).
  1243. DataType *string `type:"string" required:"true"`
  1244. // Not implemented. Reserved for future use.
  1245. StringListValues []*string `locationName:"StringListValue" locationNameList:"StringListValue" type:"list" flattened:"true"`
  1246. // Strings are Unicode with UTF8 binary encoding. For a list of code values,
  1247. // see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  1248. StringValue *string `type:"string"`
  1249. metadataMessageAttributeValue `json:"-" xml:"-"`
  1250. }
  1251. type metadataMessageAttributeValue struct {
  1252. SDKShapeTraits bool `type:"structure"`
  1253. }
  1254. // String returns the string representation
  1255. func (s MessageAttributeValue) String() string {
  1256. return awsutil.Prettify(s)
  1257. }
  1258. // GoString returns the string representation
  1259. func (s MessageAttributeValue) GoString() string {
  1260. return s.String()
  1261. }
  1262. type PurgeQueueInput struct {
  1263. // The queue URL of the queue to delete the messages from when using the PurgeQueue
  1264. // API.
  1265. QueueUrl *string `type:"string" required:"true"`
  1266. metadataPurgeQueueInput `json:"-" xml:"-"`
  1267. }
  1268. type metadataPurgeQueueInput struct {
  1269. SDKShapeTraits bool `type:"structure"`
  1270. }
  1271. // String returns the string representation
  1272. func (s PurgeQueueInput) String() string {
  1273. return awsutil.Prettify(s)
  1274. }
  1275. // GoString returns the string representation
  1276. func (s PurgeQueueInput) GoString() string {
  1277. return s.String()
  1278. }
  1279. type PurgeQueueOutput struct {
  1280. metadataPurgeQueueOutput `json:"-" xml:"-"`
  1281. }
  1282. type metadataPurgeQueueOutput struct {
  1283. SDKShapeTraits bool `type:"structure"`
  1284. }
  1285. // String returns the string representation
  1286. func (s PurgeQueueOutput) String() string {
  1287. return awsutil.Prettify(s)
  1288. }
  1289. // GoString returns the string representation
  1290. func (s PurgeQueueOutput) GoString() string {
  1291. return s.String()
  1292. }
  1293. type ReceiveMessageInput struct {
  1294. // A list of attributes that need to be returned along with each message.
  1295. //
  1296. // The following lists the names and descriptions of the attributes that can
  1297. // be returned:
  1298. //
  1299. // All - returns all values. ApproximateFirstReceiveTimestamp - returns
  1300. // the time when the message was first received from the queue (epoch time in
  1301. // milliseconds). ApproximateReceiveCount - returns the number of times a message
  1302. // has been received from the queue but not deleted. SenderId - returns the
  1303. // AWS account number (or the IP address, if anonymous access is allowed) of
  1304. // the sender. SentTimestamp - returns the time when the message was sent to
  1305. // the queue (epoch time in milliseconds).
  1306. AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"`
  1307. // The maximum number of messages to return. Amazon SQS never returns more messages
  1308. // than this value but may return fewer. Values can be from 1 to 10. Default
  1309. // is 1.
  1310. //
  1311. // All of the messages are not necessarily returned.
  1312. MaxNumberOfMessages *int64 `type:"integer"`
  1313. // The name of the message attribute, where N is the index. The message attribute
  1314. // name can contain the following characters: A-Z, a-z, 0-9, underscore (_),
  1315. // hyphen (-), and period (.). The name must not start or end with a period,
  1316. // and it should not have successive periods. The name is case sensitive and
  1317. // must be unique among all attribute names for the message. The name can be
  1318. // up to 256 characters long. The name cannot start with "AWS." or "Amazon."
  1319. // (or any variations in casing), because these prefixes are reserved for use
  1320. // by Amazon Web Services.
  1321. //
  1322. // When using ReceiveMessage, you can send a list of attribute names to receive,
  1323. // or you can return all of the attributes by specifying "All" or ".*" in your
  1324. // request. You can also use "foo.*" to return all message attributes starting
  1325. // with the "foo" prefix.
  1326. MessageAttributeNames []*string `locationNameList:"MessageAttributeName" type:"list" flattened:"true"`
  1327. // The URL of the Amazon SQS queue to take action on.
  1328. QueueUrl *string `type:"string" required:"true"`
  1329. // The duration (in seconds) that the received messages are hidden from subsequent
  1330. // retrieve requests after being retrieved by a ReceiveMessage request.
  1331. VisibilityTimeout *int64 `type:"integer"`
  1332. // The duration (in seconds) for which the call will wait for a message to arrive
  1333. // in the queue before returning. If a message is available, the call will return
  1334. // sooner than WaitTimeSeconds.
  1335. WaitTimeSeconds *int64 `type:"integer"`
  1336. metadataReceiveMessageInput `json:"-" xml:"-"`
  1337. }
  1338. type metadataReceiveMessageInput struct {
  1339. SDKShapeTraits bool `type:"structure"`
  1340. }
  1341. // String returns the string representation
  1342. func (s ReceiveMessageInput) String() string {
  1343. return awsutil.Prettify(s)
  1344. }
  1345. // GoString returns the string representation
  1346. func (s ReceiveMessageInput) GoString() string {
  1347. return s.String()
  1348. }
  1349. // A list of received messages.
  1350. type ReceiveMessageOutput struct {
  1351. // A list of messages.
  1352. Messages []*Message `locationNameList:"Message" type:"list" flattened:"true"`
  1353. metadataReceiveMessageOutput `json:"-" xml:"-"`
  1354. }
  1355. type metadataReceiveMessageOutput struct {
  1356. SDKShapeTraits bool `type:"structure"`
  1357. }
  1358. // String returns the string representation
  1359. func (s ReceiveMessageOutput) String() string {
  1360. return awsutil.Prettify(s)
  1361. }
  1362. // GoString returns the string representation
  1363. func (s ReceiveMessageOutput) GoString() string {
  1364. return s.String()
  1365. }
  1366. type RemovePermissionInput struct {
  1367. // The identification of the permission to remove. This is the label added with
  1368. // the AddPermission action.
  1369. Label *string `type:"string" required:"true"`
  1370. // The URL of the Amazon SQS queue to take action on.
  1371. QueueUrl *string `type:"string" required:"true"`
  1372. metadataRemovePermissionInput `json:"-" xml:"-"`
  1373. }
  1374. type metadataRemovePermissionInput struct {
  1375. SDKShapeTraits bool `type:"structure"`
  1376. }
  1377. // String returns the string representation
  1378. func (s RemovePermissionInput) String() string {
  1379. return awsutil.Prettify(s)
  1380. }
  1381. // GoString returns the string representation
  1382. func (s RemovePermissionInput) GoString() string {
  1383. return s.String()
  1384. }
  1385. type RemovePermissionOutput struct {
  1386. metadataRemovePermissionOutput `json:"-" xml:"-"`
  1387. }
  1388. type metadataRemovePermissionOutput struct {
  1389. SDKShapeTraits bool `type:"structure"`
  1390. }
  1391. // String returns the string representation
  1392. func (s RemovePermissionOutput) String() string {
  1393. return awsutil.Prettify(s)
  1394. }
  1395. // GoString returns the string representation
  1396. func (s RemovePermissionOutput) GoString() string {
  1397. return s.String()
  1398. }
  1399. type SendMessageBatchInput struct {
  1400. // A list of SendMessageBatchRequestEntry items.
  1401. Entries []*SendMessageBatchRequestEntry `locationNameList:"SendMessageBatchRequestEntry" type:"list" flattened:"true" required:"true"`
  1402. // The URL of the Amazon SQS queue to take action on.
  1403. QueueUrl *string `type:"string" required:"true"`
  1404. metadataSendMessageBatchInput `json:"-" xml:"-"`
  1405. }
  1406. type metadataSendMessageBatchInput struct {
  1407. SDKShapeTraits bool `type:"structure"`
  1408. }
  1409. // String returns the string representation
  1410. func (s SendMessageBatchInput) String() string {
  1411. return awsutil.Prettify(s)
  1412. }
  1413. // GoString returns the string representation
  1414. func (s SendMessageBatchInput) GoString() string {
  1415. return s.String()
  1416. }
  1417. // For each message in the batch, the response contains a SendMessageBatchResultEntry
  1418. // tag if the message succeeds or a BatchResultErrorEntry tag if the message
  1419. // fails.
  1420. type SendMessageBatchOutput struct {
  1421. // A list of BatchResultErrorEntry items with the error detail about each message
  1422. // that could not be enqueued.
  1423. Failed []*BatchResultErrorEntry `locationNameList:"BatchResultErrorEntry" type:"list" flattened:"true" required:"true"`
  1424. // A list of SendMessageBatchResultEntry items.
  1425. Successful []*SendMessageBatchResultEntry `locationNameList:"SendMessageBatchResultEntry" type:"list" flattened:"true" required:"true"`
  1426. metadataSendMessageBatchOutput `json:"-" xml:"-"`
  1427. }
  1428. type metadataSendMessageBatchOutput struct {
  1429. SDKShapeTraits bool `type:"structure"`
  1430. }
  1431. // String returns the string representation
  1432. func (s SendMessageBatchOutput) String() string {
  1433. return awsutil.Prettify(s)
  1434. }
  1435. // GoString returns the string representation
  1436. func (s SendMessageBatchOutput) GoString() string {
  1437. return s.String()
  1438. }
  1439. // Contains the details of a single Amazon SQS message along with a Id.
  1440. type SendMessageBatchRequestEntry struct {
  1441. // The number of seconds for which the message has to be delayed.
  1442. DelaySeconds *int64 `type:"integer"`
  1443. // An identifier for the message in this batch. This is used to communicate
  1444. // the result. Note that the Ids of a batch request need to be unique within
  1445. // the request.
  1446. Id *string `type:"string" required:"true"`
  1447. // Each message attribute consists of a Name, Type, and Value. For more information,
  1448. // see Message Attribute Items (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSMessageAttributes.html#SQSMessageAttributesNTV).
  1449. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
  1450. // Body of the message.
  1451. MessageBody *string `type:"string" required:"true"`
  1452. metadataSendMessageBatchRequestEntry `json:"-" xml:"-"`
  1453. }
  1454. type metadataSendMessageBatchRequestEntry struct {
  1455. SDKShapeTraits bool `type:"structure"`
  1456. }
  1457. // String returns the string representation
  1458. func (s SendMessageBatchRequestEntry) String() string {
  1459. return awsutil.Prettify(s)
  1460. }
  1461. // GoString returns the string representation
  1462. func (s SendMessageBatchRequestEntry) GoString() string {
  1463. return s.String()
  1464. }
  1465. // Encloses a message ID for successfully enqueued message of a SendMessageBatch.
  1466. type SendMessageBatchResultEntry struct {
  1467. // An identifier for the message in this batch.
  1468. Id *string `type:"string" required:"true"`
  1469. // An MD5 digest of the non-URL-encoded message attribute string. This can be
  1470. // used to verify that Amazon SQS received the message batch correctly. Amazon
  1471. // SQS first URL decodes the message before creating the MD5 digest. For information
  1472. // about MD5, go to http://www.faqs.org/rfcs/rfc1321.html (http://www.faqs.org/rfcs/rfc1321.html).
  1473. MD5OfMessageAttributes *string `type:"string"`
  1474. // An MD5 digest of the non-URL-encoded message body string. This can be used
  1475. // to verify that Amazon SQS received the message correctly. Amazon SQS first
  1476. // URL decodes the message before creating the MD5 digest. For information about
  1477. // MD5, go to http://www.faqs.org/rfcs/rfc1321.html (http://www.faqs.org/rfcs/rfc1321.html).
  1478. MD5OfMessageBody *string `type:"string" required:"true"`
  1479. // An identifier for the message.
  1480. MessageId *string `type:"string" required:"true"`
  1481. metadataSendMessageBatchResultEntry `json:"-" xml:"-"`
  1482. }
  1483. type metadataSendMessageBatchResultEntry struct {
  1484. SDKShapeTraits bool `type:"structure"`
  1485. }
  1486. // String returns the string representation
  1487. func (s SendMessageBatchResultEntry) String() string {
  1488. return awsutil.Prettify(s)
  1489. }
  1490. // GoString returns the string representation
  1491. func (s SendMessageBatchResultEntry) GoString() string {
  1492. return s.String()
  1493. }
  1494. type SendMessageInput struct {
  1495. // The number of seconds (0 to 900 - 15 minutes) to delay a specific message.
  1496. // Messages with a positive DelaySeconds value become available for processing
  1497. // after the delay time is finished. If you don't specify a value, the default
  1498. // value for the queue applies.
  1499. DelaySeconds *int64 `type:"integer"`
  1500. // Each message attribute consists of a Name, Type, and Value. For more information,
  1501. // see Message Attribute Items (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSMessageAttributes.html#SQSMessageAttributesNTV).
  1502. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
  1503. // The message to send. String maximum 256 KB in size. For a list of allowed
  1504. // characters, see the preceding important note.
  1505. MessageBody *string `type:"string" required:"true"`
  1506. // The URL of the Amazon SQS queue to take action on.
  1507. QueueUrl *string `type:"string" required:"true"`
  1508. metadataSendMessageInput `json:"-" xml:"-"`
  1509. }
  1510. type metadataSendMessageInput struct {
  1511. SDKShapeTraits bool `type:"structure"`
  1512. }
  1513. // String returns the string representation
  1514. func (s SendMessageInput) String() string {
  1515. return awsutil.Prettify(s)
  1516. }
  1517. // GoString returns the string representation
  1518. func (s SendMessageInput) GoString() string {
  1519. return s.String()
  1520. }
  1521. // The MD5OfMessageBody and MessageId elements.
  1522. type SendMessageOutput struct {
  1523. // An MD5 digest of the non-URL-encoded message attribute string. This can be
  1524. // used to verify that Amazon SQS received the message correctly. Amazon SQS
  1525. // first URL decodes the message before creating the MD5 digest. For information
  1526. // about MD5, go to http://www.faqs.org/rfcs/rfc1321.html (http://www.faqs.org/rfcs/rfc1321.html).
  1527. MD5OfMessageAttributes *string `type:"string"`
  1528. // An MD5 digest of the non-URL-encoded message body string. This can be used
  1529. // to verify that Amazon SQS received the message correctly. Amazon SQS first
  1530. // URL decodes the message before creating the MD5 digest. For information about
  1531. // MD5, go to http://www.faqs.org/rfcs/rfc1321.html (http://www.faqs.org/rfcs/rfc1321.html).
  1532. MD5OfMessageBody *string `type:"string"`
  1533. // An element containing the message ID of the message sent to the queue. For
  1534. // more information, see Queue and Message Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ImportantIdentifiers.html)
  1535. // in the Amazon SQS Developer Guide.
  1536. MessageId *string `type:"string"`
  1537. metadataSendMessageOutput `json:"-" xml:"-"`
  1538. }
  1539. type metadataSendMessageOutput struct {
  1540. SDKShapeTraits bool `type:"structure"`
  1541. }
  1542. // String returns the string representation
  1543. func (s SendMessageOutput) String() string {
  1544. return awsutil.Prettify(s)
  1545. }
  1546. // GoString returns the string representation
  1547. func (s SendMessageOutput) GoString() string {
  1548. return s.String()
  1549. }
  1550. type SetQueueAttributesInput struct {
  1551. // A map of attributes to set.
  1552. //
  1553. // The following lists the names, descriptions, and values of the special request
  1554. // parameters the SetQueueAttributes action uses:
  1555. //
  1556. // DelaySeconds - The time in seconds that the delivery of all messages
  1557. // in the queue will be delayed. An integer from 0 to 900 (15 minutes). The
  1558. // default for this attribute is 0 (zero). MaximumMessageSize - The limit of
  1559. // how many bytes a message can contain before Amazon SQS rejects it. An integer
  1560. // from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this
  1561. // attribute is 262144 (256 KiB). MessageRetentionPeriod - The number of seconds
  1562. // Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute)
  1563. // to 1209600 (14 days). The default for this attribute is 345600 (4 days).
  1564. // Policy - The queue's policy. A valid AWS policy. For more information about
  1565. // policy structure, see Overview of AWS IAM Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html)
  1566. // in the Amazon IAM User Guide. ReceiveMessageWaitTimeSeconds - The time for
  1567. // which a ReceiveMessage call will wait for a message to arrive. An integer
  1568. // from 0 to 20 (seconds). The default for this attribute is 0. VisibilityTimeout
  1569. // - The visibility timeout for the queue. An integer from 0 to 43200 (12 hours).
  1570. // The default for this attribute is 30. For more information about visibility
  1571. // timeout, see Visibility Timeout in the Amazon SQS Developer Guide. RedrivePolicy
  1572. // - The parameters for dead letter queue functionality of the source queue.
  1573. // For more information about RedrivePolicy and dead letter queues, see Using
  1574. // Amazon SQS Dead Letter Queues in the Amazon SQS Developer Guide.
  1575. Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true" required:"true"`
  1576. // The URL of the Amazon SQS queue to take action on.
  1577. QueueUrl *string `type:"string" required:"true"`
  1578. metadataSetQueueAttributesInput `json:"-" xml:"-"`
  1579. }
  1580. type metadataSetQueueAttributesInput struct {
  1581. SDKShapeTraits bool `type:"structure"`
  1582. }
  1583. // String returns the string representation
  1584. func (s SetQueueAttributesInput) String() string {
  1585. return awsutil.Prettify(s)
  1586. }
  1587. // GoString returns the string representation
  1588. func (s SetQueueAttributesInput) GoString() string {
  1589. return s.String()
  1590. }
  1591. type SetQueueAttributesOutput struct {
  1592. metadataSetQueueAttributesOutput `json:"-" xml:"-"`
  1593. }
  1594. type metadataSetQueueAttributesOutput struct {
  1595. SDKShapeTraits bool `type:"structure"`
  1596. }
  1597. // String returns the string representation
  1598. func (s SetQueueAttributesOutput) String() string {
  1599. return awsutil.Prettify(s)
  1600. }
  1601. // GoString returns the string representation
  1602. func (s SetQueueAttributesOutput) GoString() string {
  1603. return s.String()
  1604. }
  1605. const (
  1606. // @enum QueueAttributeName
  1607. QueueAttributeNamePolicy = "Policy"
  1608. // @enum QueueAttributeName
  1609. QueueAttributeNameVisibilityTimeout = "VisibilityTimeout"
  1610. // @enum QueueAttributeName
  1611. QueueAttributeNameMaximumMessageSize = "MaximumMessageSize"
  1612. // @enum QueueAttributeName
  1613. QueueAttributeNameMessageRetentionPeriod = "MessageRetentionPeriod"
  1614. // @enum QueueAttributeName
  1615. QueueAttributeNameApproximateNumberOfMessages = "ApproximateNumberOfMessages"
  1616. // @enum QueueAttributeName
  1617. QueueAttributeNameApproximateNumberOfMessagesNotVisible = "ApproximateNumberOfMessagesNotVisible"
  1618. // @enum QueueAttributeName
  1619. QueueAttributeNameCreatedTimestamp = "CreatedTimestamp"
  1620. // @enum QueueAttributeName
  1621. QueueAttributeNameLastModifiedTimestamp = "LastModifiedTimestamp"
  1622. // @enum QueueAttributeName
  1623. QueueAttributeNameQueueArn = "QueueArn"
  1624. // @enum QueueAttributeName
  1625. QueueAttributeNameApproximateNumberOfMessagesDelayed = "ApproximateNumberOfMessagesDelayed"
  1626. // @enum QueueAttributeName
  1627. QueueAttributeNameDelaySeconds = "DelaySeconds"
  1628. // @enum QueueAttributeName
  1629. QueueAttributeNameReceiveMessageWaitTimeSeconds = "ReceiveMessageWaitTimeSeconds"
  1630. // @enum QueueAttributeName
  1631. QueueAttributeNameRedrivePolicy = "RedrivePolicy"
  1632. )