examples_test.go 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package redshift_test
  3. import (
  4. "bytes"
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws"
  8. "github.com/aws/aws-sdk-go/service/redshift"
  9. )
  10. var _ time.Duration
  11. var _ bytes.Buffer
  12. func ExampleRedshift_AuthorizeClusterSecurityGroupIngress() {
  13. svc := redshift.New(nil)
  14. params := &redshift.AuthorizeClusterSecurityGroupIngressInput{
  15. ClusterSecurityGroupName: aws.String("String"), // Required
  16. CIDRIP: aws.String("String"),
  17. EC2SecurityGroupName: aws.String("String"),
  18. EC2SecurityGroupOwnerId: aws.String("String"),
  19. }
  20. resp, err := svc.AuthorizeClusterSecurityGroupIngress(params)
  21. if err != nil {
  22. // Print the error, cast err to awserr.Error to get the Code and
  23. // Message from an error.
  24. fmt.Println(err.Error())
  25. return
  26. }
  27. // Pretty-print the response data.
  28. fmt.Println(resp)
  29. }
  30. func ExampleRedshift_AuthorizeSnapshotAccess() {
  31. svc := redshift.New(nil)
  32. params := &redshift.AuthorizeSnapshotAccessInput{
  33. AccountWithRestoreAccess: aws.String("String"), // Required
  34. SnapshotIdentifier: aws.String("String"), // Required
  35. SnapshotClusterIdentifier: aws.String("String"),
  36. }
  37. resp, err := svc.AuthorizeSnapshotAccess(params)
  38. if err != nil {
  39. // Print the error, cast err to awserr.Error to get the Code and
  40. // Message from an error.
  41. fmt.Println(err.Error())
  42. return
  43. }
  44. // Pretty-print the response data.
  45. fmt.Println(resp)
  46. }
  47. func ExampleRedshift_CopyClusterSnapshot() {
  48. svc := redshift.New(nil)
  49. params := &redshift.CopyClusterSnapshotInput{
  50. SourceSnapshotIdentifier: aws.String("String"), // Required
  51. TargetSnapshotIdentifier: aws.String("String"), // Required
  52. SourceSnapshotClusterIdentifier: aws.String("String"),
  53. }
  54. resp, err := svc.CopyClusterSnapshot(params)
  55. if err != nil {
  56. // Print the error, cast err to awserr.Error to get the Code and
  57. // Message from an error.
  58. fmt.Println(err.Error())
  59. return
  60. }
  61. // Pretty-print the response data.
  62. fmt.Println(resp)
  63. }
  64. func ExampleRedshift_CreateCluster() {
  65. svc := redshift.New(nil)
  66. params := &redshift.CreateClusterInput{
  67. ClusterIdentifier: aws.String("String"), // Required
  68. MasterUserPassword: aws.String("String"), // Required
  69. MasterUsername: aws.String("String"), // Required
  70. NodeType: aws.String("String"), // Required
  71. AllowVersionUpgrade: aws.Bool(true),
  72. AutomatedSnapshotRetentionPeriod: aws.Int64(1),
  73. AvailabilityZone: aws.String("String"),
  74. ClusterParameterGroupName: aws.String("String"),
  75. ClusterSecurityGroups: []*string{
  76. aws.String("String"), // Required
  77. // More values...
  78. },
  79. ClusterSubnetGroupName: aws.String("String"),
  80. ClusterType: aws.String("String"),
  81. ClusterVersion: aws.String("String"),
  82. DBName: aws.String("String"),
  83. ElasticIp: aws.String("String"),
  84. Encrypted: aws.Bool(true),
  85. HsmClientCertificateIdentifier: aws.String("String"),
  86. HsmConfigurationIdentifier: aws.String("String"),
  87. KmsKeyId: aws.String("String"),
  88. NumberOfNodes: aws.Int64(1),
  89. Port: aws.Int64(1),
  90. PreferredMaintenanceWindow: aws.String("String"),
  91. PubliclyAccessible: aws.Bool(true),
  92. Tags: []*redshift.Tag{
  93. { // Required
  94. Key: aws.String("String"),
  95. Value: aws.String("String"),
  96. },
  97. // More values...
  98. },
  99. VpcSecurityGroupIds: []*string{
  100. aws.String("String"), // Required
  101. // More values...
  102. },
  103. }
  104. resp, err := svc.CreateCluster(params)
  105. if err != nil {
  106. // Print the error, cast err to awserr.Error to get the Code and
  107. // Message from an error.
  108. fmt.Println(err.Error())
  109. return
  110. }
  111. // Pretty-print the response data.
  112. fmt.Println(resp)
  113. }
  114. func ExampleRedshift_CreateClusterParameterGroup() {
  115. svc := redshift.New(nil)
  116. params := &redshift.CreateClusterParameterGroupInput{
  117. Description: aws.String("String"), // Required
  118. ParameterGroupFamily: aws.String("String"), // Required
  119. ParameterGroupName: aws.String("String"), // Required
  120. Tags: []*redshift.Tag{
  121. { // Required
  122. Key: aws.String("String"),
  123. Value: aws.String("String"),
  124. },
  125. // More values...
  126. },
  127. }
  128. resp, err := svc.CreateClusterParameterGroup(params)
  129. if err != nil {
  130. // Print the error, cast err to awserr.Error to get the Code and
  131. // Message from an error.
  132. fmt.Println(err.Error())
  133. return
  134. }
  135. // Pretty-print the response data.
  136. fmt.Println(resp)
  137. }
  138. func ExampleRedshift_CreateClusterSecurityGroup() {
  139. svc := redshift.New(nil)
  140. params := &redshift.CreateClusterSecurityGroupInput{
  141. ClusterSecurityGroupName: aws.String("String"), // Required
  142. Description: aws.String("String"), // Required
  143. Tags: []*redshift.Tag{
  144. { // Required
  145. Key: aws.String("String"),
  146. Value: aws.String("String"),
  147. },
  148. // More values...
  149. },
  150. }
  151. resp, err := svc.CreateClusterSecurityGroup(params)
  152. if err != nil {
  153. // Print the error, cast err to awserr.Error to get the Code and
  154. // Message from an error.
  155. fmt.Println(err.Error())
  156. return
  157. }
  158. // Pretty-print the response data.
  159. fmt.Println(resp)
  160. }
  161. func ExampleRedshift_CreateClusterSnapshot() {
  162. svc := redshift.New(nil)
  163. params := &redshift.CreateClusterSnapshotInput{
  164. ClusterIdentifier: aws.String("String"), // Required
  165. SnapshotIdentifier: aws.String("String"), // Required
  166. Tags: []*redshift.Tag{
  167. { // Required
  168. Key: aws.String("String"),
  169. Value: aws.String("String"),
  170. },
  171. // More values...
  172. },
  173. }
  174. resp, err := svc.CreateClusterSnapshot(params)
  175. if err != nil {
  176. // Print the error, cast err to awserr.Error to get the Code and
  177. // Message from an error.
  178. fmt.Println(err.Error())
  179. return
  180. }
  181. // Pretty-print the response data.
  182. fmt.Println(resp)
  183. }
  184. func ExampleRedshift_CreateClusterSubnetGroup() {
  185. svc := redshift.New(nil)
  186. params := &redshift.CreateClusterSubnetGroupInput{
  187. ClusterSubnetGroupName: aws.String("String"), // Required
  188. Description: aws.String("String"), // Required
  189. SubnetIds: []*string{ // Required
  190. aws.String("String"), // Required
  191. // More values...
  192. },
  193. Tags: []*redshift.Tag{
  194. { // Required
  195. Key: aws.String("String"),
  196. Value: aws.String("String"),
  197. },
  198. // More values...
  199. },
  200. }
  201. resp, err := svc.CreateClusterSubnetGroup(params)
  202. if err != nil {
  203. // Print the error, cast err to awserr.Error to get the Code and
  204. // Message from an error.
  205. fmt.Println(err.Error())
  206. return
  207. }
  208. // Pretty-print the response data.
  209. fmt.Println(resp)
  210. }
  211. func ExampleRedshift_CreateEventSubscription() {
  212. svc := redshift.New(nil)
  213. params := &redshift.CreateEventSubscriptionInput{
  214. SnsTopicArn: aws.String("String"), // Required
  215. SubscriptionName: aws.String("String"), // Required
  216. Enabled: aws.Bool(true),
  217. EventCategories: []*string{
  218. aws.String("String"), // Required
  219. // More values...
  220. },
  221. Severity: aws.String("String"),
  222. SourceIds: []*string{
  223. aws.String("String"), // Required
  224. // More values...
  225. },
  226. SourceType: aws.String("String"),
  227. Tags: []*redshift.Tag{
  228. { // Required
  229. Key: aws.String("String"),
  230. Value: aws.String("String"),
  231. },
  232. // More values...
  233. },
  234. }
  235. resp, err := svc.CreateEventSubscription(params)
  236. if err != nil {
  237. // Print the error, cast err to awserr.Error to get the Code and
  238. // Message from an error.
  239. fmt.Println(err.Error())
  240. return
  241. }
  242. // Pretty-print the response data.
  243. fmt.Println(resp)
  244. }
  245. func ExampleRedshift_CreateHsmClientCertificate() {
  246. svc := redshift.New(nil)
  247. params := &redshift.CreateHsmClientCertificateInput{
  248. HsmClientCertificateIdentifier: aws.String("String"), // Required
  249. Tags: []*redshift.Tag{
  250. { // Required
  251. Key: aws.String("String"),
  252. Value: aws.String("String"),
  253. },
  254. // More values...
  255. },
  256. }
  257. resp, err := svc.CreateHsmClientCertificate(params)
  258. if err != nil {
  259. // Print the error, cast err to awserr.Error to get the Code and
  260. // Message from an error.
  261. fmt.Println(err.Error())
  262. return
  263. }
  264. // Pretty-print the response data.
  265. fmt.Println(resp)
  266. }
  267. func ExampleRedshift_CreateHsmConfiguration() {
  268. svc := redshift.New(nil)
  269. params := &redshift.CreateHsmConfigurationInput{
  270. Description: aws.String("String"), // Required
  271. HsmConfigurationIdentifier: aws.String("String"), // Required
  272. HsmIpAddress: aws.String("String"), // Required
  273. HsmPartitionName: aws.String("String"), // Required
  274. HsmPartitionPassword: aws.String("String"), // Required
  275. HsmServerPublicCertificate: aws.String("String"), // Required
  276. Tags: []*redshift.Tag{
  277. { // Required
  278. Key: aws.String("String"),
  279. Value: aws.String("String"),
  280. },
  281. // More values...
  282. },
  283. }
  284. resp, err := svc.CreateHsmConfiguration(params)
  285. if err != nil {
  286. // Print the error, cast err to awserr.Error to get the Code and
  287. // Message from an error.
  288. fmt.Println(err.Error())
  289. return
  290. }
  291. // Pretty-print the response data.
  292. fmt.Println(resp)
  293. }
  294. func ExampleRedshift_CreateSnapshotCopyGrant() {
  295. svc := redshift.New(nil)
  296. params := &redshift.CreateSnapshotCopyGrantInput{
  297. SnapshotCopyGrantName: aws.String("String"), // Required
  298. KmsKeyId: aws.String("String"),
  299. Tags: []*redshift.Tag{
  300. { // Required
  301. Key: aws.String("String"),
  302. Value: aws.String("String"),
  303. },
  304. // More values...
  305. },
  306. }
  307. resp, err := svc.CreateSnapshotCopyGrant(params)
  308. if err != nil {
  309. // Print the error, cast err to awserr.Error to get the Code and
  310. // Message from an error.
  311. fmt.Println(err.Error())
  312. return
  313. }
  314. // Pretty-print the response data.
  315. fmt.Println(resp)
  316. }
  317. func ExampleRedshift_CreateTags() {
  318. svc := redshift.New(nil)
  319. params := &redshift.CreateTagsInput{
  320. ResourceName: aws.String("String"), // Required
  321. Tags: []*redshift.Tag{ // Required
  322. { // Required
  323. Key: aws.String("String"),
  324. Value: aws.String("String"),
  325. },
  326. // More values...
  327. },
  328. }
  329. resp, err := svc.CreateTags(params)
  330. if err != nil {
  331. // Print the error, cast err to awserr.Error to get the Code and
  332. // Message from an error.
  333. fmt.Println(err.Error())
  334. return
  335. }
  336. // Pretty-print the response data.
  337. fmt.Println(resp)
  338. }
  339. func ExampleRedshift_DeleteCluster() {
  340. svc := redshift.New(nil)
  341. params := &redshift.DeleteClusterInput{
  342. ClusterIdentifier: aws.String("String"), // Required
  343. FinalClusterSnapshotIdentifier: aws.String("String"),
  344. SkipFinalClusterSnapshot: aws.Bool(true),
  345. }
  346. resp, err := svc.DeleteCluster(params)
  347. if err != nil {
  348. // Print the error, cast err to awserr.Error to get the Code and
  349. // Message from an error.
  350. fmt.Println(err.Error())
  351. return
  352. }
  353. // Pretty-print the response data.
  354. fmt.Println(resp)
  355. }
  356. func ExampleRedshift_DeleteClusterParameterGroup() {
  357. svc := redshift.New(nil)
  358. params := &redshift.DeleteClusterParameterGroupInput{
  359. ParameterGroupName: aws.String("String"), // Required
  360. }
  361. resp, err := svc.DeleteClusterParameterGroup(params)
  362. if err != nil {
  363. // Print the error, cast err to awserr.Error to get the Code and
  364. // Message from an error.
  365. fmt.Println(err.Error())
  366. return
  367. }
  368. // Pretty-print the response data.
  369. fmt.Println(resp)
  370. }
  371. func ExampleRedshift_DeleteClusterSecurityGroup() {
  372. svc := redshift.New(nil)
  373. params := &redshift.DeleteClusterSecurityGroupInput{
  374. ClusterSecurityGroupName: aws.String("String"), // Required
  375. }
  376. resp, err := svc.DeleteClusterSecurityGroup(params)
  377. if err != nil {
  378. // Print the error, cast err to awserr.Error to get the Code and
  379. // Message from an error.
  380. fmt.Println(err.Error())
  381. return
  382. }
  383. // Pretty-print the response data.
  384. fmt.Println(resp)
  385. }
  386. func ExampleRedshift_DeleteClusterSnapshot() {
  387. svc := redshift.New(nil)
  388. params := &redshift.DeleteClusterSnapshotInput{
  389. SnapshotIdentifier: aws.String("String"), // Required
  390. SnapshotClusterIdentifier: aws.String("String"),
  391. }
  392. resp, err := svc.DeleteClusterSnapshot(params)
  393. if err != nil {
  394. // Print the error, cast err to awserr.Error to get the Code and
  395. // Message from an error.
  396. fmt.Println(err.Error())
  397. return
  398. }
  399. // Pretty-print the response data.
  400. fmt.Println(resp)
  401. }
  402. func ExampleRedshift_DeleteClusterSubnetGroup() {
  403. svc := redshift.New(nil)
  404. params := &redshift.DeleteClusterSubnetGroupInput{
  405. ClusterSubnetGroupName: aws.String("String"), // Required
  406. }
  407. resp, err := svc.DeleteClusterSubnetGroup(params)
  408. if err != nil {
  409. // Print the error, cast err to awserr.Error to get the Code and
  410. // Message from an error.
  411. fmt.Println(err.Error())
  412. return
  413. }
  414. // Pretty-print the response data.
  415. fmt.Println(resp)
  416. }
  417. func ExampleRedshift_DeleteEventSubscription() {
  418. svc := redshift.New(nil)
  419. params := &redshift.DeleteEventSubscriptionInput{
  420. SubscriptionName: aws.String("String"), // Required
  421. }
  422. resp, err := svc.DeleteEventSubscription(params)
  423. if err != nil {
  424. // Print the error, cast err to awserr.Error to get the Code and
  425. // Message from an error.
  426. fmt.Println(err.Error())
  427. return
  428. }
  429. // Pretty-print the response data.
  430. fmt.Println(resp)
  431. }
  432. func ExampleRedshift_DeleteHsmClientCertificate() {
  433. svc := redshift.New(nil)
  434. params := &redshift.DeleteHsmClientCertificateInput{
  435. HsmClientCertificateIdentifier: aws.String("String"), // Required
  436. }
  437. resp, err := svc.DeleteHsmClientCertificate(params)
  438. if err != nil {
  439. // Print the error, cast err to awserr.Error to get the Code and
  440. // Message from an error.
  441. fmt.Println(err.Error())
  442. return
  443. }
  444. // Pretty-print the response data.
  445. fmt.Println(resp)
  446. }
  447. func ExampleRedshift_DeleteHsmConfiguration() {
  448. svc := redshift.New(nil)
  449. params := &redshift.DeleteHsmConfigurationInput{
  450. HsmConfigurationIdentifier: aws.String("String"), // Required
  451. }
  452. resp, err := svc.DeleteHsmConfiguration(params)
  453. if err != nil {
  454. // Print the error, cast err to awserr.Error to get the Code and
  455. // Message from an error.
  456. fmt.Println(err.Error())
  457. return
  458. }
  459. // Pretty-print the response data.
  460. fmt.Println(resp)
  461. }
  462. func ExampleRedshift_DeleteSnapshotCopyGrant() {
  463. svc := redshift.New(nil)
  464. params := &redshift.DeleteSnapshotCopyGrantInput{
  465. SnapshotCopyGrantName: aws.String("String"), // Required
  466. }
  467. resp, err := svc.DeleteSnapshotCopyGrant(params)
  468. if err != nil {
  469. // Print the error, cast err to awserr.Error to get the Code and
  470. // Message from an error.
  471. fmt.Println(err.Error())
  472. return
  473. }
  474. // Pretty-print the response data.
  475. fmt.Println(resp)
  476. }
  477. func ExampleRedshift_DeleteTags() {
  478. svc := redshift.New(nil)
  479. params := &redshift.DeleteTagsInput{
  480. ResourceName: aws.String("String"), // Required
  481. TagKeys: []*string{ // Required
  482. aws.String("String"), // Required
  483. // More values...
  484. },
  485. }
  486. resp, err := svc.DeleteTags(params)
  487. if err != nil {
  488. // Print the error, cast err to awserr.Error to get the Code and
  489. // Message from an error.
  490. fmt.Println(err.Error())
  491. return
  492. }
  493. // Pretty-print the response data.
  494. fmt.Println(resp)
  495. }
  496. func ExampleRedshift_DescribeClusterParameterGroups() {
  497. svc := redshift.New(nil)
  498. params := &redshift.DescribeClusterParameterGroupsInput{
  499. Marker: aws.String("String"),
  500. MaxRecords: aws.Int64(1),
  501. ParameterGroupName: aws.String("String"),
  502. TagKeys: []*string{
  503. aws.String("String"), // Required
  504. // More values...
  505. },
  506. TagValues: []*string{
  507. aws.String("String"), // Required
  508. // More values...
  509. },
  510. }
  511. resp, err := svc.DescribeClusterParameterGroups(params)
  512. if err != nil {
  513. // Print the error, cast err to awserr.Error to get the Code and
  514. // Message from an error.
  515. fmt.Println(err.Error())
  516. return
  517. }
  518. // Pretty-print the response data.
  519. fmt.Println(resp)
  520. }
  521. func ExampleRedshift_DescribeClusterParameters() {
  522. svc := redshift.New(nil)
  523. params := &redshift.DescribeClusterParametersInput{
  524. ParameterGroupName: aws.String("String"), // Required
  525. Marker: aws.String("String"),
  526. MaxRecords: aws.Int64(1),
  527. Source: aws.String("String"),
  528. }
  529. resp, err := svc.DescribeClusterParameters(params)
  530. if err != nil {
  531. // Print the error, cast err to awserr.Error to get the Code and
  532. // Message from an error.
  533. fmt.Println(err.Error())
  534. return
  535. }
  536. // Pretty-print the response data.
  537. fmt.Println(resp)
  538. }
  539. func ExampleRedshift_DescribeClusterSecurityGroups() {
  540. svc := redshift.New(nil)
  541. params := &redshift.DescribeClusterSecurityGroupsInput{
  542. ClusterSecurityGroupName: aws.String("String"),
  543. Marker: aws.String("String"),
  544. MaxRecords: aws.Int64(1),
  545. TagKeys: []*string{
  546. aws.String("String"), // Required
  547. // More values...
  548. },
  549. TagValues: []*string{
  550. aws.String("String"), // Required
  551. // More values...
  552. },
  553. }
  554. resp, err := svc.DescribeClusterSecurityGroups(params)
  555. if err != nil {
  556. // Print the error, cast err to awserr.Error to get the Code and
  557. // Message from an error.
  558. fmt.Println(err.Error())
  559. return
  560. }
  561. // Pretty-print the response data.
  562. fmt.Println(resp)
  563. }
  564. func ExampleRedshift_DescribeClusterSnapshots() {
  565. svc := redshift.New(nil)
  566. params := &redshift.DescribeClusterSnapshotsInput{
  567. ClusterIdentifier: aws.String("String"),
  568. EndTime: aws.Time(time.Now()),
  569. Marker: aws.String("String"),
  570. MaxRecords: aws.Int64(1),
  571. OwnerAccount: aws.String("String"),
  572. SnapshotIdentifier: aws.String("String"),
  573. SnapshotType: aws.String("String"),
  574. StartTime: aws.Time(time.Now()),
  575. TagKeys: []*string{
  576. aws.String("String"), // Required
  577. // More values...
  578. },
  579. TagValues: []*string{
  580. aws.String("String"), // Required
  581. // More values...
  582. },
  583. }
  584. resp, err := svc.DescribeClusterSnapshots(params)
  585. if err != nil {
  586. // Print the error, cast err to awserr.Error to get the Code and
  587. // Message from an error.
  588. fmt.Println(err.Error())
  589. return
  590. }
  591. // Pretty-print the response data.
  592. fmt.Println(resp)
  593. }
  594. func ExampleRedshift_DescribeClusterSubnetGroups() {
  595. svc := redshift.New(nil)
  596. params := &redshift.DescribeClusterSubnetGroupsInput{
  597. ClusterSubnetGroupName: aws.String("String"),
  598. Marker: aws.String("String"),
  599. MaxRecords: aws.Int64(1),
  600. TagKeys: []*string{
  601. aws.String("String"), // Required
  602. // More values...
  603. },
  604. TagValues: []*string{
  605. aws.String("String"), // Required
  606. // More values...
  607. },
  608. }
  609. resp, err := svc.DescribeClusterSubnetGroups(params)
  610. if err != nil {
  611. // Print the error, cast err to awserr.Error to get the Code and
  612. // Message from an error.
  613. fmt.Println(err.Error())
  614. return
  615. }
  616. // Pretty-print the response data.
  617. fmt.Println(resp)
  618. }
  619. func ExampleRedshift_DescribeClusterVersions() {
  620. svc := redshift.New(nil)
  621. params := &redshift.DescribeClusterVersionsInput{
  622. ClusterParameterGroupFamily: aws.String("String"),
  623. ClusterVersion: aws.String("String"),
  624. Marker: aws.String("String"),
  625. MaxRecords: aws.Int64(1),
  626. }
  627. resp, err := svc.DescribeClusterVersions(params)
  628. if err != nil {
  629. // Print the error, cast err to awserr.Error to get the Code and
  630. // Message from an error.
  631. fmt.Println(err.Error())
  632. return
  633. }
  634. // Pretty-print the response data.
  635. fmt.Println(resp)
  636. }
  637. func ExampleRedshift_DescribeClusters() {
  638. svc := redshift.New(nil)
  639. params := &redshift.DescribeClustersInput{
  640. ClusterIdentifier: aws.String("String"),
  641. Marker: aws.String("String"),
  642. MaxRecords: aws.Int64(1),
  643. TagKeys: []*string{
  644. aws.String("String"), // Required
  645. // More values...
  646. },
  647. TagValues: []*string{
  648. aws.String("String"), // Required
  649. // More values...
  650. },
  651. }
  652. resp, err := svc.DescribeClusters(params)
  653. if err != nil {
  654. // Print the error, cast err to awserr.Error to get the Code and
  655. // Message from an error.
  656. fmt.Println(err.Error())
  657. return
  658. }
  659. // Pretty-print the response data.
  660. fmt.Println(resp)
  661. }
  662. func ExampleRedshift_DescribeDefaultClusterParameters() {
  663. svc := redshift.New(nil)
  664. params := &redshift.DescribeDefaultClusterParametersInput{
  665. ParameterGroupFamily: aws.String("String"), // Required
  666. Marker: aws.String("String"),
  667. MaxRecords: aws.Int64(1),
  668. }
  669. resp, err := svc.DescribeDefaultClusterParameters(params)
  670. if err != nil {
  671. // Print the error, cast err to awserr.Error to get the Code and
  672. // Message from an error.
  673. fmt.Println(err.Error())
  674. return
  675. }
  676. // Pretty-print the response data.
  677. fmt.Println(resp)
  678. }
  679. func ExampleRedshift_DescribeEventCategories() {
  680. svc := redshift.New(nil)
  681. params := &redshift.DescribeEventCategoriesInput{
  682. SourceType: aws.String("String"),
  683. }
  684. resp, err := svc.DescribeEventCategories(params)
  685. if err != nil {
  686. // Print the error, cast err to awserr.Error to get the Code and
  687. // Message from an error.
  688. fmt.Println(err.Error())
  689. return
  690. }
  691. // Pretty-print the response data.
  692. fmt.Println(resp)
  693. }
  694. func ExampleRedshift_DescribeEventSubscriptions() {
  695. svc := redshift.New(nil)
  696. params := &redshift.DescribeEventSubscriptionsInput{
  697. Marker: aws.String("String"),
  698. MaxRecords: aws.Int64(1),
  699. SubscriptionName: aws.String("String"),
  700. }
  701. resp, err := svc.DescribeEventSubscriptions(params)
  702. if err != nil {
  703. // Print the error, cast err to awserr.Error to get the Code and
  704. // Message from an error.
  705. fmt.Println(err.Error())
  706. return
  707. }
  708. // Pretty-print the response data.
  709. fmt.Println(resp)
  710. }
  711. func ExampleRedshift_DescribeEvents() {
  712. svc := redshift.New(nil)
  713. params := &redshift.DescribeEventsInput{
  714. Duration: aws.Int64(1),
  715. EndTime: aws.Time(time.Now()),
  716. Marker: aws.String("String"),
  717. MaxRecords: aws.Int64(1),
  718. SourceIdentifier: aws.String("String"),
  719. SourceType: aws.String("SourceType"),
  720. StartTime: aws.Time(time.Now()),
  721. }
  722. resp, err := svc.DescribeEvents(params)
  723. if err != nil {
  724. // Print the error, cast err to awserr.Error to get the Code and
  725. // Message from an error.
  726. fmt.Println(err.Error())
  727. return
  728. }
  729. // Pretty-print the response data.
  730. fmt.Println(resp)
  731. }
  732. func ExampleRedshift_DescribeHsmClientCertificates() {
  733. svc := redshift.New(nil)
  734. params := &redshift.DescribeHsmClientCertificatesInput{
  735. HsmClientCertificateIdentifier: aws.String("String"),
  736. Marker: aws.String("String"),
  737. MaxRecords: aws.Int64(1),
  738. TagKeys: []*string{
  739. aws.String("String"), // Required
  740. // More values...
  741. },
  742. TagValues: []*string{
  743. aws.String("String"), // Required
  744. // More values...
  745. },
  746. }
  747. resp, err := svc.DescribeHsmClientCertificates(params)
  748. if err != nil {
  749. // Print the error, cast err to awserr.Error to get the Code and
  750. // Message from an error.
  751. fmt.Println(err.Error())
  752. return
  753. }
  754. // Pretty-print the response data.
  755. fmt.Println(resp)
  756. }
  757. func ExampleRedshift_DescribeHsmConfigurations() {
  758. svc := redshift.New(nil)
  759. params := &redshift.DescribeHsmConfigurationsInput{
  760. HsmConfigurationIdentifier: aws.String("String"),
  761. Marker: aws.String("String"),
  762. MaxRecords: aws.Int64(1),
  763. TagKeys: []*string{
  764. aws.String("String"), // Required
  765. // More values...
  766. },
  767. TagValues: []*string{
  768. aws.String("String"), // Required
  769. // More values...
  770. },
  771. }
  772. resp, err := svc.DescribeHsmConfigurations(params)
  773. if err != nil {
  774. // Print the error, cast err to awserr.Error to get the Code and
  775. // Message from an error.
  776. fmt.Println(err.Error())
  777. return
  778. }
  779. // Pretty-print the response data.
  780. fmt.Println(resp)
  781. }
  782. func ExampleRedshift_DescribeLoggingStatus() {
  783. svc := redshift.New(nil)
  784. params := &redshift.DescribeLoggingStatusInput{
  785. ClusterIdentifier: aws.String("String"), // Required
  786. }
  787. resp, err := svc.DescribeLoggingStatus(params)
  788. if err != nil {
  789. // Print the error, cast err to awserr.Error to get the Code and
  790. // Message from an error.
  791. fmt.Println(err.Error())
  792. return
  793. }
  794. // Pretty-print the response data.
  795. fmt.Println(resp)
  796. }
  797. func ExampleRedshift_DescribeOrderableClusterOptions() {
  798. svc := redshift.New(nil)
  799. params := &redshift.DescribeOrderableClusterOptionsInput{
  800. ClusterVersion: aws.String("String"),
  801. Marker: aws.String("String"),
  802. MaxRecords: aws.Int64(1),
  803. NodeType: aws.String("String"),
  804. }
  805. resp, err := svc.DescribeOrderableClusterOptions(params)
  806. if err != nil {
  807. // Print the error, cast err to awserr.Error to get the Code and
  808. // Message from an error.
  809. fmt.Println(err.Error())
  810. return
  811. }
  812. // Pretty-print the response data.
  813. fmt.Println(resp)
  814. }
  815. func ExampleRedshift_DescribeReservedNodeOfferings() {
  816. svc := redshift.New(nil)
  817. params := &redshift.DescribeReservedNodeOfferingsInput{
  818. Marker: aws.String("String"),
  819. MaxRecords: aws.Int64(1),
  820. ReservedNodeOfferingId: aws.String("String"),
  821. }
  822. resp, err := svc.DescribeReservedNodeOfferings(params)
  823. if err != nil {
  824. // Print the error, cast err to awserr.Error to get the Code and
  825. // Message from an error.
  826. fmt.Println(err.Error())
  827. return
  828. }
  829. // Pretty-print the response data.
  830. fmt.Println(resp)
  831. }
  832. func ExampleRedshift_DescribeReservedNodes() {
  833. svc := redshift.New(nil)
  834. params := &redshift.DescribeReservedNodesInput{
  835. Marker: aws.String("String"),
  836. MaxRecords: aws.Int64(1),
  837. ReservedNodeId: aws.String("String"),
  838. }
  839. resp, err := svc.DescribeReservedNodes(params)
  840. if err != nil {
  841. // Print the error, cast err to awserr.Error to get the Code and
  842. // Message from an error.
  843. fmt.Println(err.Error())
  844. return
  845. }
  846. // Pretty-print the response data.
  847. fmt.Println(resp)
  848. }
  849. func ExampleRedshift_DescribeResize() {
  850. svc := redshift.New(nil)
  851. params := &redshift.DescribeResizeInput{
  852. ClusterIdentifier: aws.String("String"), // Required
  853. }
  854. resp, err := svc.DescribeResize(params)
  855. if err != nil {
  856. // Print the error, cast err to awserr.Error to get the Code and
  857. // Message from an error.
  858. fmt.Println(err.Error())
  859. return
  860. }
  861. // Pretty-print the response data.
  862. fmt.Println(resp)
  863. }
  864. func ExampleRedshift_DescribeSnapshotCopyGrants() {
  865. svc := redshift.New(nil)
  866. params := &redshift.DescribeSnapshotCopyGrantsInput{
  867. Marker: aws.String("String"),
  868. MaxRecords: aws.Int64(1),
  869. SnapshotCopyGrantName: aws.String("String"),
  870. TagKeys: []*string{
  871. aws.String("String"), // Required
  872. // More values...
  873. },
  874. TagValues: []*string{
  875. aws.String("String"), // Required
  876. // More values...
  877. },
  878. }
  879. resp, err := svc.DescribeSnapshotCopyGrants(params)
  880. if err != nil {
  881. // Print the error, cast err to awserr.Error to get the Code and
  882. // Message from an error.
  883. fmt.Println(err.Error())
  884. return
  885. }
  886. // Pretty-print the response data.
  887. fmt.Println(resp)
  888. }
  889. func ExampleRedshift_DescribeTags() {
  890. svc := redshift.New(nil)
  891. params := &redshift.DescribeTagsInput{
  892. Marker: aws.String("String"),
  893. MaxRecords: aws.Int64(1),
  894. ResourceName: aws.String("String"),
  895. ResourceType: aws.String("String"),
  896. TagKeys: []*string{
  897. aws.String("String"), // Required
  898. // More values...
  899. },
  900. TagValues: []*string{
  901. aws.String("String"), // Required
  902. // More values...
  903. },
  904. }
  905. resp, err := svc.DescribeTags(params)
  906. if err != nil {
  907. // Print the error, cast err to awserr.Error to get the Code and
  908. // Message from an error.
  909. fmt.Println(err.Error())
  910. return
  911. }
  912. // Pretty-print the response data.
  913. fmt.Println(resp)
  914. }
  915. func ExampleRedshift_DisableLogging() {
  916. svc := redshift.New(nil)
  917. params := &redshift.DisableLoggingInput{
  918. ClusterIdentifier: aws.String("String"), // Required
  919. }
  920. resp, err := svc.DisableLogging(params)
  921. if err != nil {
  922. // Print the error, cast err to awserr.Error to get the Code and
  923. // Message from an error.
  924. fmt.Println(err.Error())
  925. return
  926. }
  927. // Pretty-print the response data.
  928. fmt.Println(resp)
  929. }
  930. func ExampleRedshift_DisableSnapshotCopy() {
  931. svc := redshift.New(nil)
  932. params := &redshift.DisableSnapshotCopyInput{
  933. ClusterIdentifier: aws.String("String"), // Required
  934. }
  935. resp, err := svc.DisableSnapshotCopy(params)
  936. if err != nil {
  937. // Print the error, cast err to awserr.Error to get the Code and
  938. // Message from an error.
  939. fmt.Println(err.Error())
  940. return
  941. }
  942. // Pretty-print the response data.
  943. fmt.Println(resp)
  944. }
  945. func ExampleRedshift_EnableLogging() {
  946. svc := redshift.New(nil)
  947. params := &redshift.EnableLoggingInput{
  948. BucketName: aws.String("String"), // Required
  949. ClusterIdentifier: aws.String("String"), // Required
  950. S3KeyPrefix: aws.String("String"),
  951. }
  952. resp, err := svc.EnableLogging(params)
  953. if err != nil {
  954. // Print the error, cast err to awserr.Error to get the Code and
  955. // Message from an error.
  956. fmt.Println(err.Error())
  957. return
  958. }
  959. // Pretty-print the response data.
  960. fmt.Println(resp)
  961. }
  962. func ExampleRedshift_EnableSnapshotCopy() {
  963. svc := redshift.New(nil)
  964. params := &redshift.EnableSnapshotCopyInput{
  965. ClusterIdentifier: aws.String("String"), // Required
  966. DestinationRegion: aws.String("String"), // Required
  967. RetentionPeriod: aws.Int64(1),
  968. SnapshotCopyGrantName: aws.String("String"),
  969. }
  970. resp, err := svc.EnableSnapshotCopy(params)
  971. if err != nil {
  972. // Print the error, cast err to awserr.Error to get the Code and
  973. // Message from an error.
  974. fmt.Println(err.Error())
  975. return
  976. }
  977. // Pretty-print the response data.
  978. fmt.Println(resp)
  979. }
  980. func ExampleRedshift_ModifyCluster() {
  981. svc := redshift.New(nil)
  982. params := &redshift.ModifyClusterInput{
  983. ClusterIdentifier: aws.String("String"), // Required
  984. AllowVersionUpgrade: aws.Bool(true),
  985. AutomatedSnapshotRetentionPeriod: aws.Int64(1),
  986. ClusterParameterGroupName: aws.String("String"),
  987. ClusterSecurityGroups: []*string{
  988. aws.String("String"), // Required
  989. // More values...
  990. },
  991. ClusterType: aws.String("String"),
  992. ClusterVersion: aws.String("String"),
  993. HsmClientCertificateIdentifier: aws.String("String"),
  994. HsmConfigurationIdentifier: aws.String("String"),
  995. MasterUserPassword: aws.String("String"),
  996. NewClusterIdentifier: aws.String("String"),
  997. NodeType: aws.String("String"),
  998. NumberOfNodes: aws.Int64(1),
  999. PreferredMaintenanceWindow: aws.String("String"),
  1000. VpcSecurityGroupIds: []*string{
  1001. aws.String("String"), // Required
  1002. // More values...
  1003. },
  1004. }
  1005. resp, err := svc.ModifyCluster(params)
  1006. if err != nil {
  1007. // Print the error, cast err to awserr.Error to get the Code and
  1008. // Message from an error.
  1009. fmt.Println(err.Error())
  1010. return
  1011. }
  1012. // Pretty-print the response data.
  1013. fmt.Println(resp)
  1014. }
  1015. func ExampleRedshift_ModifyClusterParameterGroup() {
  1016. svc := redshift.New(nil)
  1017. params := &redshift.ModifyClusterParameterGroupInput{
  1018. ParameterGroupName: aws.String("String"), // Required
  1019. Parameters: []*redshift.Parameter{ // Required
  1020. { // Required
  1021. AllowedValues: aws.String("String"),
  1022. ApplyType: aws.String("ParameterApplyType"),
  1023. DataType: aws.String("String"),
  1024. Description: aws.String("String"),
  1025. IsModifiable: aws.Bool(true),
  1026. MinimumEngineVersion: aws.String("String"),
  1027. ParameterName: aws.String("String"),
  1028. ParameterValue: aws.String("String"),
  1029. Source: aws.String("String"),
  1030. },
  1031. // More values...
  1032. },
  1033. }
  1034. resp, err := svc.ModifyClusterParameterGroup(params)
  1035. if err != nil {
  1036. // Print the error, cast err to awserr.Error to get the Code and
  1037. // Message from an error.
  1038. fmt.Println(err.Error())
  1039. return
  1040. }
  1041. // Pretty-print the response data.
  1042. fmt.Println(resp)
  1043. }
  1044. func ExampleRedshift_ModifyClusterSubnetGroup() {
  1045. svc := redshift.New(nil)
  1046. params := &redshift.ModifyClusterSubnetGroupInput{
  1047. ClusterSubnetGroupName: aws.String("String"), // Required
  1048. SubnetIds: []*string{ // Required
  1049. aws.String("String"), // Required
  1050. // More values...
  1051. },
  1052. Description: aws.String("String"),
  1053. }
  1054. resp, err := svc.ModifyClusterSubnetGroup(params)
  1055. if err != nil {
  1056. // Print the error, cast err to awserr.Error to get the Code and
  1057. // Message from an error.
  1058. fmt.Println(err.Error())
  1059. return
  1060. }
  1061. // Pretty-print the response data.
  1062. fmt.Println(resp)
  1063. }
  1064. func ExampleRedshift_ModifyEventSubscription() {
  1065. svc := redshift.New(nil)
  1066. params := &redshift.ModifyEventSubscriptionInput{
  1067. SubscriptionName: aws.String("String"), // Required
  1068. Enabled: aws.Bool(true),
  1069. EventCategories: []*string{
  1070. aws.String("String"), // Required
  1071. // More values...
  1072. },
  1073. Severity: aws.String("String"),
  1074. SnsTopicArn: aws.String("String"),
  1075. SourceIds: []*string{
  1076. aws.String("String"), // Required
  1077. // More values...
  1078. },
  1079. SourceType: aws.String("String"),
  1080. }
  1081. resp, err := svc.ModifyEventSubscription(params)
  1082. if err != nil {
  1083. // Print the error, cast err to awserr.Error to get the Code and
  1084. // Message from an error.
  1085. fmt.Println(err.Error())
  1086. return
  1087. }
  1088. // Pretty-print the response data.
  1089. fmt.Println(resp)
  1090. }
  1091. func ExampleRedshift_ModifySnapshotCopyRetentionPeriod() {
  1092. svc := redshift.New(nil)
  1093. params := &redshift.ModifySnapshotCopyRetentionPeriodInput{
  1094. ClusterIdentifier: aws.String("String"), // Required
  1095. RetentionPeriod: aws.Int64(1), // Required
  1096. }
  1097. resp, err := svc.ModifySnapshotCopyRetentionPeriod(params)
  1098. if err != nil {
  1099. // Print the error, cast err to awserr.Error to get the Code and
  1100. // Message from an error.
  1101. fmt.Println(err.Error())
  1102. return
  1103. }
  1104. // Pretty-print the response data.
  1105. fmt.Println(resp)
  1106. }
  1107. func ExampleRedshift_PurchaseReservedNodeOffering() {
  1108. svc := redshift.New(nil)
  1109. params := &redshift.PurchaseReservedNodeOfferingInput{
  1110. ReservedNodeOfferingId: aws.String("String"), // Required
  1111. NodeCount: aws.Int64(1),
  1112. }
  1113. resp, err := svc.PurchaseReservedNodeOffering(params)
  1114. if err != nil {
  1115. // Print the error, cast err to awserr.Error to get the Code and
  1116. // Message from an error.
  1117. fmt.Println(err.Error())
  1118. return
  1119. }
  1120. // Pretty-print the response data.
  1121. fmt.Println(resp)
  1122. }
  1123. func ExampleRedshift_RebootCluster() {
  1124. svc := redshift.New(nil)
  1125. params := &redshift.RebootClusterInput{
  1126. ClusterIdentifier: aws.String("String"), // Required
  1127. }
  1128. resp, err := svc.RebootCluster(params)
  1129. if err != nil {
  1130. // Print the error, cast err to awserr.Error to get the Code and
  1131. // Message from an error.
  1132. fmt.Println(err.Error())
  1133. return
  1134. }
  1135. // Pretty-print the response data.
  1136. fmt.Println(resp)
  1137. }
  1138. func ExampleRedshift_ResetClusterParameterGroup() {
  1139. svc := redshift.New(nil)
  1140. params := &redshift.ResetClusterParameterGroupInput{
  1141. ParameterGroupName: aws.String("String"), // Required
  1142. Parameters: []*redshift.Parameter{
  1143. { // Required
  1144. AllowedValues: aws.String("String"),
  1145. ApplyType: aws.String("ParameterApplyType"),
  1146. DataType: aws.String("String"),
  1147. Description: aws.String("String"),
  1148. IsModifiable: aws.Bool(true),
  1149. MinimumEngineVersion: aws.String("String"),
  1150. ParameterName: aws.String("String"),
  1151. ParameterValue: aws.String("String"),
  1152. Source: aws.String("String"),
  1153. },
  1154. // More values...
  1155. },
  1156. ResetAllParameters: aws.Bool(true),
  1157. }
  1158. resp, err := svc.ResetClusterParameterGroup(params)
  1159. if err != nil {
  1160. // Print the error, cast err to awserr.Error to get the Code and
  1161. // Message from an error.
  1162. fmt.Println(err.Error())
  1163. return
  1164. }
  1165. // Pretty-print the response data.
  1166. fmt.Println(resp)
  1167. }
  1168. func ExampleRedshift_RestoreFromClusterSnapshot() {
  1169. svc := redshift.New(nil)
  1170. params := &redshift.RestoreFromClusterSnapshotInput{
  1171. ClusterIdentifier: aws.String("String"), // Required
  1172. SnapshotIdentifier: aws.String("String"), // Required
  1173. AllowVersionUpgrade: aws.Bool(true),
  1174. AutomatedSnapshotRetentionPeriod: aws.Int64(1),
  1175. AvailabilityZone: aws.String("String"),
  1176. ClusterParameterGroupName: aws.String("String"),
  1177. ClusterSecurityGroups: []*string{
  1178. aws.String("String"), // Required
  1179. // More values...
  1180. },
  1181. ClusterSubnetGroupName: aws.String("String"),
  1182. ElasticIp: aws.String("String"),
  1183. HsmClientCertificateIdentifier: aws.String("String"),
  1184. HsmConfigurationIdentifier: aws.String("String"),
  1185. KmsKeyId: aws.String("String"),
  1186. NodeType: aws.String("String"),
  1187. OwnerAccount: aws.String("String"),
  1188. Port: aws.Int64(1),
  1189. PreferredMaintenanceWindow: aws.String("String"),
  1190. PubliclyAccessible: aws.Bool(true),
  1191. SnapshotClusterIdentifier: aws.String("String"),
  1192. VpcSecurityGroupIds: []*string{
  1193. aws.String("String"), // Required
  1194. // More values...
  1195. },
  1196. }
  1197. resp, err := svc.RestoreFromClusterSnapshot(params)
  1198. if err != nil {
  1199. // Print the error, cast err to awserr.Error to get the Code and
  1200. // Message from an error.
  1201. fmt.Println(err.Error())
  1202. return
  1203. }
  1204. // Pretty-print the response data.
  1205. fmt.Println(resp)
  1206. }
  1207. func ExampleRedshift_RevokeClusterSecurityGroupIngress() {
  1208. svc := redshift.New(nil)
  1209. params := &redshift.RevokeClusterSecurityGroupIngressInput{
  1210. ClusterSecurityGroupName: aws.String("String"), // Required
  1211. CIDRIP: aws.String("String"),
  1212. EC2SecurityGroupName: aws.String("String"),
  1213. EC2SecurityGroupOwnerId: aws.String("String"),
  1214. }
  1215. resp, err := svc.RevokeClusterSecurityGroupIngress(params)
  1216. if err != nil {
  1217. // Print the error, cast err to awserr.Error to get the Code and
  1218. // Message from an error.
  1219. fmt.Println(err.Error())
  1220. return
  1221. }
  1222. // Pretty-print the response data.
  1223. fmt.Println(resp)
  1224. }
  1225. func ExampleRedshift_RevokeSnapshotAccess() {
  1226. svc := redshift.New(nil)
  1227. params := &redshift.RevokeSnapshotAccessInput{
  1228. AccountWithRestoreAccess: aws.String("String"), // Required
  1229. SnapshotIdentifier: aws.String("String"), // Required
  1230. SnapshotClusterIdentifier: aws.String("String"),
  1231. }
  1232. resp, err := svc.RevokeSnapshotAccess(params)
  1233. if err != nil {
  1234. // Print the error, cast err to awserr.Error to get the Code and
  1235. // Message from an error.
  1236. fmt.Println(err.Error())
  1237. return
  1238. }
  1239. // Pretty-print the response data.
  1240. fmt.Println(resp)
  1241. }
  1242. func ExampleRedshift_RotateEncryptionKey() {
  1243. svc := redshift.New(nil)
  1244. params := &redshift.RotateEncryptionKeyInput{
  1245. ClusterIdentifier: aws.String("String"), // Required
  1246. }
  1247. resp, err := svc.RotateEncryptionKey(params)
  1248. if err != nil {
  1249. // Print the error, cast err to awserr.Error to get the Code and
  1250. // Message from an error.
  1251. fmt.Println(err.Error())
  1252. return
  1253. }
  1254. // Pretty-print the response data.
  1255. fmt.Println(resp)
  1256. }