api.go 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package firehose provides a client for Amazon Kinesis Firehose.
  3. package firehose
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opCreateDeliveryStream = "CreateDeliveryStream"
  11. // CreateDeliveryStreamRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateDeliveryStream operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // Creating a request object using this method should be used when you want to inject
  17. // custom logic into the request's lifecycle using a custom handler, or if you want to
  18. // access properties on the request object before or after sending the request. If
  19. // you just want the service response, call the CreateDeliveryStream method directly
  20. // instead.
  21. //
  22. // Note: You must call the "Send" method on the returned request object in order
  23. // to execute the request.
  24. //
  25. // // Example sending a request using the CreateDeliveryStreamRequest method.
  26. // req, resp := client.CreateDeliveryStreamRequest(params)
  27. //
  28. // err := req.Send()
  29. // if err == nil { // resp is now filled
  30. // fmt.Println(resp)
  31. // }
  32. //
  33. func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) (req *request.Request, output *CreateDeliveryStreamOutput) {
  34. op := &request.Operation{
  35. Name: opCreateDeliveryStream,
  36. HTTPMethod: "POST",
  37. HTTPPath: "/",
  38. }
  39. if input == nil {
  40. input = &CreateDeliveryStreamInput{}
  41. }
  42. req = c.newRequest(op, input, output)
  43. output = &CreateDeliveryStreamOutput{}
  44. req.Data = output
  45. return
  46. }
  47. // Creates a delivery stream.
  48. //
  49. // CreateDeliveryStream is an asynchronous operation that immediately returns.
  50. // The initial status of the delivery stream is CREATING. After the delivery
  51. // stream is created, its status is ACTIVE and it now accepts data. Attempts
  52. // to send data to a delivery stream that is not in the ACTIVE state cause an
  53. // exception. To check the state of a delivery stream, use DescribeDeliveryStream.
  54. //
  55. // The name of a delivery stream identifies it. You can't have two delivery
  56. // streams with the same name in the same region. Two delivery streams in different
  57. // AWS accounts or different regions in the same AWS account can have the same
  58. // name.
  59. //
  60. // By default, you can create up to 20 delivery streams per region.
  61. //
  62. // A delivery stream can only be configured with a single destination, Amazon
  63. // S3, Amazon Elasticsearch Service, or Amazon Redshift. For correct CreateDeliveryStream
  64. // request syntax, specify only one destination configuration parameter: either
  65. // S3DestinationConfiguration, ElasticsearchDestinationConfiguration, or RedshiftDestinationConfiguration.
  66. //
  67. // As part of S3DestinationConfiguration, optional values BufferingHints, EncryptionConfiguration,
  68. // and CompressionFormat can be provided. By default, if no BufferingHints value
  69. // is provided, Firehose buffers data up to 5 MB or for 5 minutes, whichever
  70. // condition is satisfied first. Note that BufferingHints is a hint, so there
  71. // are some cases where the service cannot adhere to these conditions strictly;
  72. // for example, record boundaries are such that the size is a little over or
  73. // under the configured buffering size. By default, no encryption is performed.
  74. // We strongly recommend that you enable encryption to ensure secure data storage
  75. // in Amazon S3.
  76. //
  77. // A few notes about RedshiftDestinationConfiguration:
  78. //
  79. // An Amazon Redshift destination requires an S3 bucket as intermediate location,
  80. // as Firehose first delivers data to S3 and then uses COPY syntax to load data
  81. // into an Amazon Redshift table. This is specified in the RedshiftDestinationConfiguration.S3Configuration
  82. // parameter element.
  83. //
  84. // The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration
  85. // because the Amazon Redshift COPY operation that reads from the S3 bucket
  86. // doesn't support these compression formats.
  87. //
  88. // We strongly recommend that the username and password provided is used
  89. // exclusively for Firehose purposes, and that the permissions for the account
  90. // are restricted for Amazon Redshift INSERT permissions.
  91. //
  92. // Firehose assumes the IAM role that is configured as part of destinations.
  93. // The IAM role should allow the Firehose principal to assume the role, and
  94. // the role should have permissions that allows the service to deliver the data.
  95. // For more information, see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3)
  96. // in the Amazon Kinesis Firehose Developer Guide.
  97. func (c *Firehose) CreateDeliveryStream(input *CreateDeliveryStreamInput) (*CreateDeliveryStreamOutput, error) {
  98. req, out := c.CreateDeliveryStreamRequest(input)
  99. err := req.Send()
  100. return out, err
  101. }
  102. const opDeleteDeliveryStream = "DeleteDeliveryStream"
  103. // DeleteDeliveryStreamRequest generates a "aws/request.Request" representing the
  104. // client's request for the DeleteDeliveryStream operation. The "output" return
  105. // value can be used to capture response data after the request's "Send" method
  106. // is called.
  107. //
  108. // Creating a request object using this method should be used when you want to inject
  109. // custom logic into the request's lifecycle using a custom handler, or if you want to
  110. // access properties on the request object before or after sending the request. If
  111. // you just want the service response, call the DeleteDeliveryStream method directly
  112. // instead.
  113. //
  114. // Note: You must call the "Send" method on the returned request object in order
  115. // to execute the request.
  116. //
  117. // // Example sending a request using the DeleteDeliveryStreamRequest method.
  118. // req, resp := client.DeleteDeliveryStreamRequest(params)
  119. //
  120. // err := req.Send()
  121. // if err == nil { // resp is now filled
  122. // fmt.Println(resp)
  123. // }
  124. //
  125. func (c *Firehose) DeleteDeliveryStreamRequest(input *DeleteDeliveryStreamInput) (req *request.Request, output *DeleteDeliveryStreamOutput) {
  126. op := &request.Operation{
  127. Name: opDeleteDeliveryStream,
  128. HTTPMethod: "POST",
  129. HTTPPath: "/",
  130. }
  131. if input == nil {
  132. input = &DeleteDeliveryStreamInput{}
  133. }
  134. req = c.newRequest(op, input, output)
  135. output = &DeleteDeliveryStreamOutput{}
  136. req.Data = output
  137. return
  138. }
  139. // Deletes a delivery stream and its data.
  140. //
  141. // You can delete a delivery stream only if it is in ACTIVE or DELETING state,
  142. // and not in the CREATING state. While the deletion request is in process,
  143. // the delivery stream is in the DELETING state.
  144. //
  145. // To check the state of a delivery stream, use DescribeDeliveryStream.
  146. //
  147. // While the delivery stream is DELETING state, the service may continue to
  148. // accept the records, but the service doesn't make any guarantees with respect
  149. // to delivering the data. Therefore, as a best practice, you should first stop
  150. // any applications that are sending records before deleting a delivery stream.
  151. func (c *Firehose) DeleteDeliveryStream(input *DeleteDeliveryStreamInput) (*DeleteDeliveryStreamOutput, error) {
  152. req, out := c.DeleteDeliveryStreamRequest(input)
  153. err := req.Send()
  154. return out, err
  155. }
  156. const opDescribeDeliveryStream = "DescribeDeliveryStream"
  157. // DescribeDeliveryStreamRequest generates a "aws/request.Request" representing the
  158. // client's request for the DescribeDeliveryStream operation. The "output" return
  159. // value can be used to capture response data after the request's "Send" method
  160. // is called.
  161. //
  162. // Creating a request object using this method should be used when you want to inject
  163. // custom logic into the request's lifecycle using a custom handler, or if you want to
  164. // access properties on the request object before or after sending the request. If
  165. // you just want the service response, call the DescribeDeliveryStream method directly
  166. // instead.
  167. //
  168. // Note: You must call the "Send" method on the returned request object in order
  169. // to execute the request.
  170. //
  171. // // Example sending a request using the DescribeDeliveryStreamRequest method.
  172. // req, resp := client.DescribeDeliveryStreamRequest(params)
  173. //
  174. // err := req.Send()
  175. // if err == nil { // resp is now filled
  176. // fmt.Println(resp)
  177. // }
  178. //
  179. func (c *Firehose) DescribeDeliveryStreamRequest(input *DescribeDeliveryStreamInput) (req *request.Request, output *DescribeDeliveryStreamOutput) {
  180. op := &request.Operation{
  181. Name: opDescribeDeliveryStream,
  182. HTTPMethod: "POST",
  183. HTTPPath: "/",
  184. }
  185. if input == nil {
  186. input = &DescribeDeliveryStreamInput{}
  187. }
  188. req = c.newRequest(op, input, output)
  189. output = &DescribeDeliveryStreamOutput{}
  190. req.Data = output
  191. return
  192. }
  193. // Describes the specified delivery stream and gets the status. For example,
  194. // after your delivery stream is created, call DescribeDeliveryStream to see
  195. // if the delivery stream is ACTIVE and therefore ready for data to be sent
  196. // to it.
  197. func (c *Firehose) DescribeDeliveryStream(input *DescribeDeliveryStreamInput) (*DescribeDeliveryStreamOutput, error) {
  198. req, out := c.DescribeDeliveryStreamRequest(input)
  199. err := req.Send()
  200. return out, err
  201. }
  202. const opListDeliveryStreams = "ListDeliveryStreams"
  203. // ListDeliveryStreamsRequest generates a "aws/request.Request" representing the
  204. // client's request for the ListDeliveryStreams operation. The "output" return
  205. // value can be used to capture response data after the request's "Send" method
  206. // is called.
  207. //
  208. // Creating a request object using this method should be used when you want to inject
  209. // custom logic into the request's lifecycle using a custom handler, or if you want to
  210. // access properties on the request object before or after sending the request. If
  211. // you just want the service response, call the ListDeliveryStreams method directly
  212. // instead.
  213. //
  214. // Note: You must call the "Send" method on the returned request object in order
  215. // to execute the request.
  216. //
  217. // // Example sending a request using the ListDeliveryStreamsRequest method.
  218. // req, resp := client.ListDeliveryStreamsRequest(params)
  219. //
  220. // err := req.Send()
  221. // if err == nil { // resp is now filled
  222. // fmt.Println(resp)
  223. // }
  224. //
  225. func (c *Firehose) ListDeliveryStreamsRequest(input *ListDeliveryStreamsInput) (req *request.Request, output *ListDeliveryStreamsOutput) {
  226. op := &request.Operation{
  227. Name: opListDeliveryStreams,
  228. HTTPMethod: "POST",
  229. HTTPPath: "/",
  230. }
  231. if input == nil {
  232. input = &ListDeliveryStreamsInput{}
  233. }
  234. req = c.newRequest(op, input, output)
  235. output = &ListDeliveryStreamsOutput{}
  236. req.Data = output
  237. return
  238. }
  239. // Lists your delivery streams.
  240. //
  241. // The number of delivery streams might be too large to return using a single
  242. // call to ListDeliveryStreams. You can limit the number of delivery streams
  243. // returned, using the Limit parameter. To determine whether there are more
  244. // delivery streams to list, check the value of HasMoreDeliveryStreams in the
  245. // output. If there are more delivery streams to list, you can request them
  246. // by specifying the name of the last delivery stream returned in the call in
  247. // the ExclusiveStartDeliveryStreamName parameter of a subsequent call.
  248. func (c *Firehose) ListDeliveryStreams(input *ListDeliveryStreamsInput) (*ListDeliveryStreamsOutput, error) {
  249. req, out := c.ListDeliveryStreamsRequest(input)
  250. err := req.Send()
  251. return out, err
  252. }
  253. const opPutRecord = "PutRecord"
  254. // PutRecordRequest generates a "aws/request.Request" representing the
  255. // client's request for the PutRecord operation. The "output" return
  256. // value can be used to capture response data after the request's "Send" method
  257. // is called.
  258. //
  259. // Creating a request object using this method should be used when you want to inject
  260. // custom logic into the request's lifecycle using a custom handler, or if you want to
  261. // access properties on the request object before or after sending the request. If
  262. // you just want the service response, call the PutRecord method directly
  263. // instead.
  264. //
  265. // Note: You must call the "Send" method on the returned request object in order
  266. // to execute the request.
  267. //
  268. // // Example sending a request using the PutRecordRequest method.
  269. // req, resp := client.PutRecordRequest(params)
  270. //
  271. // err := req.Send()
  272. // if err == nil { // resp is now filled
  273. // fmt.Println(resp)
  274. // }
  275. //
  276. func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request, output *PutRecordOutput) {
  277. op := &request.Operation{
  278. Name: opPutRecord,
  279. HTTPMethod: "POST",
  280. HTTPPath: "/",
  281. }
  282. if input == nil {
  283. input = &PutRecordInput{}
  284. }
  285. req = c.newRequest(op, input, output)
  286. output = &PutRecordOutput{}
  287. req.Data = output
  288. return
  289. }
  290. // Writes a single data record into an Amazon Kinesis Firehose delivery stream.
  291. // To write multiple data records into a delivery stream, use PutRecordBatch.
  292. // Applications using these operations are referred to as producers.
  293. //
  294. // By default, each delivery stream can take in up to 2,000 transactions per
  295. // second, 5,000 records per second, or 5 MB per second. Note that if you use
  296. // PutRecord and PutRecordBatch, the limits are an aggregate across these two
  297. // operations for each delivery stream. For more information about limits and
  298. // how to request an increase, see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html).
  299. //
  300. // You must specify the name of the delivery stream and the data record when
  301. // using PutRecord. The data record consists of a data blob that can be up to
  302. // 1,000 KB in size, and any kind of data, for example, a segment from a log
  303. // file, geographic location data, web site clickstream data, etc.
  304. //
  305. // Firehose buffers records before delivering them to the destination. To disambiguate
  306. // the data blobs at the destination, a common solution is to use delimiters
  307. // in the data, such as a newline (\n) or some other character unique within
  308. // the data. This allows the consumer application(s) to parse individual data
  309. // items when reading the data from the destination.
  310. //
  311. // The PutRecord operation returns a RecordId, which is a unique string assigned
  312. // to each record. Producer applications can use this ID for purposes such as
  313. // auditability and investigation.
  314. //
  315. // If the PutRecord operation throws a ServiceUnavailableException, back off
  316. // and retry. If the exception persists, it is possible that the throughput
  317. // limits have been exceeded for the delivery stream.
  318. //
  319. // Data records sent to Firehose are stored for 24 hours from the time they
  320. // are added to a delivery stream as it attempts to send the records to the
  321. // destination. If the destination is unreachable for more than 24 hours, the
  322. // data is no longer available.
  323. func (c *Firehose) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) {
  324. req, out := c.PutRecordRequest(input)
  325. err := req.Send()
  326. return out, err
  327. }
  328. const opPutRecordBatch = "PutRecordBatch"
  329. // PutRecordBatchRequest generates a "aws/request.Request" representing the
  330. // client's request for the PutRecordBatch operation. The "output" return
  331. // value can be used to capture response data after the request's "Send" method
  332. // is called.
  333. //
  334. // Creating a request object using this method should be used when you want to inject
  335. // custom logic into the request's lifecycle using a custom handler, or if you want to
  336. // access properties on the request object before or after sending the request. If
  337. // you just want the service response, call the PutRecordBatch method directly
  338. // instead.
  339. //
  340. // Note: You must call the "Send" method on the returned request object in order
  341. // to execute the request.
  342. //
  343. // // Example sending a request using the PutRecordBatchRequest method.
  344. // req, resp := client.PutRecordBatchRequest(params)
  345. //
  346. // err := req.Send()
  347. // if err == nil { // resp is now filled
  348. // fmt.Println(resp)
  349. // }
  350. //
  351. func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *request.Request, output *PutRecordBatchOutput) {
  352. op := &request.Operation{
  353. Name: opPutRecordBatch,
  354. HTTPMethod: "POST",
  355. HTTPPath: "/",
  356. }
  357. if input == nil {
  358. input = &PutRecordBatchInput{}
  359. }
  360. req = c.newRequest(op, input, output)
  361. output = &PutRecordBatchOutput{}
  362. req.Data = output
  363. return
  364. }
  365. // Writes multiple data records into a delivery stream in a single call, which
  366. // can achieve higher throughput per producer than when writing single records.
  367. // To write single data records into a delivery stream, use PutRecord. Applications
  368. // using these operations are referred to as producers.
  369. //
  370. // Each PutRecordBatch request supports up to 500 records. Each record in the
  371. // request can be as large as 1,000 KB (before 64-bit encoding), up to a limit
  372. // of 4 MB for the entire request. By default, each delivery stream can take
  373. // in up to 2,000 transactions per second, 5,000 records per second, or 5 MB
  374. // per second. Note that if you use PutRecord and PutRecordBatch, the limits
  375. // are an aggregate across these two operations for each delivery stream. For
  376. // more information about limits and how to request an increase, see Amazon
  377. // Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html).
  378. //
  379. // You must specify the name of the delivery stream and the data record when
  380. // using PutRecord. The data record consists of a data blob that can be up to
  381. // 1,000 KB in size, and any kind of data, for example, a segment from a log
  382. // file, geographic location data, web site clickstream data, and so on.
  383. //
  384. // Firehose buffers records before delivering them to the destination. To disambiguate
  385. // the data blobs at the destination, a common solution is to use delimiters
  386. // in the data, such as a newline (\n) or some other character unique within
  387. // the data. This allows the consumer application(s) to parse individual data
  388. // items when reading the data from the destination.
  389. //
  390. // The PutRecordBatch response includes a count of any failed records, FailedPutCount,
  391. // and an array of responses, RequestResponses. The FailedPutCount value is
  392. // a count of records that failed. Each entry in the RequestResponses array
  393. // gives additional information of the processed record. Each entry in RequestResponses
  394. // directly correlates with a record in the request array using the same ordering,
  395. // from the top to the bottom of the request and response. RequestResponses
  396. // always includes the same number of records as the request array. RequestResponses
  397. // both successfully and unsuccessfully processed records. Firehose attempts
  398. // to process all records in each PutRecordBatch request. A single record failure
  399. // does not stop the processing of subsequent records.
  400. //
  401. // A successfully processed record includes a RecordId value, which is a unique
  402. // value identified for the record. An unsuccessfully processed record includes
  403. // ErrorCode and ErrorMessage values. ErrorCode reflects the type of error and
  404. // is one of the following values: ServiceUnavailable or InternalFailure. ErrorMessage
  405. // provides more detailed information about the error.
  406. //
  407. // If FailedPutCount is greater than 0 (zero), retry the request. A retry of
  408. // the entire batch of records is possible; however, we strongly recommend that
  409. // you inspect the entire response and resend only those records that failed
  410. // processing. This minimizes duplicate records and also reduces the total bytes
  411. // sent (and corresponding charges).
  412. //
  413. // If the PutRecordBatch operation throws a ServiceUnavailableException, back
  414. // off and retry. If the exception persists, it is possible that the throughput
  415. // limits have been exceeded for the delivery stream.
  416. //
  417. // Data records sent to Firehose are stored for 24 hours from the time they
  418. // are added to a delivery stream as it attempts to send the records to the
  419. // destination. If the destination is unreachable for more than 24 hours, the
  420. // data is no longer available.
  421. func (c *Firehose) PutRecordBatch(input *PutRecordBatchInput) (*PutRecordBatchOutput, error) {
  422. req, out := c.PutRecordBatchRequest(input)
  423. err := req.Send()
  424. return out, err
  425. }
  426. const opUpdateDestination = "UpdateDestination"
  427. // UpdateDestinationRequest generates a "aws/request.Request" representing the
  428. // client's request for the UpdateDestination operation. The "output" return
  429. // value can be used to capture response data after the request's "Send" method
  430. // is called.
  431. //
  432. // Creating a request object using this method should be used when you want to inject
  433. // custom logic into the request's lifecycle using a custom handler, or if you want to
  434. // access properties on the request object before or after sending the request. If
  435. // you just want the service response, call the UpdateDestination method directly
  436. // instead.
  437. //
  438. // Note: You must call the "Send" method on the returned request object in order
  439. // to execute the request.
  440. //
  441. // // Example sending a request using the UpdateDestinationRequest method.
  442. // req, resp := client.UpdateDestinationRequest(params)
  443. //
  444. // err := req.Send()
  445. // if err == nil { // resp is now filled
  446. // fmt.Println(resp)
  447. // }
  448. //
  449. func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req *request.Request, output *UpdateDestinationOutput) {
  450. op := &request.Operation{
  451. Name: opUpdateDestination,
  452. HTTPMethod: "POST",
  453. HTTPPath: "/",
  454. }
  455. if input == nil {
  456. input = &UpdateDestinationInput{}
  457. }
  458. req = c.newRequest(op, input, output)
  459. output = &UpdateDestinationOutput{}
  460. req.Data = output
  461. return
  462. }
  463. // Updates the specified destination of the specified delivery stream. Note:
  464. // Switching between Elasticsearch and other services is not supported. For
  465. // Elasticsearch destination, you can only update an existing Elasticsearch
  466. // destination with this operation.
  467. //
  468. // This operation can be used to change the destination type (for example,
  469. // to replace the Amazon S3 destination with Amazon Redshift) or change the
  470. // parameters associated with a given destination (for example, to change the
  471. // bucket name of the Amazon S3 destination). The update may not occur immediately.
  472. // The target delivery stream remains active while the configurations are updated,
  473. // so data writes to the delivery stream can continue during this process. The
  474. // updated configurations are normally effective within a few minutes.
  475. //
  476. // If the destination type is the same, Firehose merges the configuration parameters
  477. // specified in the UpdateDestination request with the destination configuration
  478. // that already exists on the delivery stream. If any of the parameters are
  479. // not specified in the update request, then the existing configuration parameters
  480. // are retained. For example, in the Amazon S3 destination, if EncryptionConfiguration
  481. // is not specified then the existing EncryptionConfiguration is maintained
  482. // on the destination.
  483. //
  484. // If the destination type is not the same, for example, changing the destination
  485. // from Amazon S3 to Amazon Redshift, Firehose does not merge any parameters.
  486. // In this case, all parameters must be specified.
  487. //
  488. // Firehose uses the CurrentDeliveryStreamVersionId to avoid race conditions
  489. // and conflicting merges. This is a required field in every request and the
  490. // service only updates the configuration if the existing configuration matches
  491. // the VersionId. After the update is applied successfully, the VersionId is
  492. // updated, which can be retrieved with the DescribeDeliveryStream operation.
  493. // The new VersionId should be uses to set CurrentDeliveryStreamVersionId in
  494. // the next UpdateDestination operation.
  495. func (c *Firehose) UpdateDestination(input *UpdateDestinationInput) (*UpdateDestinationOutput, error) {
  496. req, out := c.UpdateDestinationRequest(input)
  497. err := req.Send()
  498. return out, err
  499. }
  500. // Describes hints for the buffering to perform before delivering data to the
  501. // destination. Please note that these options are treated as hints, and therefore
  502. // Firehose may choose to use different values when it is optimal.
  503. type BufferingHints struct {
  504. _ struct{} `type:"structure"`
  505. // Buffer incoming data for the specified period of time, in seconds, before
  506. // delivering it to the destination. The default value is 300.
  507. IntervalInSeconds *int64 `min:"60" type:"integer"`
  508. // Buffer incoming data to the specified size, in MBs, before delivering it
  509. // to the destination. The default value is 5.
  510. //
  511. // We recommend setting SizeInMBs to a value greater than the amount of data
  512. // you typically ingest into the delivery stream in 10 seconds. For example,
  513. // if you typically ingest data at 1 MB/sec set SizeInMBs to be 10 MB or higher.
  514. SizeInMBs *int64 `min:"1" type:"integer"`
  515. }
  516. // String returns the string representation
  517. func (s BufferingHints) String() string {
  518. return awsutil.Prettify(s)
  519. }
  520. // GoString returns the string representation
  521. func (s BufferingHints) GoString() string {
  522. return s.String()
  523. }
  524. // Validate inspects the fields of the type to determine if they are valid.
  525. func (s *BufferingHints) Validate() error {
  526. invalidParams := request.ErrInvalidParams{Context: "BufferingHints"}
  527. if s.IntervalInSeconds != nil && *s.IntervalInSeconds < 60 {
  528. invalidParams.Add(request.NewErrParamMinValue("IntervalInSeconds", 60))
  529. }
  530. if s.SizeInMBs != nil && *s.SizeInMBs < 1 {
  531. invalidParams.Add(request.NewErrParamMinValue("SizeInMBs", 1))
  532. }
  533. if invalidParams.Len() > 0 {
  534. return invalidParams
  535. }
  536. return nil
  537. }
  538. // Describes CloudWatch logging options for your delivery stream.
  539. type CloudWatchLoggingOptions struct {
  540. _ struct{} `type:"structure"`
  541. // Enables or disables CloudWatch logging.
  542. Enabled *bool `type:"boolean"`
  543. // The CloudWatch group name for logging. This value is required if Enabled
  544. // is true.
  545. LogGroupName *string `type:"string"`
  546. // The CloudWatch log stream name for logging. This value is required if Enabled
  547. // is true.
  548. LogStreamName *string `type:"string"`
  549. }
  550. // String returns the string representation
  551. func (s CloudWatchLoggingOptions) String() string {
  552. return awsutil.Prettify(s)
  553. }
  554. // GoString returns the string representation
  555. func (s CloudWatchLoggingOptions) GoString() string {
  556. return s.String()
  557. }
  558. // Describes a COPY command for Amazon Redshift.
  559. type CopyCommand struct {
  560. _ struct{} `type:"structure"`
  561. // Optional parameters to use with the Amazon Redshift COPY command. For more
  562. // information, see the "Optional Parameters" section of Amazon Redshift COPY
  563. // command (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html). Some
  564. // possible examples that would apply to Firehose are as follows.
  565. //
  566. // delimiter '\t' lzop; - fields are delimited with "\t" (TAB character) and
  567. // compressed using lzop.
  568. //
  569. // delimiter '| - fields are delimited with "|" (this is the default delimiter).
  570. //
  571. // delimiter '|' escape - the delimiter should be escaped.
  572. //
  573. // fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
  574. // - fields are fixed width in the source, with each width specified after every
  575. // column in the table.
  576. //
  577. // JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, and the path
  578. // specified is the format of the data.
  579. //
  580. // For more examples, see Amazon Redshift COPY command examples (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY_command_examples.html).
  581. CopyOptions *string `type:"string"`
  582. // A comma-separated list of column names.
  583. DataTableColumns *string `type:"string"`
  584. // The name of the target table. The table must already exist in the database.
  585. DataTableName *string `min:"1" type:"string" required:"true"`
  586. }
  587. // String returns the string representation
  588. func (s CopyCommand) String() string {
  589. return awsutil.Prettify(s)
  590. }
  591. // GoString returns the string representation
  592. func (s CopyCommand) GoString() string {
  593. return s.String()
  594. }
  595. // Validate inspects the fields of the type to determine if they are valid.
  596. func (s *CopyCommand) Validate() error {
  597. invalidParams := request.ErrInvalidParams{Context: "CopyCommand"}
  598. if s.DataTableName == nil {
  599. invalidParams.Add(request.NewErrParamRequired("DataTableName"))
  600. }
  601. if s.DataTableName != nil && len(*s.DataTableName) < 1 {
  602. invalidParams.Add(request.NewErrParamMinLen("DataTableName", 1))
  603. }
  604. if invalidParams.Len() > 0 {
  605. return invalidParams
  606. }
  607. return nil
  608. }
  609. // Contains the parameters for CreateDeliveryStream.
  610. type CreateDeliveryStreamInput struct {
  611. _ struct{} `type:"structure"`
  612. // The name of the delivery stream.
  613. DeliveryStreamName *string `min:"1" type:"string" required:"true"`
  614. // The destination in Amazon ES. This value cannot be specified if Amazon S3
  615. // or Amazon Redshift is the desired destination (see restrictions listed above).
  616. ElasticsearchDestinationConfiguration *ElasticsearchDestinationConfiguration `type:"structure"`
  617. // The destination in Amazon Redshift. This value cannot be specified if Amazon
  618. // S3 or Amazon Elasticsearch is the desired destination (see restrictions listed
  619. // above).
  620. RedshiftDestinationConfiguration *RedshiftDestinationConfiguration `type:"structure"`
  621. // The destination in Amazon S3. This value must be specified if ElasticsearchDestinationConfiguration
  622. // or RedshiftDestinationConfiguration is specified (see restrictions listed
  623. // above).
  624. S3DestinationConfiguration *S3DestinationConfiguration `type:"structure"`
  625. }
  626. // String returns the string representation
  627. func (s CreateDeliveryStreamInput) String() string {
  628. return awsutil.Prettify(s)
  629. }
  630. // GoString returns the string representation
  631. func (s CreateDeliveryStreamInput) GoString() string {
  632. return s.String()
  633. }
  634. // Validate inspects the fields of the type to determine if they are valid.
  635. func (s *CreateDeliveryStreamInput) Validate() error {
  636. invalidParams := request.ErrInvalidParams{Context: "CreateDeliveryStreamInput"}
  637. if s.DeliveryStreamName == nil {
  638. invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName"))
  639. }
  640. if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 {
  641. invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1))
  642. }
  643. if s.ElasticsearchDestinationConfiguration != nil {
  644. if err := s.ElasticsearchDestinationConfiguration.Validate(); err != nil {
  645. invalidParams.AddNested("ElasticsearchDestinationConfiguration", err.(request.ErrInvalidParams))
  646. }
  647. }
  648. if s.RedshiftDestinationConfiguration != nil {
  649. if err := s.RedshiftDestinationConfiguration.Validate(); err != nil {
  650. invalidParams.AddNested("RedshiftDestinationConfiguration", err.(request.ErrInvalidParams))
  651. }
  652. }
  653. if s.S3DestinationConfiguration != nil {
  654. if err := s.S3DestinationConfiguration.Validate(); err != nil {
  655. invalidParams.AddNested("S3DestinationConfiguration", err.(request.ErrInvalidParams))
  656. }
  657. }
  658. if invalidParams.Len() > 0 {
  659. return invalidParams
  660. }
  661. return nil
  662. }
  663. // Contains the output of CreateDeliveryStream.
  664. type CreateDeliveryStreamOutput struct {
  665. _ struct{} `type:"structure"`
  666. // The ARN of the delivery stream.
  667. DeliveryStreamARN *string `type:"string"`
  668. }
  669. // String returns the string representation
  670. func (s CreateDeliveryStreamOutput) String() string {
  671. return awsutil.Prettify(s)
  672. }
  673. // GoString returns the string representation
  674. func (s CreateDeliveryStreamOutput) GoString() string {
  675. return s.String()
  676. }
  677. // Contains the parameters for DeleteDeliveryStream.
  678. type DeleteDeliveryStreamInput struct {
  679. _ struct{} `type:"structure"`
  680. // The name of the delivery stream.
  681. DeliveryStreamName *string `min:"1" type:"string" required:"true"`
  682. }
  683. // String returns the string representation
  684. func (s DeleteDeliveryStreamInput) String() string {
  685. return awsutil.Prettify(s)
  686. }
  687. // GoString returns the string representation
  688. func (s DeleteDeliveryStreamInput) GoString() string {
  689. return s.String()
  690. }
  691. // Validate inspects the fields of the type to determine if they are valid.
  692. func (s *DeleteDeliveryStreamInput) Validate() error {
  693. invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryStreamInput"}
  694. if s.DeliveryStreamName == nil {
  695. invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName"))
  696. }
  697. if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 {
  698. invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1))
  699. }
  700. if invalidParams.Len() > 0 {
  701. return invalidParams
  702. }
  703. return nil
  704. }
  705. // Contains the output of DeleteDeliveryStream.
  706. type DeleteDeliveryStreamOutput struct {
  707. _ struct{} `type:"structure"`
  708. }
  709. // String returns the string representation
  710. func (s DeleteDeliveryStreamOutput) String() string {
  711. return awsutil.Prettify(s)
  712. }
  713. // GoString returns the string representation
  714. func (s DeleteDeliveryStreamOutput) GoString() string {
  715. return s.String()
  716. }
  717. // Contains information about a delivery stream.
  718. type DeliveryStreamDescription struct {
  719. _ struct{} `type:"structure"`
  720. // The date and time that the delivery stream was created.
  721. CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  722. // The Amazon Resource Name (ARN) of the delivery stream.
  723. DeliveryStreamARN *string `type:"string" required:"true"`
  724. // The name of the delivery stream.
  725. DeliveryStreamName *string `min:"1" type:"string" required:"true"`
  726. // The status of the delivery stream.
  727. DeliveryStreamStatus *string `type:"string" required:"true" enum:"DeliveryStreamStatus"`
  728. // The destinations.
  729. Destinations []*DestinationDescription `type:"list" required:"true"`
  730. // Indicates whether there are more destinations available to list.
  731. HasMoreDestinations *bool `type:"boolean" required:"true"`
  732. // The date and time that the delivery stream was last updated.
  733. LastUpdateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  734. // Used when calling the UpdateDestination operation. Each time the destination
  735. // is updated for the delivery stream, the VersionId is changed, and the current
  736. // VersionId is required when updating the destination. This is so that the
  737. // service knows it is applying the changes to the correct version of the delivery
  738. // stream.
  739. VersionId *string `min:"1" type:"string" required:"true"`
  740. }
  741. // String returns the string representation
  742. func (s DeliveryStreamDescription) String() string {
  743. return awsutil.Prettify(s)
  744. }
  745. // GoString returns the string representation
  746. func (s DeliveryStreamDescription) GoString() string {
  747. return s.String()
  748. }
  749. // Contains the parameters for DescribeDeliveryStream.
  750. type DescribeDeliveryStreamInput struct {
  751. _ struct{} `type:"structure"`
  752. // The name of the delivery stream.
  753. DeliveryStreamName *string `min:"1" type:"string" required:"true"`
  754. // Specifies the destination ID to start returning the destination information.
  755. // Currently Firehose supports one destination per delivery stream.
  756. ExclusiveStartDestinationId *string `min:"1" type:"string"`
  757. // The limit on the number of destinations to return. Currently, you can have
  758. // one destination per delivery stream.
  759. Limit *int64 `min:"1" type:"integer"`
  760. }
  761. // String returns the string representation
  762. func (s DescribeDeliveryStreamInput) String() string {
  763. return awsutil.Prettify(s)
  764. }
  765. // GoString returns the string representation
  766. func (s DescribeDeliveryStreamInput) GoString() string {
  767. return s.String()
  768. }
  769. // Validate inspects the fields of the type to determine if they are valid.
  770. func (s *DescribeDeliveryStreamInput) Validate() error {
  771. invalidParams := request.ErrInvalidParams{Context: "DescribeDeliveryStreamInput"}
  772. if s.DeliveryStreamName == nil {
  773. invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName"))
  774. }
  775. if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 {
  776. invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1))
  777. }
  778. if s.ExclusiveStartDestinationId != nil && len(*s.ExclusiveStartDestinationId) < 1 {
  779. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartDestinationId", 1))
  780. }
  781. if s.Limit != nil && *s.Limit < 1 {
  782. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  783. }
  784. if invalidParams.Len() > 0 {
  785. return invalidParams
  786. }
  787. return nil
  788. }
  789. // Contains the output of DescribeDeliveryStream.
  790. type DescribeDeliveryStreamOutput struct {
  791. _ struct{} `type:"structure"`
  792. // Information about the delivery stream.
  793. DeliveryStreamDescription *DeliveryStreamDescription `type:"structure" required:"true"`
  794. }
  795. // String returns the string representation
  796. func (s DescribeDeliveryStreamOutput) String() string {
  797. return awsutil.Prettify(s)
  798. }
  799. // GoString returns the string representation
  800. func (s DescribeDeliveryStreamOutput) GoString() string {
  801. return s.String()
  802. }
  803. // Describes the destination for a delivery stream.
  804. type DestinationDescription struct {
  805. _ struct{} `type:"structure"`
  806. // The ID of the destination.
  807. DestinationId *string `min:"1" type:"string" required:"true"`
  808. // The destination in Amazon ES.
  809. ElasticsearchDestinationDescription *ElasticsearchDestinationDescription `type:"structure"`
  810. // The destination in Amazon Redshift.
  811. RedshiftDestinationDescription *RedshiftDestinationDescription `type:"structure"`
  812. // The Amazon S3 destination.
  813. S3DestinationDescription *S3DestinationDescription `type:"structure"`
  814. }
  815. // String returns the string representation
  816. func (s DestinationDescription) String() string {
  817. return awsutil.Prettify(s)
  818. }
  819. // GoString returns the string representation
  820. func (s DestinationDescription) GoString() string {
  821. return s.String()
  822. }
  823. // Describes the buffering to perform before delivering data to the Amazon ES
  824. // destination.
  825. type ElasticsearchBufferingHints struct {
  826. _ struct{} `type:"structure"`
  827. // Buffer incoming data for the specified period of time, in seconds, before
  828. // delivering it to the destination. The default value is 300 (5 minutes).
  829. IntervalInSeconds *int64 `min:"60" type:"integer"`
  830. // Buffer incoming data to the specified size, in MBs, before delivering it
  831. // to the destination. The default value is 5.
  832. //
  833. // We recommend setting SizeInMBs to a value greater than the amount of data
  834. // you typically ingest into the delivery stream in 10 seconds. For example,
  835. // if you typically ingest data at 1 MB/sec, set SizeInMBs to be 10 MB or higher.
  836. SizeInMBs *int64 `min:"1" type:"integer"`
  837. }
  838. // String returns the string representation
  839. func (s ElasticsearchBufferingHints) String() string {
  840. return awsutil.Prettify(s)
  841. }
  842. // GoString returns the string representation
  843. func (s ElasticsearchBufferingHints) GoString() string {
  844. return s.String()
  845. }
  846. // Validate inspects the fields of the type to determine if they are valid.
  847. func (s *ElasticsearchBufferingHints) Validate() error {
  848. invalidParams := request.ErrInvalidParams{Context: "ElasticsearchBufferingHints"}
  849. if s.IntervalInSeconds != nil && *s.IntervalInSeconds < 60 {
  850. invalidParams.Add(request.NewErrParamMinValue("IntervalInSeconds", 60))
  851. }
  852. if s.SizeInMBs != nil && *s.SizeInMBs < 1 {
  853. invalidParams.Add(request.NewErrParamMinValue("SizeInMBs", 1))
  854. }
  855. if invalidParams.Len() > 0 {
  856. return invalidParams
  857. }
  858. return nil
  859. }
  860. // Describes the configuration of a destination in Amazon ES.
  861. type ElasticsearchDestinationConfiguration struct {
  862. _ struct{} `type:"structure"`
  863. // Buffering options. If no value is specified, ElasticsearchBufferingHints
  864. // object default values are used.
  865. BufferingHints *ElasticsearchBufferingHints `type:"structure"`
  866. // Describes CloudWatch logging options for your delivery stream.
  867. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  868. // The ARN of the Amazon ES domain. The IAM role must have permission for DescribeElasticsearchDomain,
  869. // DescribeElasticsearchDomains , and DescribeElasticsearchDomainConfig after
  870. // assuming RoleARN.
  871. DomainARN *string `min:"1" type:"string" required:"true"`
  872. // The Elasticsearch index name.
  873. IndexName *string `min:"1" type:"string" required:"true"`
  874. // The Elasticsearch index rotation period. Index rotation appends a timestamp
  875. // to the IndexName to facilitate expiration of old data. For more information,
  876. // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation).
  877. // Default value is OneDay.
  878. IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"`
  879. // Configures retry behavior in the event that Firehose is unable to deliver
  880. // documents to Amazon ES. Default value is 300 (5 minutes).
  881. RetryOptions *ElasticsearchRetryOptions `type:"structure"`
  882. // The ARN of the IAM role to be assumed by Firehose for calling the Amazon
  883. // ES Configuration API and for indexing documents. For more information, see
  884. // Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3).
  885. RoleARN *string `min:"1" type:"string" required:"true"`
  886. // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly,
  887. // Firehose writes any documents that could not be indexed to the configured
  888. // Amazon S3 destination, with elasticsearch-failed/ appended to the key prefix.
  889. // When set to AllDocuments, Firehose delivers all incoming records to Amazon
  890. // S3, and also writes failed documents with elasticsearch-failed/ appended
  891. // to the prefix. For more information, see Amazon S3 Backup for Amazon Elasticsearch
  892. // Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup).
  893. // Default value is FailedDocumentsOnly.
  894. S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"`
  895. // Describes the configuration of a destination in Amazon S3.
  896. S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"`
  897. // The Elasticsearch type name.
  898. TypeName *string `min:"1" type:"string" required:"true"`
  899. }
  900. // String returns the string representation
  901. func (s ElasticsearchDestinationConfiguration) String() string {
  902. return awsutil.Prettify(s)
  903. }
  904. // GoString returns the string representation
  905. func (s ElasticsearchDestinationConfiguration) GoString() string {
  906. return s.String()
  907. }
  908. // Validate inspects the fields of the type to determine if they are valid.
  909. func (s *ElasticsearchDestinationConfiguration) Validate() error {
  910. invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDestinationConfiguration"}
  911. if s.DomainARN == nil {
  912. invalidParams.Add(request.NewErrParamRequired("DomainARN"))
  913. }
  914. if s.DomainARN != nil && len(*s.DomainARN) < 1 {
  915. invalidParams.Add(request.NewErrParamMinLen("DomainARN", 1))
  916. }
  917. if s.IndexName == nil {
  918. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  919. }
  920. if s.IndexName != nil && len(*s.IndexName) < 1 {
  921. invalidParams.Add(request.NewErrParamMinLen("IndexName", 1))
  922. }
  923. if s.RoleARN == nil {
  924. invalidParams.Add(request.NewErrParamRequired("RoleARN"))
  925. }
  926. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  927. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  928. }
  929. if s.S3Configuration == nil {
  930. invalidParams.Add(request.NewErrParamRequired("S3Configuration"))
  931. }
  932. if s.TypeName == nil {
  933. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  934. }
  935. if s.TypeName != nil && len(*s.TypeName) < 1 {
  936. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  937. }
  938. if s.BufferingHints != nil {
  939. if err := s.BufferingHints.Validate(); err != nil {
  940. invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams))
  941. }
  942. }
  943. if s.S3Configuration != nil {
  944. if err := s.S3Configuration.Validate(); err != nil {
  945. invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams))
  946. }
  947. }
  948. if invalidParams.Len() > 0 {
  949. return invalidParams
  950. }
  951. return nil
  952. }
  953. // The destination description in Amazon ES.
  954. type ElasticsearchDestinationDescription struct {
  955. _ struct{} `type:"structure"`
  956. // Buffering options.
  957. BufferingHints *ElasticsearchBufferingHints `type:"structure"`
  958. // CloudWatch logging options.
  959. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  960. // The ARN of the Amazon ES domain.
  961. DomainARN *string `min:"1" type:"string"`
  962. // The Elasticsearch index name.
  963. IndexName *string `min:"1" type:"string"`
  964. // The Elasticsearch index rotation period
  965. IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"`
  966. // Elasticsearch retry options.
  967. RetryOptions *ElasticsearchRetryOptions `type:"structure"`
  968. // The ARN of the AWS credentials.
  969. RoleARN *string `min:"1" type:"string"`
  970. // Amazon S3 backup mode.
  971. S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"`
  972. // Describes a destination in Amazon S3.
  973. S3DestinationDescription *S3DestinationDescription `type:"structure"`
  974. // The Elasticsearch type name.
  975. TypeName *string `min:"1" type:"string"`
  976. }
  977. // String returns the string representation
  978. func (s ElasticsearchDestinationDescription) String() string {
  979. return awsutil.Prettify(s)
  980. }
  981. // GoString returns the string representation
  982. func (s ElasticsearchDestinationDescription) GoString() string {
  983. return s.String()
  984. }
  985. // Describes an update for a destination in Amazon ES.
  986. type ElasticsearchDestinationUpdate struct {
  987. _ struct{} `type:"structure"`
  988. // Buffering options. If no value is specified, ElasticsearchBufferingHints
  989. // object default values are used.
  990. BufferingHints *ElasticsearchBufferingHints `type:"structure"`
  991. // Describes CloudWatch logging options for your delivery stream.
  992. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  993. // The ARN of the Amazon ES domain. The IAM role must have permission for DescribeElasticsearchDomain,
  994. // DescribeElasticsearchDomains , and DescribeElasticsearchDomainConfig after
  995. // assuming RoleARN.
  996. DomainARN *string `min:"1" type:"string"`
  997. // The Elasticsearch index name.
  998. IndexName *string `min:"1" type:"string"`
  999. // The Elasticsearch index rotation period. Index rotation appends a timestamp
  1000. // to the IndexName to facilitate the expiration of old data. For more information,
  1001. // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation).
  1002. // Default value is OneDay.
  1003. IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"`
  1004. // Configures retry behavior in the event that Firehose is unable to deliver
  1005. // documents to Amazon ES. Default value is 300 (5 minutes).
  1006. RetryOptions *ElasticsearchRetryOptions `type:"structure"`
  1007. // The ARN of the IAM role to be assumed by Firehose for calling the Amazon
  1008. // ES Configuration API and for indexing documents. For more information, see
  1009. // Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3).
  1010. RoleARN *string `min:"1" type:"string"`
  1011. // Describes an update for a destination in Amazon S3.
  1012. S3Update *S3DestinationUpdate `type:"structure"`
  1013. // The Elasticsearch type name.
  1014. TypeName *string `min:"1" type:"string"`
  1015. }
  1016. // String returns the string representation
  1017. func (s ElasticsearchDestinationUpdate) String() string {
  1018. return awsutil.Prettify(s)
  1019. }
  1020. // GoString returns the string representation
  1021. func (s ElasticsearchDestinationUpdate) GoString() string {
  1022. return s.String()
  1023. }
  1024. // Validate inspects the fields of the type to determine if they are valid.
  1025. func (s *ElasticsearchDestinationUpdate) Validate() error {
  1026. invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDestinationUpdate"}
  1027. if s.DomainARN != nil && len(*s.DomainARN) < 1 {
  1028. invalidParams.Add(request.NewErrParamMinLen("DomainARN", 1))
  1029. }
  1030. if s.IndexName != nil && len(*s.IndexName) < 1 {
  1031. invalidParams.Add(request.NewErrParamMinLen("IndexName", 1))
  1032. }
  1033. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  1034. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  1035. }
  1036. if s.TypeName != nil && len(*s.TypeName) < 1 {
  1037. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  1038. }
  1039. if s.BufferingHints != nil {
  1040. if err := s.BufferingHints.Validate(); err != nil {
  1041. invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams))
  1042. }
  1043. }
  1044. if s.S3Update != nil {
  1045. if err := s.S3Update.Validate(); err != nil {
  1046. invalidParams.AddNested("S3Update", err.(request.ErrInvalidParams))
  1047. }
  1048. }
  1049. if invalidParams.Len() > 0 {
  1050. return invalidParams
  1051. }
  1052. return nil
  1053. }
  1054. // Configures retry behavior in the event that Firehose is unable to deliver
  1055. // documents to Amazon ES.
  1056. type ElasticsearchRetryOptions struct {
  1057. _ struct{} `type:"structure"`
  1058. // After an initial failure to deliver to Amazon ES, the total amount of time
  1059. // during which Firehose re-attempts delivery (including the first attempt).
  1060. // After this time has elapsed, the failed documents are written to Amazon S3.
  1061. // Default value is 300 seconds (5 minutes). A value of 0 (zero) results in
  1062. // no retries.
  1063. DurationInSeconds *int64 `type:"integer"`
  1064. }
  1065. // String returns the string representation
  1066. func (s ElasticsearchRetryOptions) String() string {
  1067. return awsutil.Prettify(s)
  1068. }
  1069. // GoString returns the string representation
  1070. func (s ElasticsearchRetryOptions) GoString() string {
  1071. return s.String()
  1072. }
  1073. // Describes the encryption for a destination in Amazon S3.
  1074. type EncryptionConfiguration struct {
  1075. _ struct{} `type:"structure"`
  1076. // The encryption key.
  1077. KMSEncryptionConfig *KMSEncryptionConfig `type:"structure"`
  1078. // Specifically override existing encryption information to ensure no encryption
  1079. // is used.
  1080. NoEncryptionConfig *string `type:"string" enum:"NoEncryptionConfig"`
  1081. }
  1082. // String returns the string representation
  1083. func (s EncryptionConfiguration) String() string {
  1084. return awsutil.Prettify(s)
  1085. }
  1086. // GoString returns the string representation
  1087. func (s EncryptionConfiguration) GoString() string {
  1088. return s.String()
  1089. }
  1090. // Validate inspects the fields of the type to determine if they are valid.
  1091. func (s *EncryptionConfiguration) Validate() error {
  1092. invalidParams := request.ErrInvalidParams{Context: "EncryptionConfiguration"}
  1093. if s.KMSEncryptionConfig != nil {
  1094. if err := s.KMSEncryptionConfig.Validate(); err != nil {
  1095. invalidParams.AddNested("KMSEncryptionConfig", err.(request.ErrInvalidParams))
  1096. }
  1097. }
  1098. if invalidParams.Len() > 0 {
  1099. return invalidParams
  1100. }
  1101. return nil
  1102. }
  1103. // Describes an encryption key for a destination in Amazon S3.
  1104. type KMSEncryptionConfig struct {
  1105. _ struct{} `type:"structure"`
  1106. // The ARN of the encryption key. Must belong to the same region as the destination
  1107. // Amazon S3 bucket.
  1108. AWSKMSKeyARN *string `min:"1" type:"string" required:"true"`
  1109. }
  1110. // String returns the string representation
  1111. func (s KMSEncryptionConfig) String() string {
  1112. return awsutil.Prettify(s)
  1113. }
  1114. // GoString returns the string representation
  1115. func (s KMSEncryptionConfig) GoString() string {
  1116. return s.String()
  1117. }
  1118. // Validate inspects the fields of the type to determine if they are valid.
  1119. func (s *KMSEncryptionConfig) Validate() error {
  1120. invalidParams := request.ErrInvalidParams{Context: "KMSEncryptionConfig"}
  1121. if s.AWSKMSKeyARN == nil {
  1122. invalidParams.Add(request.NewErrParamRequired("AWSKMSKeyARN"))
  1123. }
  1124. if s.AWSKMSKeyARN != nil && len(*s.AWSKMSKeyARN) < 1 {
  1125. invalidParams.Add(request.NewErrParamMinLen("AWSKMSKeyARN", 1))
  1126. }
  1127. if invalidParams.Len() > 0 {
  1128. return invalidParams
  1129. }
  1130. return nil
  1131. }
  1132. // Contains the parameters for ListDeliveryStreams.
  1133. type ListDeliveryStreamsInput struct {
  1134. _ struct{} `type:"structure"`
  1135. // The name of the delivery stream to start the list with.
  1136. ExclusiveStartDeliveryStreamName *string `min:"1" type:"string"`
  1137. // The maximum number of delivery streams to list.
  1138. Limit *int64 `min:"1" type:"integer"`
  1139. }
  1140. // String returns the string representation
  1141. func (s ListDeliveryStreamsInput) String() string {
  1142. return awsutil.Prettify(s)
  1143. }
  1144. // GoString returns the string representation
  1145. func (s ListDeliveryStreamsInput) GoString() string {
  1146. return s.String()
  1147. }
  1148. // Validate inspects the fields of the type to determine if they are valid.
  1149. func (s *ListDeliveryStreamsInput) Validate() error {
  1150. invalidParams := request.ErrInvalidParams{Context: "ListDeliveryStreamsInput"}
  1151. if s.ExclusiveStartDeliveryStreamName != nil && len(*s.ExclusiveStartDeliveryStreamName) < 1 {
  1152. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartDeliveryStreamName", 1))
  1153. }
  1154. if s.Limit != nil && *s.Limit < 1 {
  1155. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  1156. }
  1157. if invalidParams.Len() > 0 {
  1158. return invalidParams
  1159. }
  1160. return nil
  1161. }
  1162. // Contains the output of ListDeliveryStreams.
  1163. type ListDeliveryStreamsOutput struct {
  1164. _ struct{} `type:"structure"`
  1165. // The names of the delivery streams.
  1166. DeliveryStreamNames []*string `type:"list" required:"true"`
  1167. // Indicates whether there are more delivery streams available to list.
  1168. HasMoreDeliveryStreams *bool `type:"boolean" required:"true"`
  1169. }
  1170. // String returns the string representation
  1171. func (s ListDeliveryStreamsOutput) String() string {
  1172. return awsutil.Prettify(s)
  1173. }
  1174. // GoString returns the string representation
  1175. func (s ListDeliveryStreamsOutput) GoString() string {
  1176. return s.String()
  1177. }
  1178. // Contains the parameters for PutRecordBatch.
  1179. type PutRecordBatchInput struct {
  1180. _ struct{} `type:"structure"`
  1181. // The name of the delivery stream.
  1182. DeliveryStreamName *string `min:"1" type:"string" required:"true"`
  1183. // One or more records.
  1184. Records []*Record `min:"1" type:"list" required:"true"`
  1185. }
  1186. // String returns the string representation
  1187. func (s PutRecordBatchInput) String() string {
  1188. return awsutil.Prettify(s)
  1189. }
  1190. // GoString returns the string representation
  1191. func (s PutRecordBatchInput) GoString() string {
  1192. return s.String()
  1193. }
  1194. // Validate inspects the fields of the type to determine if they are valid.
  1195. func (s *PutRecordBatchInput) Validate() error {
  1196. invalidParams := request.ErrInvalidParams{Context: "PutRecordBatchInput"}
  1197. if s.DeliveryStreamName == nil {
  1198. invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName"))
  1199. }
  1200. if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 {
  1201. invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1))
  1202. }
  1203. if s.Records == nil {
  1204. invalidParams.Add(request.NewErrParamRequired("Records"))
  1205. }
  1206. if s.Records != nil && len(s.Records) < 1 {
  1207. invalidParams.Add(request.NewErrParamMinLen("Records", 1))
  1208. }
  1209. if s.Records != nil {
  1210. for i, v := range s.Records {
  1211. if v == nil {
  1212. continue
  1213. }
  1214. if err := v.Validate(); err != nil {
  1215. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams))
  1216. }
  1217. }
  1218. }
  1219. if invalidParams.Len() > 0 {
  1220. return invalidParams
  1221. }
  1222. return nil
  1223. }
  1224. // Contains the output of PutRecordBatch.
  1225. type PutRecordBatchOutput struct {
  1226. _ struct{} `type:"structure"`
  1227. // The number of unsuccessfully written records.
  1228. FailedPutCount *int64 `type:"integer" required:"true"`
  1229. // The results for the individual records. The index of each element matches
  1230. // the same index in which records were sent.
  1231. RequestResponses []*PutRecordBatchResponseEntry `min:"1" type:"list" required:"true"`
  1232. }
  1233. // String returns the string representation
  1234. func (s PutRecordBatchOutput) String() string {
  1235. return awsutil.Prettify(s)
  1236. }
  1237. // GoString returns the string representation
  1238. func (s PutRecordBatchOutput) GoString() string {
  1239. return s.String()
  1240. }
  1241. // Contains the result for an individual record from a PutRecordBatch request.
  1242. // If the record is successfully added to your delivery stream, it receives
  1243. // a record ID. If the record fails to be added to your delivery stream, the
  1244. // result includes an error code and an error message.
  1245. type PutRecordBatchResponseEntry struct {
  1246. _ struct{} `type:"structure"`
  1247. // The error code for an individual record result.
  1248. ErrorCode *string `type:"string"`
  1249. // The error message for an individual record result.
  1250. ErrorMessage *string `type:"string"`
  1251. // The ID of the record.
  1252. RecordId *string `min:"1" type:"string"`
  1253. }
  1254. // String returns the string representation
  1255. func (s PutRecordBatchResponseEntry) String() string {
  1256. return awsutil.Prettify(s)
  1257. }
  1258. // GoString returns the string representation
  1259. func (s PutRecordBatchResponseEntry) GoString() string {
  1260. return s.String()
  1261. }
  1262. // Contains the parameters for PutRecord.
  1263. type PutRecordInput struct {
  1264. _ struct{} `type:"structure"`
  1265. // The name of the delivery stream.
  1266. DeliveryStreamName *string `min:"1" type:"string" required:"true"`
  1267. // The record.
  1268. Record *Record `type:"structure" required:"true"`
  1269. }
  1270. // String returns the string representation
  1271. func (s PutRecordInput) String() string {
  1272. return awsutil.Prettify(s)
  1273. }
  1274. // GoString returns the string representation
  1275. func (s PutRecordInput) GoString() string {
  1276. return s.String()
  1277. }
  1278. // Validate inspects the fields of the type to determine if they are valid.
  1279. func (s *PutRecordInput) Validate() error {
  1280. invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"}
  1281. if s.DeliveryStreamName == nil {
  1282. invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName"))
  1283. }
  1284. if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 {
  1285. invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1))
  1286. }
  1287. if s.Record == nil {
  1288. invalidParams.Add(request.NewErrParamRequired("Record"))
  1289. }
  1290. if s.Record != nil {
  1291. if err := s.Record.Validate(); err != nil {
  1292. invalidParams.AddNested("Record", err.(request.ErrInvalidParams))
  1293. }
  1294. }
  1295. if invalidParams.Len() > 0 {
  1296. return invalidParams
  1297. }
  1298. return nil
  1299. }
  1300. // Contains the output of PutRecord.
  1301. type PutRecordOutput struct {
  1302. _ struct{} `type:"structure"`
  1303. // The ID of the record.
  1304. RecordId *string `min:"1" type:"string" required:"true"`
  1305. }
  1306. // String returns the string representation
  1307. func (s PutRecordOutput) String() string {
  1308. return awsutil.Prettify(s)
  1309. }
  1310. // GoString returns the string representation
  1311. func (s PutRecordOutput) GoString() string {
  1312. return s.String()
  1313. }
  1314. // The unit of data in a delivery stream.
  1315. type Record struct {
  1316. _ struct{} `type:"structure"`
  1317. // The data blob, which is base64-encoded when the blob is serialized. The maximum
  1318. // size of the data blob, before base64-encoding, is 1,000 KB.
  1319. //
  1320. // Data is automatically base64 encoded/decoded by the SDK.
  1321. Data []byte `type:"blob" required:"true"`
  1322. }
  1323. // String returns the string representation
  1324. func (s Record) String() string {
  1325. return awsutil.Prettify(s)
  1326. }
  1327. // GoString returns the string representation
  1328. func (s Record) GoString() string {
  1329. return s.String()
  1330. }
  1331. // Validate inspects the fields of the type to determine if they are valid.
  1332. func (s *Record) Validate() error {
  1333. invalidParams := request.ErrInvalidParams{Context: "Record"}
  1334. if s.Data == nil {
  1335. invalidParams.Add(request.NewErrParamRequired("Data"))
  1336. }
  1337. if invalidParams.Len() > 0 {
  1338. return invalidParams
  1339. }
  1340. return nil
  1341. }
  1342. // Describes the configuration of a destination in Amazon Redshift.
  1343. type RedshiftDestinationConfiguration struct {
  1344. _ struct{} `type:"structure"`
  1345. // Describes CloudWatch logging options for your delivery stream.
  1346. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  1347. // The database connection string.
  1348. ClusterJDBCURL *string `min:"1" type:"string" required:"true"`
  1349. // The COPY command.
  1350. CopyCommand *CopyCommand `type:"structure" required:"true"`
  1351. // The user password.
  1352. Password *string `min:"6" type:"string" required:"true"`
  1353. // Configures retry behavior in the event that Firehose is unable to deliver
  1354. // documents to Amazon Redshift. Default value is 3600 (60 minutes).
  1355. RetryOptions *RedshiftRetryOptions `type:"structure"`
  1356. // The ARN of the AWS credentials.
  1357. RoleARN *string `min:"1" type:"string" required:"true"`
  1358. // The S3 configuration for the intermediate location from which Amazon Redshift
  1359. // obtains data. Restrictions are described in the topic for CreateDeliveryStream.
  1360. //
  1361. // The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration
  1362. // because the Amazon Redshift COPY operation that reads from the S3 bucket
  1363. // doesn't support these compression formats.
  1364. S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"`
  1365. // The name of the user.
  1366. Username *string `min:"1" type:"string" required:"true"`
  1367. }
  1368. // String returns the string representation
  1369. func (s RedshiftDestinationConfiguration) String() string {
  1370. return awsutil.Prettify(s)
  1371. }
  1372. // GoString returns the string representation
  1373. func (s RedshiftDestinationConfiguration) GoString() string {
  1374. return s.String()
  1375. }
  1376. // Validate inspects the fields of the type to determine if they are valid.
  1377. func (s *RedshiftDestinationConfiguration) Validate() error {
  1378. invalidParams := request.ErrInvalidParams{Context: "RedshiftDestinationConfiguration"}
  1379. if s.ClusterJDBCURL == nil {
  1380. invalidParams.Add(request.NewErrParamRequired("ClusterJDBCURL"))
  1381. }
  1382. if s.ClusterJDBCURL != nil && len(*s.ClusterJDBCURL) < 1 {
  1383. invalidParams.Add(request.NewErrParamMinLen("ClusterJDBCURL", 1))
  1384. }
  1385. if s.CopyCommand == nil {
  1386. invalidParams.Add(request.NewErrParamRequired("CopyCommand"))
  1387. }
  1388. if s.Password == nil {
  1389. invalidParams.Add(request.NewErrParamRequired("Password"))
  1390. }
  1391. if s.Password != nil && len(*s.Password) < 6 {
  1392. invalidParams.Add(request.NewErrParamMinLen("Password", 6))
  1393. }
  1394. if s.RoleARN == nil {
  1395. invalidParams.Add(request.NewErrParamRequired("RoleARN"))
  1396. }
  1397. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  1398. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  1399. }
  1400. if s.S3Configuration == nil {
  1401. invalidParams.Add(request.NewErrParamRequired("S3Configuration"))
  1402. }
  1403. if s.Username == nil {
  1404. invalidParams.Add(request.NewErrParamRequired("Username"))
  1405. }
  1406. if s.Username != nil && len(*s.Username) < 1 {
  1407. invalidParams.Add(request.NewErrParamMinLen("Username", 1))
  1408. }
  1409. if s.CopyCommand != nil {
  1410. if err := s.CopyCommand.Validate(); err != nil {
  1411. invalidParams.AddNested("CopyCommand", err.(request.ErrInvalidParams))
  1412. }
  1413. }
  1414. if s.S3Configuration != nil {
  1415. if err := s.S3Configuration.Validate(); err != nil {
  1416. invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams))
  1417. }
  1418. }
  1419. if invalidParams.Len() > 0 {
  1420. return invalidParams
  1421. }
  1422. return nil
  1423. }
  1424. // Describes a destination in Amazon Redshift.
  1425. type RedshiftDestinationDescription struct {
  1426. _ struct{} `type:"structure"`
  1427. // Describes CloudWatch logging options for your delivery stream.
  1428. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  1429. // The database connection string.
  1430. ClusterJDBCURL *string `min:"1" type:"string" required:"true"`
  1431. // The COPY command.
  1432. CopyCommand *CopyCommand `type:"structure" required:"true"`
  1433. // Configures retry behavior in the event that Firehose is unable to deliver
  1434. // documents to Amazon Redshift. Default value is 3600 (60 minutes).
  1435. RetryOptions *RedshiftRetryOptions `type:"structure"`
  1436. // The ARN of the AWS credentials.
  1437. RoleARN *string `min:"1" type:"string" required:"true"`
  1438. // The Amazon S3 destination.
  1439. S3DestinationDescription *S3DestinationDescription `type:"structure" required:"true"`
  1440. // The name of the user.
  1441. Username *string `min:"1" type:"string" required:"true"`
  1442. }
  1443. // String returns the string representation
  1444. func (s RedshiftDestinationDescription) String() string {
  1445. return awsutil.Prettify(s)
  1446. }
  1447. // GoString returns the string representation
  1448. func (s RedshiftDestinationDescription) GoString() string {
  1449. return s.String()
  1450. }
  1451. // Describes an update for a destination in Amazon Redshift.
  1452. type RedshiftDestinationUpdate struct {
  1453. _ struct{} `type:"structure"`
  1454. // Describes CloudWatch logging options for your delivery stream.
  1455. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  1456. // The database connection string.
  1457. ClusterJDBCURL *string `min:"1" type:"string"`
  1458. // The COPY command.
  1459. CopyCommand *CopyCommand `type:"structure"`
  1460. // The user password.
  1461. Password *string `min:"6" type:"string"`
  1462. // Configures retry behavior in the event that Firehose is unable to deliver
  1463. // documents to Amazon Redshift. Default value is 3600 (60 minutes).
  1464. RetryOptions *RedshiftRetryOptions `type:"structure"`
  1465. // The ARN of the AWS credentials.
  1466. RoleARN *string `min:"1" type:"string"`
  1467. // The Amazon S3 destination.
  1468. //
  1469. // The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationUpdate.S3Update
  1470. // because the Amazon Redshift COPY operation that reads from the S3 bucket
  1471. // doesn't support these compression formats.
  1472. S3Update *S3DestinationUpdate `type:"structure"`
  1473. // The name of the user.
  1474. Username *string `min:"1" type:"string"`
  1475. }
  1476. // String returns the string representation
  1477. func (s RedshiftDestinationUpdate) String() string {
  1478. return awsutil.Prettify(s)
  1479. }
  1480. // GoString returns the string representation
  1481. func (s RedshiftDestinationUpdate) GoString() string {
  1482. return s.String()
  1483. }
  1484. // Validate inspects the fields of the type to determine if they are valid.
  1485. func (s *RedshiftDestinationUpdate) Validate() error {
  1486. invalidParams := request.ErrInvalidParams{Context: "RedshiftDestinationUpdate"}
  1487. if s.ClusterJDBCURL != nil && len(*s.ClusterJDBCURL) < 1 {
  1488. invalidParams.Add(request.NewErrParamMinLen("ClusterJDBCURL", 1))
  1489. }
  1490. if s.Password != nil && len(*s.Password) < 6 {
  1491. invalidParams.Add(request.NewErrParamMinLen("Password", 6))
  1492. }
  1493. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  1494. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  1495. }
  1496. if s.Username != nil && len(*s.Username) < 1 {
  1497. invalidParams.Add(request.NewErrParamMinLen("Username", 1))
  1498. }
  1499. if s.CopyCommand != nil {
  1500. if err := s.CopyCommand.Validate(); err != nil {
  1501. invalidParams.AddNested("CopyCommand", err.(request.ErrInvalidParams))
  1502. }
  1503. }
  1504. if s.S3Update != nil {
  1505. if err := s.S3Update.Validate(); err != nil {
  1506. invalidParams.AddNested("S3Update", err.(request.ErrInvalidParams))
  1507. }
  1508. }
  1509. if invalidParams.Len() > 0 {
  1510. return invalidParams
  1511. }
  1512. return nil
  1513. }
  1514. // Configures retry behavior in the event that Firehose is unable to deliver
  1515. // documents to Amazon Redshift.
  1516. type RedshiftRetryOptions struct {
  1517. _ struct{} `type:"structure"`
  1518. // The length of time during which Firehose retries delivery after a failure,
  1519. // starting from the initial request and including the first attempt. The default
  1520. // value is 3600 seconds (60 minutes). Firehose does not retry if the value
  1521. // of DurationInSeconds is 0 (zero) or if the first delivery attempt takes longer
  1522. // than the current value.
  1523. DurationInSeconds *int64 `type:"integer"`
  1524. }
  1525. // String returns the string representation
  1526. func (s RedshiftRetryOptions) String() string {
  1527. return awsutil.Prettify(s)
  1528. }
  1529. // GoString returns the string representation
  1530. func (s RedshiftRetryOptions) GoString() string {
  1531. return s.String()
  1532. }
  1533. // Describes the configuration of a destination in Amazon S3.
  1534. type S3DestinationConfiguration struct {
  1535. _ struct{} `type:"structure"`
  1536. // The ARN of the S3 bucket.
  1537. BucketARN *string `min:"1" type:"string" required:"true"`
  1538. // The buffering option. If no value is specified, BufferingHints object default
  1539. // values are used.
  1540. BufferingHints *BufferingHints `type:"structure"`
  1541. // Describes CloudWatch logging options for your delivery stream.
  1542. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  1543. // The compression format. If no value is specified, the default is UNCOMPRESSED.
  1544. //
  1545. // The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift
  1546. // destinations because they are not supported by the Amazon Redshift COPY operation
  1547. // that reads from the S3 bucket.
  1548. CompressionFormat *string `type:"string" enum:"CompressionFormat"`
  1549. // The encryption configuration. If no value is specified, the default is no
  1550. // encryption.
  1551. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  1552. // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered
  1553. // S3 files. You can specify an extra prefix to be added in front of the time
  1554. // format prefix. Note that if the prefix ends with a slash, it appears as a
  1555. // folder in the S3 bucket. For more information, see Amazon S3 Object Name
  1556. // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html)
  1557. // in the Amazon Kinesis Firehose Developer Guide (http://docs.aws.amazon.com/firehose/latest/dev/).
  1558. Prefix *string `type:"string"`
  1559. // The ARN of the AWS credentials.
  1560. RoleARN *string `min:"1" type:"string" required:"true"`
  1561. }
  1562. // String returns the string representation
  1563. func (s S3DestinationConfiguration) String() string {
  1564. return awsutil.Prettify(s)
  1565. }
  1566. // GoString returns the string representation
  1567. func (s S3DestinationConfiguration) GoString() string {
  1568. return s.String()
  1569. }
  1570. // Validate inspects the fields of the type to determine if they are valid.
  1571. func (s *S3DestinationConfiguration) Validate() error {
  1572. invalidParams := request.ErrInvalidParams{Context: "S3DestinationConfiguration"}
  1573. if s.BucketARN == nil {
  1574. invalidParams.Add(request.NewErrParamRequired("BucketARN"))
  1575. }
  1576. if s.BucketARN != nil && len(*s.BucketARN) < 1 {
  1577. invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1))
  1578. }
  1579. if s.RoleARN == nil {
  1580. invalidParams.Add(request.NewErrParamRequired("RoleARN"))
  1581. }
  1582. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  1583. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  1584. }
  1585. if s.BufferingHints != nil {
  1586. if err := s.BufferingHints.Validate(); err != nil {
  1587. invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams))
  1588. }
  1589. }
  1590. if s.EncryptionConfiguration != nil {
  1591. if err := s.EncryptionConfiguration.Validate(); err != nil {
  1592. invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams))
  1593. }
  1594. }
  1595. if invalidParams.Len() > 0 {
  1596. return invalidParams
  1597. }
  1598. return nil
  1599. }
  1600. // Describes a destination in Amazon S3.
  1601. type S3DestinationDescription struct {
  1602. _ struct{} `type:"structure"`
  1603. // The ARN of the S3 bucket.
  1604. BucketARN *string `min:"1" type:"string" required:"true"`
  1605. // The buffering option. If no value is specified, BufferingHints object default
  1606. // values are used.
  1607. BufferingHints *BufferingHints `type:"structure" required:"true"`
  1608. // Describes CloudWatch logging options for your delivery stream.
  1609. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  1610. // The compression format. If no value is specified, the default is NOCOMPRESSION.
  1611. CompressionFormat *string `type:"string" required:"true" enum:"CompressionFormat"`
  1612. // The encryption configuration. If no value is specified, the default is no
  1613. // encryption.
  1614. EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"`
  1615. // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered
  1616. // S3 files. You can specify an extra prefix to be added in front of the time
  1617. // format prefix. Note that if the prefix ends with a slash, it appears as a
  1618. // folder in the S3 bucket. For more information, see Amazon S3 Object Name
  1619. // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html)
  1620. // in the Amazon Kinesis Firehose Developer Guide (http://docs.aws.amazon.com/firehose/latest/dev/).
  1621. Prefix *string `type:"string"`
  1622. // The ARN of the AWS credentials.
  1623. RoleARN *string `min:"1" type:"string" required:"true"`
  1624. }
  1625. // String returns the string representation
  1626. func (s S3DestinationDescription) String() string {
  1627. return awsutil.Prettify(s)
  1628. }
  1629. // GoString returns the string representation
  1630. func (s S3DestinationDescription) GoString() string {
  1631. return s.String()
  1632. }
  1633. // Describes an update for a destination in Amazon S3.
  1634. type S3DestinationUpdate struct {
  1635. _ struct{} `type:"structure"`
  1636. // The ARN of the S3 bucket.
  1637. BucketARN *string `min:"1" type:"string"`
  1638. // The buffering option. If no value is specified, BufferingHints object default
  1639. // values are used.
  1640. BufferingHints *BufferingHints `type:"structure"`
  1641. // Describes CloudWatch logging options for your delivery stream.
  1642. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"`
  1643. // The compression format. If no value is specified, the default is NOCOMPRESSION.
  1644. //
  1645. // The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift
  1646. // destinations because they are not supported by the Amazon Redshift COPY operation
  1647. // that reads from the S3 bucket.
  1648. CompressionFormat *string `type:"string" enum:"CompressionFormat"`
  1649. // The encryption configuration. If no value is specified, the default is no
  1650. // encryption.
  1651. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  1652. // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered
  1653. // S3 files. You can specify an extra prefix to be added in front of the time
  1654. // format prefix. Note that if the prefix ends with a slash, it appears as a
  1655. // folder in the S3 bucket. For more information, see Amazon S3 Object Name
  1656. // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html)
  1657. // in the Amazon Kinesis Firehose Developer Guide (http://docs.aws.amazon.com/firehose/latest/dev/).
  1658. Prefix *string `type:"string"`
  1659. // The ARN of the AWS credentials.
  1660. RoleARN *string `min:"1" type:"string"`
  1661. }
  1662. // String returns the string representation
  1663. func (s S3DestinationUpdate) String() string {
  1664. return awsutil.Prettify(s)
  1665. }
  1666. // GoString returns the string representation
  1667. func (s S3DestinationUpdate) GoString() string {
  1668. return s.String()
  1669. }
  1670. // Validate inspects the fields of the type to determine if they are valid.
  1671. func (s *S3DestinationUpdate) Validate() error {
  1672. invalidParams := request.ErrInvalidParams{Context: "S3DestinationUpdate"}
  1673. if s.BucketARN != nil && len(*s.BucketARN) < 1 {
  1674. invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1))
  1675. }
  1676. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  1677. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  1678. }
  1679. if s.BufferingHints != nil {
  1680. if err := s.BufferingHints.Validate(); err != nil {
  1681. invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams))
  1682. }
  1683. }
  1684. if s.EncryptionConfiguration != nil {
  1685. if err := s.EncryptionConfiguration.Validate(); err != nil {
  1686. invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams))
  1687. }
  1688. }
  1689. if invalidParams.Len() > 0 {
  1690. return invalidParams
  1691. }
  1692. return nil
  1693. }
  1694. // Contains the parameters for UpdateDestination.
  1695. type UpdateDestinationInput struct {
  1696. _ struct{} `type:"structure"`
  1697. // Obtain this value from the VersionId result of the DeliveryStreamDescription
  1698. // operation. This value is required, and helps the service to perform conditional
  1699. // operations. For example, if there is a interleaving update and this value
  1700. // is null, then the update destination fails. After the update is successful,
  1701. // the VersionId value is updated. The service then performs a merge of the
  1702. // old configuration with the new configuration.
  1703. CurrentDeliveryStreamVersionId *string `min:"1" type:"string" required:"true"`
  1704. // The name of the delivery stream.
  1705. DeliveryStreamName *string `min:"1" type:"string" required:"true"`
  1706. // The ID of the destination.
  1707. DestinationId *string `min:"1" type:"string" required:"true"`
  1708. // Describes an update for a destination in Amazon ES.
  1709. ElasticsearchDestinationUpdate *ElasticsearchDestinationUpdate `type:"structure"`
  1710. // Describes an update for a destination in Amazon Redshift.
  1711. RedshiftDestinationUpdate *RedshiftDestinationUpdate `type:"structure"`
  1712. // Describes an update for a destination in Amazon S3.
  1713. S3DestinationUpdate *S3DestinationUpdate `type:"structure"`
  1714. }
  1715. // String returns the string representation
  1716. func (s UpdateDestinationInput) String() string {
  1717. return awsutil.Prettify(s)
  1718. }
  1719. // GoString returns the string representation
  1720. func (s UpdateDestinationInput) GoString() string {
  1721. return s.String()
  1722. }
  1723. // Validate inspects the fields of the type to determine if they are valid.
  1724. func (s *UpdateDestinationInput) Validate() error {
  1725. invalidParams := request.ErrInvalidParams{Context: "UpdateDestinationInput"}
  1726. if s.CurrentDeliveryStreamVersionId == nil {
  1727. invalidParams.Add(request.NewErrParamRequired("CurrentDeliveryStreamVersionId"))
  1728. }
  1729. if s.CurrentDeliveryStreamVersionId != nil && len(*s.CurrentDeliveryStreamVersionId) < 1 {
  1730. invalidParams.Add(request.NewErrParamMinLen("CurrentDeliveryStreamVersionId", 1))
  1731. }
  1732. if s.DeliveryStreamName == nil {
  1733. invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName"))
  1734. }
  1735. if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 {
  1736. invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1))
  1737. }
  1738. if s.DestinationId == nil {
  1739. invalidParams.Add(request.NewErrParamRequired("DestinationId"))
  1740. }
  1741. if s.DestinationId != nil && len(*s.DestinationId) < 1 {
  1742. invalidParams.Add(request.NewErrParamMinLen("DestinationId", 1))
  1743. }
  1744. if s.ElasticsearchDestinationUpdate != nil {
  1745. if err := s.ElasticsearchDestinationUpdate.Validate(); err != nil {
  1746. invalidParams.AddNested("ElasticsearchDestinationUpdate", err.(request.ErrInvalidParams))
  1747. }
  1748. }
  1749. if s.RedshiftDestinationUpdate != nil {
  1750. if err := s.RedshiftDestinationUpdate.Validate(); err != nil {
  1751. invalidParams.AddNested("RedshiftDestinationUpdate", err.(request.ErrInvalidParams))
  1752. }
  1753. }
  1754. if s.S3DestinationUpdate != nil {
  1755. if err := s.S3DestinationUpdate.Validate(); err != nil {
  1756. invalidParams.AddNested("S3DestinationUpdate", err.(request.ErrInvalidParams))
  1757. }
  1758. }
  1759. if invalidParams.Len() > 0 {
  1760. return invalidParams
  1761. }
  1762. return nil
  1763. }
  1764. // Contains the output of UpdateDestination.
  1765. type UpdateDestinationOutput struct {
  1766. _ struct{} `type:"structure"`
  1767. }
  1768. // String returns the string representation
  1769. func (s UpdateDestinationOutput) String() string {
  1770. return awsutil.Prettify(s)
  1771. }
  1772. // GoString returns the string representation
  1773. func (s UpdateDestinationOutput) GoString() string {
  1774. return s.String()
  1775. }
  1776. const (
  1777. // @enum CompressionFormat
  1778. CompressionFormatUncompressed = "UNCOMPRESSED"
  1779. // @enum CompressionFormat
  1780. CompressionFormatGzip = "GZIP"
  1781. // @enum CompressionFormat
  1782. CompressionFormatZip = "ZIP"
  1783. // @enum CompressionFormat
  1784. CompressionFormatSnappy = "Snappy"
  1785. )
  1786. const (
  1787. // @enum DeliveryStreamStatus
  1788. DeliveryStreamStatusCreating = "CREATING"
  1789. // @enum DeliveryStreamStatus
  1790. DeliveryStreamStatusDeleting = "DELETING"
  1791. // @enum DeliveryStreamStatus
  1792. DeliveryStreamStatusActive = "ACTIVE"
  1793. )
  1794. const (
  1795. // @enum ElasticsearchIndexRotationPeriod
  1796. ElasticsearchIndexRotationPeriodNoRotation = "NoRotation"
  1797. // @enum ElasticsearchIndexRotationPeriod
  1798. ElasticsearchIndexRotationPeriodOneHour = "OneHour"
  1799. // @enum ElasticsearchIndexRotationPeriod
  1800. ElasticsearchIndexRotationPeriodOneDay = "OneDay"
  1801. // @enum ElasticsearchIndexRotationPeriod
  1802. ElasticsearchIndexRotationPeriodOneWeek = "OneWeek"
  1803. // @enum ElasticsearchIndexRotationPeriod
  1804. ElasticsearchIndexRotationPeriodOneMonth = "OneMonth"
  1805. )
  1806. const (
  1807. // @enum ElasticsearchS3BackupMode
  1808. ElasticsearchS3BackupModeFailedDocumentsOnly = "FailedDocumentsOnly"
  1809. // @enum ElasticsearchS3BackupMode
  1810. ElasticsearchS3BackupModeAllDocuments = "AllDocuments"
  1811. )
  1812. const (
  1813. // @enum NoEncryptionConfig
  1814. NoEncryptionConfigNoEncryption = "NoEncryption"
  1815. )