examples_test.go 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package rds_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/rds"
  9. )
  10. var _ time.Duration
  11. var _ bytes.Buffer
  12. func ExampleRDS_AddSourceIdentifierToSubscription() {
  13. svc := rds.New(nil)
  14. params := &rds.AddSourceIdentifierToSubscriptionInput{
  15. SourceIdentifier: aws.String("String"), // Required
  16. SubscriptionName: aws.String("String"), // Required
  17. }
  18. resp, err := svc.AddSourceIdentifierToSubscription(params)
  19. if err != nil {
  20. // Print the error, cast err to awserr.Error to get the Code and
  21. // Message from an error.
  22. fmt.Println(err.Error())
  23. return
  24. }
  25. // Pretty-print the response data.
  26. fmt.Println(resp)
  27. }
  28. func ExampleRDS_AddTagsToResource() {
  29. svc := rds.New(nil)
  30. params := &rds.AddTagsToResourceInput{
  31. ResourceName: aws.String("String"), // Required
  32. Tags: []*rds.Tag{ // Required
  33. { // Required
  34. Key: aws.String("String"),
  35. Value: aws.String("String"),
  36. },
  37. // More values...
  38. },
  39. }
  40. resp, err := svc.AddTagsToResource(params)
  41. if err != nil {
  42. // Print the error, cast err to awserr.Error to get the Code and
  43. // Message from an error.
  44. fmt.Println(err.Error())
  45. return
  46. }
  47. // Pretty-print the response data.
  48. fmt.Println(resp)
  49. }
  50. func ExampleRDS_ApplyPendingMaintenanceAction() {
  51. svc := rds.New(nil)
  52. params := &rds.ApplyPendingMaintenanceActionInput{
  53. ApplyAction: aws.String("String"), // Required
  54. OptInType: aws.String("String"), // Required
  55. ResourceIdentifier: aws.String("String"), // Required
  56. }
  57. resp, err := svc.ApplyPendingMaintenanceAction(params)
  58. if err != nil {
  59. // Print the error, cast err to awserr.Error to get the Code and
  60. // Message from an error.
  61. fmt.Println(err.Error())
  62. return
  63. }
  64. // Pretty-print the response data.
  65. fmt.Println(resp)
  66. }
  67. func ExampleRDS_AuthorizeDBSecurityGroupIngress() {
  68. svc := rds.New(nil)
  69. params := &rds.AuthorizeDBSecurityGroupIngressInput{
  70. DBSecurityGroupName: aws.String("String"), // Required
  71. CIDRIP: aws.String("String"),
  72. EC2SecurityGroupId: aws.String("String"),
  73. EC2SecurityGroupName: aws.String("String"),
  74. EC2SecurityGroupOwnerId: aws.String("String"),
  75. }
  76. resp, err := svc.AuthorizeDBSecurityGroupIngress(params)
  77. if err != nil {
  78. // Print the error, cast err to awserr.Error to get the Code and
  79. // Message from an error.
  80. fmt.Println(err.Error())
  81. return
  82. }
  83. // Pretty-print the response data.
  84. fmt.Println(resp)
  85. }
  86. func ExampleRDS_CopyDBClusterSnapshot() {
  87. svc := rds.New(nil)
  88. params := &rds.CopyDBClusterSnapshotInput{
  89. SourceDBClusterSnapshotIdentifier: aws.String("String"), // Required
  90. TargetDBClusterSnapshotIdentifier: aws.String("String"), // Required
  91. Tags: []*rds.Tag{
  92. { // Required
  93. Key: aws.String("String"),
  94. Value: aws.String("String"),
  95. },
  96. // More values...
  97. },
  98. }
  99. resp, err := svc.CopyDBClusterSnapshot(params)
  100. if err != nil {
  101. // Print the error, cast err to awserr.Error to get the Code and
  102. // Message from an error.
  103. fmt.Println(err.Error())
  104. return
  105. }
  106. // Pretty-print the response data.
  107. fmt.Println(resp)
  108. }
  109. func ExampleRDS_CopyDBParameterGroup() {
  110. svc := rds.New(nil)
  111. params := &rds.CopyDBParameterGroupInput{
  112. SourceDBParameterGroupIdentifier: aws.String("String"), // Required
  113. TargetDBParameterGroupDescription: aws.String("String"), // Required
  114. TargetDBParameterGroupIdentifier: aws.String("String"), // Required
  115. Tags: []*rds.Tag{
  116. { // Required
  117. Key: aws.String("String"),
  118. Value: aws.String("String"),
  119. },
  120. // More values...
  121. },
  122. }
  123. resp, err := svc.CopyDBParameterGroup(params)
  124. if err != nil {
  125. // Print the error, cast err to awserr.Error to get the Code and
  126. // Message from an error.
  127. fmt.Println(err.Error())
  128. return
  129. }
  130. // Pretty-print the response data.
  131. fmt.Println(resp)
  132. }
  133. func ExampleRDS_CopyDBSnapshot() {
  134. svc := rds.New(nil)
  135. params := &rds.CopyDBSnapshotInput{
  136. SourceDBSnapshotIdentifier: aws.String("String"), // Required
  137. TargetDBSnapshotIdentifier: aws.String("String"), // Required
  138. Tags: []*rds.Tag{
  139. { // Required
  140. Key: aws.String("String"),
  141. Value: aws.String("String"),
  142. },
  143. // More values...
  144. },
  145. }
  146. resp, err := svc.CopyDBSnapshot(params)
  147. if err != nil {
  148. // Print the error, cast err to awserr.Error to get the Code and
  149. // Message from an error.
  150. fmt.Println(err.Error())
  151. return
  152. }
  153. // Pretty-print the response data.
  154. fmt.Println(resp)
  155. }
  156. func ExampleRDS_CopyOptionGroup() {
  157. svc := rds.New(nil)
  158. params := &rds.CopyOptionGroupInput{
  159. SourceOptionGroupIdentifier: aws.String("String"), // Required
  160. TargetOptionGroupDescription: aws.String("String"), // Required
  161. TargetOptionGroupIdentifier: aws.String("String"), // Required
  162. Tags: []*rds.Tag{
  163. { // Required
  164. Key: aws.String("String"),
  165. Value: aws.String("String"),
  166. },
  167. // More values...
  168. },
  169. }
  170. resp, err := svc.CopyOptionGroup(params)
  171. if err != nil {
  172. // Print the error, cast err to awserr.Error to get the Code and
  173. // Message from an error.
  174. fmt.Println(err.Error())
  175. return
  176. }
  177. // Pretty-print the response data.
  178. fmt.Println(resp)
  179. }
  180. func ExampleRDS_CreateDBCluster() {
  181. svc := rds.New(nil)
  182. params := &rds.CreateDBClusterInput{
  183. AvailabilityZones: []*string{
  184. aws.String("String"), // Required
  185. // More values...
  186. },
  187. BackupRetentionPeriod: aws.Int64(1),
  188. CharacterSetName: aws.String("String"),
  189. DBClusterIdentifier: aws.String("String"),
  190. DBClusterParameterGroupName: aws.String("String"),
  191. DBSubnetGroupName: aws.String("String"),
  192. DatabaseName: aws.String("String"),
  193. Engine: aws.String("String"),
  194. EngineVersion: aws.String("String"),
  195. MasterUserPassword: aws.String("String"),
  196. MasterUsername: aws.String("String"),
  197. OptionGroupName: aws.String("String"),
  198. Port: aws.Int64(1),
  199. PreferredBackupWindow: aws.String("String"),
  200. PreferredMaintenanceWindow: aws.String("String"),
  201. Tags: []*rds.Tag{
  202. { // Required
  203. Key: aws.String("String"),
  204. Value: aws.String("String"),
  205. },
  206. // More values...
  207. },
  208. VpcSecurityGroupIds: []*string{
  209. aws.String("String"), // Required
  210. // More values...
  211. },
  212. }
  213. resp, err := svc.CreateDBCluster(params)
  214. if err != nil {
  215. // Print the error, cast err to awserr.Error to get the Code and
  216. // Message from an error.
  217. fmt.Println(err.Error())
  218. return
  219. }
  220. // Pretty-print the response data.
  221. fmt.Println(resp)
  222. }
  223. func ExampleRDS_CreateDBClusterParameterGroup() {
  224. svc := rds.New(nil)
  225. params := &rds.CreateDBClusterParameterGroupInput{
  226. DBClusterParameterGroupName: aws.String("String"), // Required
  227. DBParameterGroupFamily: aws.String("String"), // Required
  228. Description: aws.String("String"), // Required
  229. Tags: []*rds.Tag{
  230. { // Required
  231. Key: aws.String("String"),
  232. Value: aws.String("String"),
  233. },
  234. // More values...
  235. },
  236. }
  237. resp, err := svc.CreateDBClusterParameterGroup(params)
  238. if err != nil {
  239. // Print the error, cast err to awserr.Error to get the Code and
  240. // Message from an error.
  241. fmt.Println(err.Error())
  242. return
  243. }
  244. // Pretty-print the response data.
  245. fmt.Println(resp)
  246. }
  247. func ExampleRDS_CreateDBClusterSnapshot() {
  248. svc := rds.New(nil)
  249. params := &rds.CreateDBClusterSnapshotInput{
  250. DBClusterIdentifier: aws.String("String"), // Required
  251. DBClusterSnapshotIdentifier: aws.String("String"), // Required
  252. Tags: []*rds.Tag{
  253. { // Required
  254. Key: aws.String("String"),
  255. Value: aws.String("String"),
  256. },
  257. // More values...
  258. },
  259. }
  260. resp, err := svc.CreateDBClusterSnapshot(params)
  261. if err != nil {
  262. // Print the error, cast err to awserr.Error to get the Code and
  263. // Message from an error.
  264. fmt.Println(err.Error())
  265. return
  266. }
  267. // Pretty-print the response data.
  268. fmt.Println(resp)
  269. }
  270. func ExampleRDS_CreateDBInstance() {
  271. svc := rds.New(nil)
  272. params := &rds.CreateDBInstanceInput{
  273. DBInstanceClass: aws.String("String"), // Required
  274. DBInstanceIdentifier: aws.String("String"), // Required
  275. Engine: aws.String("String"), // Required
  276. AllocatedStorage: aws.Int64(1),
  277. AutoMinorVersionUpgrade: aws.Bool(true),
  278. AvailabilityZone: aws.String("String"),
  279. BackupRetentionPeriod: aws.Int64(1),
  280. CharacterSetName: aws.String("String"),
  281. DBClusterIdentifier: aws.String("String"),
  282. DBName: aws.String("String"),
  283. DBParameterGroupName: aws.String("String"),
  284. DBSecurityGroups: []*string{
  285. aws.String("String"), // Required
  286. // More values...
  287. },
  288. DBSubnetGroupName: aws.String("String"),
  289. EngineVersion: aws.String("String"),
  290. Iops: aws.Int64(1),
  291. KmsKeyId: aws.String("String"),
  292. LicenseModel: aws.String("String"),
  293. MasterUserPassword: aws.String("String"),
  294. MasterUsername: aws.String("String"),
  295. MultiAZ: aws.Bool(true),
  296. OptionGroupName: aws.String("String"),
  297. Port: aws.Int64(1),
  298. PreferredBackupWindow: aws.String("String"),
  299. PreferredMaintenanceWindow: aws.String("String"),
  300. PubliclyAccessible: aws.Bool(true),
  301. StorageEncrypted: aws.Bool(true),
  302. StorageType: aws.String("String"),
  303. Tags: []*rds.Tag{
  304. { // Required
  305. Key: aws.String("String"),
  306. Value: aws.String("String"),
  307. },
  308. // More values...
  309. },
  310. TdeCredentialArn: aws.String("String"),
  311. TdeCredentialPassword: aws.String("String"),
  312. VpcSecurityGroupIds: []*string{
  313. aws.String("String"), // Required
  314. // More values...
  315. },
  316. }
  317. resp, err := svc.CreateDBInstance(params)
  318. if err != nil {
  319. // Print the error, cast err to awserr.Error to get the Code and
  320. // Message from an error.
  321. fmt.Println(err.Error())
  322. return
  323. }
  324. // Pretty-print the response data.
  325. fmt.Println(resp)
  326. }
  327. func ExampleRDS_CreateDBInstanceReadReplica() {
  328. svc := rds.New(nil)
  329. params := &rds.CreateDBInstanceReadReplicaInput{
  330. DBInstanceIdentifier: aws.String("String"), // Required
  331. SourceDBInstanceIdentifier: aws.String("String"), // Required
  332. AutoMinorVersionUpgrade: aws.Bool(true),
  333. AvailabilityZone: aws.String("String"),
  334. DBInstanceClass: aws.String("String"),
  335. DBSubnetGroupName: aws.String("String"),
  336. Iops: aws.Int64(1),
  337. OptionGroupName: aws.String("String"),
  338. Port: aws.Int64(1),
  339. PubliclyAccessible: aws.Bool(true),
  340. StorageType: aws.String("String"),
  341. Tags: []*rds.Tag{
  342. { // Required
  343. Key: aws.String("String"),
  344. Value: aws.String("String"),
  345. },
  346. // More values...
  347. },
  348. }
  349. resp, err := svc.CreateDBInstanceReadReplica(params)
  350. if err != nil {
  351. // Print the error, cast err to awserr.Error to get the Code and
  352. // Message from an error.
  353. fmt.Println(err.Error())
  354. return
  355. }
  356. // Pretty-print the response data.
  357. fmt.Println(resp)
  358. }
  359. func ExampleRDS_CreateDBParameterGroup() {
  360. svc := rds.New(nil)
  361. params := &rds.CreateDBParameterGroupInput{
  362. DBParameterGroupFamily: aws.String("String"), // Required
  363. DBParameterGroupName: aws.String("String"), // Required
  364. Description: aws.String("String"), // Required
  365. Tags: []*rds.Tag{
  366. { // Required
  367. Key: aws.String("String"),
  368. Value: aws.String("String"),
  369. },
  370. // More values...
  371. },
  372. }
  373. resp, err := svc.CreateDBParameterGroup(params)
  374. if err != nil {
  375. // Print the error, cast err to awserr.Error to get the Code and
  376. // Message from an error.
  377. fmt.Println(err.Error())
  378. return
  379. }
  380. // Pretty-print the response data.
  381. fmt.Println(resp)
  382. }
  383. func ExampleRDS_CreateDBSecurityGroup() {
  384. svc := rds.New(nil)
  385. params := &rds.CreateDBSecurityGroupInput{
  386. DBSecurityGroupDescription: aws.String("String"), // Required
  387. DBSecurityGroupName: aws.String("String"), // Required
  388. Tags: []*rds.Tag{
  389. { // Required
  390. Key: aws.String("String"),
  391. Value: aws.String("String"),
  392. },
  393. // More values...
  394. },
  395. }
  396. resp, err := svc.CreateDBSecurityGroup(params)
  397. if err != nil {
  398. // Print the error, cast err to awserr.Error to get the Code and
  399. // Message from an error.
  400. fmt.Println(err.Error())
  401. return
  402. }
  403. // Pretty-print the response data.
  404. fmt.Println(resp)
  405. }
  406. func ExampleRDS_CreateDBSnapshot() {
  407. svc := rds.New(nil)
  408. params := &rds.CreateDBSnapshotInput{
  409. DBInstanceIdentifier: aws.String("String"), // Required
  410. DBSnapshotIdentifier: aws.String("String"), // Required
  411. Tags: []*rds.Tag{
  412. { // Required
  413. Key: aws.String("String"),
  414. Value: aws.String("String"),
  415. },
  416. // More values...
  417. },
  418. }
  419. resp, err := svc.CreateDBSnapshot(params)
  420. if err != nil {
  421. // Print the error, cast err to awserr.Error to get the Code and
  422. // Message from an error.
  423. fmt.Println(err.Error())
  424. return
  425. }
  426. // Pretty-print the response data.
  427. fmt.Println(resp)
  428. }
  429. func ExampleRDS_CreateDBSubnetGroup() {
  430. svc := rds.New(nil)
  431. params := &rds.CreateDBSubnetGroupInput{
  432. DBSubnetGroupDescription: aws.String("String"), // Required
  433. DBSubnetGroupName: aws.String("String"), // Required
  434. SubnetIds: []*string{ // Required
  435. aws.String("String"), // Required
  436. // More values...
  437. },
  438. Tags: []*rds.Tag{
  439. { // Required
  440. Key: aws.String("String"),
  441. Value: aws.String("String"),
  442. },
  443. // More values...
  444. },
  445. }
  446. resp, err := svc.CreateDBSubnetGroup(params)
  447. if err != nil {
  448. // Print the error, cast err to awserr.Error to get the Code and
  449. // Message from an error.
  450. fmt.Println(err.Error())
  451. return
  452. }
  453. // Pretty-print the response data.
  454. fmt.Println(resp)
  455. }
  456. func ExampleRDS_CreateEventSubscription() {
  457. svc := rds.New(nil)
  458. params := &rds.CreateEventSubscriptionInput{
  459. SnsTopicArn: aws.String("String"), // Required
  460. SubscriptionName: aws.String("String"), // Required
  461. Enabled: aws.Bool(true),
  462. EventCategories: []*string{
  463. aws.String("String"), // Required
  464. // More values...
  465. },
  466. SourceIds: []*string{
  467. aws.String("String"), // Required
  468. // More values...
  469. },
  470. SourceType: aws.String("String"),
  471. Tags: []*rds.Tag{
  472. { // Required
  473. Key: aws.String("String"),
  474. Value: aws.String("String"),
  475. },
  476. // More values...
  477. },
  478. }
  479. resp, err := svc.CreateEventSubscription(params)
  480. if err != nil {
  481. // Print the error, cast err to awserr.Error to get the Code and
  482. // Message from an error.
  483. fmt.Println(err.Error())
  484. return
  485. }
  486. // Pretty-print the response data.
  487. fmt.Println(resp)
  488. }
  489. func ExampleRDS_CreateOptionGroup() {
  490. svc := rds.New(nil)
  491. params := &rds.CreateOptionGroupInput{
  492. EngineName: aws.String("String"), // Required
  493. MajorEngineVersion: aws.String("String"), // Required
  494. OptionGroupDescription: aws.String("String"), // Required
  495. OptionGroupName: aws.String("String"), // Required
  496. Tags: []*rds.Tag{
  497. { // Required
  498. Key: aws.String("String"),
  499. Value: aws.String("String"),
  500. },
  501. // More values...
  502. },
  503. }
  504. resp, err := svc.CreateOptionGroup(params)
  505. if err != nil {
  506. // Print the error, cast err to awserr.Error to get the Code and
  507. // Message from an error.
  508. fmt.Println(err.Error())
  509. return
  510. }
  511. // Pretty-print the response data.
  512. fmt.Println(resp)
  513. }
  514. func ExampleRDS_DeleteDBCluster() {
  515. svc := rds.New(nil)
  516. params := &rds.DeleteDBClusterInput{
  517. DBClusterIdentifier: aws.String("String"),
  518. FinalDBSnapshotIdentifier: aws.String("String"),
  519. SkipFinalSnapshot: aws.Bool(true),
  520. }
  521. resp, err := svc.DeleteDBCluster(params)
  522. if err != nil {
  523. // Print the error, cast err to awserr.Error to get the Code and
  524. // Message from an error.
  525. fmt.Println(err.Error())
  526. return
  527. }
  528. // Pretty-print the response data.
  529. fmt.Println(resp)
  530. }
  531. func ExampleRDS_DeleteDBClusterParameterGroup() {
  532. svc := rds.New(nil)
  533. params := &rds.DeleteDBClusterParameterGroupInput{
  534. DBClusterParameterGroupName: aws.String("String"), // Required
  535. }
  536. resp, err := svc.DeleteDBClusterParameterGroup(params)
  537. if err != nil {
  538. // Print the error, cast err to awserr.Error to get the Code and
  539. // Message from an error.
  540. fmt.Println(err.Error())
  541. return
  542. }
  543. // Pretty-print the response data.
  544. fmt.Println(resp)
  545. }
  546. func ExampleRDS_DeleteDBClusterSnapshot() {
  547. svc := rds.New(nil)
  548. params := &rds.DeleteDBClusterSnapshotInput{
  549. DBClusterSnapshotIdentifier: aws.String("String"), // Required
  550. }
  551. resp, err := svc.DeleteDBClusterSnapshot(params)
  552. if err != nil {
  553. // Print the error, cast err to awserr.Error to get the Code and
  554. // Message from an error.
  555. fmt.Println(err.Error())
  556. return
  557. }
  558. // Pretty-print the response data.
  559. fmt.Println(resp)
  560. }
  561. func ExampleRDS_DeleteDBInstance() {
  562. svc := rds.New(nil)
  563. params := &rds.DeleteDBInstanceInput{
  564. DBInstanceIdentifier: aws.String("String"), // Required
  565. FinalDBSnapshotIdentifier: aws.String("String"),
  566. SkipFinalSnapshot: aws.Bool(true),
  567. }
  568. resp, err := svc.DeleteDBInstance(params)
  569. if err != nil {
  570. // Print the error, cast err to awserr.Error to get the Code and
  571. // Message from an error.
  572. fmt.Println(err.Error())
  573. return
  574. }
  575. // Pretty-print the response data.
  576. fmt.Println(resp)
  577. }
  578. func ExampleRDS_DeleteDBParameterGroup() {
  579. svc := rds.New(nil)
  580. params := &rds.DeleteDBParameterGroupInput{
  581. DBParameterGroupName: aws.String("String"), // Required
  582. }
  583. resp, err := svc.DeleteDBParameterGroup(params)
  584. if err != nil {
  585. // Print the error, cast err to awserr.Error to get the Code and
  586. // Message from an error.
  587. fmt.Println(err.Error())
  588. return
  589. }
  590. // Pretty-print the response data.
  591. fmt.Println(resp)
  592. }
  593. func ExampleRDS_DeleteDBSecurityGroup() {
  594. svc := rds.New(nil)
  595. params := &rds.DeleteDBSecurityGroupInput{
  596. DBSecurityGroupName: aws.String("String"), // Required
  597. }
  598. resp, err := svc.DeleteDBSecurityGroup(params)
  599. if err != nil {
  600. // Print the error, cast err to awserr.Error to get the Code and
  601. // Message from an error.
  602. fmt.Println(err.Error())
  603. return
  604. }
  605. // Pretty-print the response data.
  606. fmt.Println(resp)
  607. }
  608. func ExampleRDS_DeleteDBSnapshot() {
  609. svc := rds.New(nil)
  610. params := &rds.DeleteDBSnapshotInput{
  611. DBSnapshotIdentifier: aws.String("String"), // Required
  612. }
  613. resp, err := svc.DeleteDBSnapshot(params)
  614. if err != nil {
  615. // Print the error, cast err to awserr.Error to get the Code and
  616. // Message from an error.
  617. fmt.Println(err.Error())
  618. return
  619. }
  620. // Pretty-print the response data.
  621. fmt.Println(resp)
  622. }
  623. func ExampleRDS_DeleteDBSubnetGroup() {
  624. svc := rds.New(nil)
  625. params := &rds.DeleteDBSubnetGroupInput{
  626. DBSubnetGroupName: aws.String("String"), // Required
  627. }
  628. resp, err := svc.DeleteDBSubnetGroup(params)
  629. if err != nil {
  630. // Print the error, cast err to awserr.Error to get the Code and
  631. // Message from an error.
  632. fmt.Println(err.Error())
  633. return
  634. }
  635. // Pretty-print the response data.
  636. fmt.Println(resp)
  637. }
  638. func ExampleRDS_DeleteEventSubscription() {
  639. svc := rds.New(nil)
  640. params := &rds.DeleteEventSubscriptionInput{
  641. SubscriptionName: aws.String("String"), // Required
  642. }
  643. resp, err := svc.DeleteEventSubscription(params)
  644. if err != nil {
  645. // Print the error, cast err to awserr.Error to get the Code and
  646. // Message from an error.
  647. fmt.Println(err.Error())
  648. return
  649. }
  650. // Pretty-print the response data.
  651. fmt.Println(resp)
  652. }
  653. func ExampleRDS_DeleteOptionGroup() {
  654. svc := rds.New(nil)
  655. params := &rds.DeleteOptionGroupInput{
  656. OptionGroupName: aws.String("String"), // Required
  657. }
  658. resp, err := svc.DeleteOptionGroup(params)
  659. if err != nil {
  660. // Print the error, cast err to awserr.Error to get the Code and
  661. // Message from an error.
  662. fmt.Println(err.Error())
  663. return
  664. }
  665. // Pretty-print the response data.
  666. fmt.Println(resp)
  667. }
  668. func ExampleRDS_DescribeAccountAttributes() {
  669. svc := rds.New(nil)
  670. var params *rds.DescribeAccountAttributesInput
  671. resp, err := svc.DescribeAccountAttributes(params)
  672. if err != nil {
  673. // Print the error, cast err to awserr.Error to get the Code and
  674. // Message from an error.
  675. fmt.Println(err.Error())
  676. return
  677. }
  678. // Pretty-print the response data.
  679. fmt.Println(resp)
  680. }
  681. func ExampleRDS_DescribeCertificates() {
  682. svc := rds.New(nil)
  683. params := &rds.DescribeCertificatesInput{
  684. CertificateIdentifier: aws.String("String"),
  685. Filters: []*rds.Filter{
  686. { // Required
  687. Name: aws.String("String"), // Required
  688. Values: []*string{ // Required
  689. aws.String("String"), // Required
  690. // More values...
  691. },
  692. },
  693. // More values...
  694. },
  695. Marker: aws.String("String"),
  696. MaxRecords: aws.Int64(1),
  697. }
  698. resp, err := svc.DescribeCertificates(params)
  699. if err != nil {
  700. // Print the error, cast err to awserr.Error to get the Code and
  701. // Message from an error.
  702. fmt.Println(err.Error())
  703. return
  704. }
  705. // Pretty-print the response data.
  706. fmt.Println(resp)
  707. }
  708. func ExampleRDS_DescribeDBClusterParameterGroups() {
  709. svc := rds.New(nil)
  710. params := &rds.DescribeDBClusterParameterGroupsInput{
  711. DBClusterParameterGroupName: aws.String("String"),
  712. Filters: []*rds.Filter{
  713. { // Required
  714. Name: aws.String("String"), // Required
  715. Values: []*string{ // Required
  716. aws.String("String"), // Required
  717. // More values...
  718. },
  719. },
  720. // More values...
  721. },
  722. Marker: aws.String("String"),
  723. MaxRecords: aws.Int64(1),
  724. }
  725. resp, err := svc.DescribeDBClusterParameterGroups(params)
  726. if err != nil {
  727. // Print the error, cast err to awserr.Error to get the Code and
  728. // Message from an error.
  729. fmt.Println(err.Error())
  730. return
  731. }
  732. // Pretty-print the response data.
  733. fmt.Println(resp)
  734. }
  735. func ExampleRDS_DescribeDBClusterParameters() {
  736. svc := rds.New(nil)
  737. params := &rds.DescribeDBClusterParametersInput{
  738. DBClusterParameterGroupName: aws.String("String"), // Required
  739. Filters: []*rds.Filter{
  740. { // Required
  741. Name: aws.String("String"), // Required
  742. Values: []*string{ // Required
  743. aws.String("String"), // Required
  744. // More values...
  745. },
  746. },
  747. // More values...
  748. },
  749. Marker: aws.String("String"),
  750. MaxRecords: aws.Int64(1),
  751. Source: aws.String("String"),
  752. }
  753. resp, err := svc.DescribeDBClusterParameters(params)
  754. if err != nil {
  755. // Print the error, cast err to awserr.Error to get the Code and
  756. // Message from an error.
  757. fmt.Println(err.Error())
  758. return
  759. }
  760. // Pretty-print the response data.
  761. fmt.Println(resp)
  762. }
  763. func ExampleRDS_DescribeDBClusterSnapshots() {
  764. svc := rds.New(nil)
  765. params := &rds.DescribeDBClusterSnapshotsInput{
  766. DBClusterIdentifier: aws.String("String"),
  767. DBClusterSnapshotIdentifier: aws.String("String"),
  768. Filters: []*rds.Filter{
  769. { // Required
  770. Name: aws.String("String"), // Required
  771. Values: []*string{ // Required
  772. aws.String("String"), // Required
  773. // More values...
  774. },
  775. },
  776. // More values...
  777. },
  778. Marker: aws.String("String"),
  779. MaxRecords: aws.Int64(1),
  780. SnapshotType: aws.String("String"),
  781. }
  782. resp, err := svc.DescribeDBClusterSnapshots(params)
  783. if err != nil {
  784. // Print the error, cast err to awserr.Error to get the Code and
  785. // Message from an error.
  786. fmt.Println(err.Error())
  787. return
  788. }
  789. // Pretty-print the response data.
  790. fmt.Println(resp)
  791. }
  792. func ExampleRDS_DescribeDBClusters() {
  793. svc := rds.New(nil)
  794. params := &rds.DescribeDBClustersInput{
  795. DBClusterIdentifier: aws.String("String"),
  796. Filters: []*rds.Filter{
  797. { // Required
  798. Name: aws.String("String"), // Required
  799. Values: []*string{ // Required
  800. aws.String("String"), // Required
  801. // More values...
  802. },
  803. },
  804. // More values...
  805. },
  806. Marker: aws.String("String"),
  807. MaxRecords: aws.Int64(1),
  808. }
  809. resp, err := svc.DescribeDBClusters(params)
  810. if err != nil {
  811. // Print the error, cast err to awserr.Error to get the Code and
  812. // Message from an error.
  813. fmt.Println(err.Error())
  814. return
  815. }
  816. // Pretty-print the response data.
  817. fmt.Println(resp)
  818. }
  819. func ExampleRDS_DescribeDBEngineVersions() {
  820. svc := rds.New(nil)
  821. params := &rds.DescribeDBEngineVersionsInput{
  822. DBParameterGroupFamily: aws.String("String"),
  823. DefaultOnly: aws.Bool(true),
  824. Engine: aws.String("String"),
  825. EngineVersion: aws.String("String"),
  826. Filters: []*rds.Filter{
  827. { // Required
  828. Name: aws.String("String"), // Required
  829. Values: []*string{ // Required
  830. aws.String("String"), // Required
  831. // More values...
  832. },
  833. },
  834. // More values...
  835. },
  836. ListSupportedCharacterSets: aws.Bool(true),
  837. Marker: aws.String("String"),
  838. MaxRecords: aws.Int64(1),
  839. }
  840. resp, err := svc.DescribeDBEngineVersions(params)
  841. if err != nil {
  842. // Print the error, cast err to awserr.Error to get the Code and
  843. // Message from an error.
  844. fmt.Println(err.Error())
  845. return
  846. }
  847. // Pretty-print the response data.
  848. fmt.Println(resp)
  849. }
  850. func ExampleRDS_DescribeDBInstances() {
  851. svc := rds.New(nil)
  852. params := &rds.DescribeDBInstancesInput{
  853. DBInstanceIdentifier: aws.String("String"),
  854. Filters: []*rds.Filter{
  855. { // Required
  856. Name: aws.String("String"), // Required
  857. Values: []*string{ // Required
  858. aws.String("String"), // Required
  859. // More values...
  860. },
  861. },
  862. // More values...
  863. },
  864. Marker: aws.String("String"),
  865. MaxRecords: aws.Int64(1),
  866. }
  867. resp, err := svc.DescribeDBInstances(params)
  868. if err != nil {
  869. // Print the error, cast err to awserr.Error to get the Code and
  870. // Message from an error.
  871. fmt.Println(err.Error())
  872. return
  873. }
  874. // Pretty-print the response data.
  875. fmt.Println(resp)
  876. }
  877. func ExampleRDS_DescribeDBLogFiles() {
  878. svc := rds.New(nil)
  879. params := &rds.DescribeDBLogFilesInput{
  880. DBInstanceIdentifier: aws.String("String"), // Required
  881. FileLastWritten: aws.Int64(1),
  882. FileSize: aws.Int64(1),
  883. FilenameContains: aws.String("String"),
  884. Filters: []*rds.Filter{
  885. { // Required
  886. Name: aws.String("String"), // Required
  887. Values: []*string{ // Required
  888. aws.String("String"), // Required
  889. // More values...
  890. },
  891. },
  892. // More values...
  893. },
  894. Marker: aws.String("String"),
  895. MaxRecords: aws.Int64(1),
  896. }
  897. resp, err := svc.DescribeDBLogFiles(params)
  898. if err != nil {
  899. // Print the error, cast err to awserr.Error to get the Code and
  900. // Message from an error.
  901. fmt.Println(err.Error())
  902. return
  903. }
  904. // Pretty-print the response data.
  905. fmt.Println(resp)
  906. }
  907. func ExampleRDS_DescribeDBParameterGroups() {
  908. svc := rds.New(nil)
  909. params := &rds.DescribeDBParameterGroupsInput{
  910. DBParameterGroupName: aws.String("String"),
  911. Filters: []*rds.Filter{
  912. { // Required
  913. Name: aws.String("String"), // Required
  914. Values: []*string{ // Required
  915. aws.String("String"), // Required
  916. // More values...
  917. },
  918. },
  919. // More values...
  920. },
  921. Marker: aws.String("String"),
  922. MaxRecords: aws.Int64(1),
  923. }
  924. resp, err := svc.DescribeDBParameterGroups(params)
  925. if err != nil {
  926. // Print the error, cast err to awserr.Error to get the Code and
  927. // Message from an error.
  928. fmt.Println(err.Error())
  929. return
  930. }
  931. // Pretty-print the response data.
  932. fmt.Println(resp)
  933. }
  934. func ExampleRDS_DescribeDBParameters() {
  935. svc := rds.New(nil)
  936. params := &rds.DescribeDBParametersInput{
  937. DBParameterGroupName: aws.String("String"), // Required
  938. Filters: []*rds.Filter{
  939. { // Required
  940. Name: aws.String("String"), // Required
  941. Values: []*string{ // Required
  942. aws.String("String"), // Required
  943. // More values...
  944. },
  945. },
  946. // More values...
  947. },
  948. Marker: aws.String("String"),
  949. MaxRecords: aws.Int64(1),
  950. Source: aws.String("String"),
  951. }
  952. resp, err := svc.DescribeDBParameters(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 ExampleRDS_DescribeDBSecurityGroups() {
  963. svc := rds.New(nil)
  964. params := &rds.DescribeDBSecurityGroupsInput{
  965. DBSecurityGroupName: aws.String("String"),
  966. Filters: []*rds.Filter{
  967. { // Required
  968. Name: aws.String("String"), // Required
  969. Values: []*string{ // Required
  970. aws.String("String"), // Required
  971. // More values...
  972. },
  973. },
  974. // More values...
  975. },
  976. Marker: aws.String("String"),
  977. MaxRecords: aws.Int64(1),
  978. }
  979. resp, err := svc.DescribeDBSecurityGroups(params)
  980. if err != nil {
  981. // Print the error, cast err to awserr.Error to get the Code and
  982. // Message from an error.
  983. fmt.Println(err.Error())
  984. return
  985. }
  986. // Pretty-print the response data.
  987. fmt.Println(resp)
  988. }
  989. func ExampleRDS_DescribeDBSnapshots() {
  990. svc := rds.New(nil)
  991. params := &rds.DescribeDBSnapshotsInput{
  992. DBInstanceIdentifier: aws.String("String"),
  993. DBSnapshotIdentifier: aws.String("String"),
  994. Filters: []*rds.Filter{
  995. { // Required
  996. Name: aws.String("String"), // Required
  997. Values: []*string{ // Required
  998. aws.String("String"), // Required
  999. // More values...
  1000. },
  1001. },
  1002. // More values...
  1003. },
  1004. Marker: aws.String("String"),
  1005. MaxRecords: aws.Int64(1),
  1006. SnapshotType: aws.String("String"),
  1007. }
  1008. resp, err := svc.DescribeDBSnapshots(params)
  1009. if err != nil {
  1010. // Print the error, cast err to awserr.Error to get the Code and
  1011. // Message from an error.
  1012. fmt.Println(err.Error())
  1013. return
  1014. }
  1015. // Pretty-print the response data.
  1016. fmt.Println(resp)
  1017. }
  1018. func ExampleRDS_DescribeDBSubnetGroups() {
  1019. svc := rds.New(nil)
  1020. params := &rds.DescribeDBSubnetGroupsInput{
  1021. DBSubnetGroupName: aws.String("String"),
  1022. Filters: []*rds.Filter{
  1023. { // Required
  1024. Name: aws.String("String"), // Required
  1025. Values: []*string{ // Required
  1026. aws.String("String"), // Required
  1027. // More values...
  1028. },
  1029. },
  1030. // More values...
  1031. },
  1032. Marker: aws.String("String"),
  1033. MaxRecords: aws.Int64(1),
  1034. }
  1035. resp, err := svc.DescribeDBSubnetGroups(params)
  1036. if err != nil {
  1037. // Print the error, cast err to awserr.Error to get the Code and
  1038. // Message from an error.
  1039. fmt.Println(err.Error())
  1040. return
  1041. }
  1042. // Pretty-print the response data.
  1043. fmt.Println(resp)
  1044. }
  1045. func ExampleRDS_DescribeEngineDefaultClusterParameters() {
  1046. svc := rds.New(nil)
  1047. params := &rds.DescribeEngineDefaultClusterParametersInput{
  1048. DBParameterGroupFamily: aws.String("String"), // Required
  1049. Filters: []*rds.Filter{
  1050. { // Required
  1051. Name: aws.String("String"), // Required
  1052. Values: []*string{ // Required
  1053. aws.String("String"), // Required
  1054. // More values...
  1055. },
  1056. },
  1057. // More values...
  1058. },
  1059. Marker: aws.String("String"),
  1060. MaxRecords: aws.Int64(1),
  1061. }
  1062. resp, err := svc.DescribeEngineDefaultClusterParameters(params)
  1063. if err != nil {
  1064. // Print the error, cast err to awserr.Error to get the Code and
  1065. // Message from an error.
  1066. fmt.Println(err.Error())
  1067. return
  1068. }
  1069. // Pretty-print the response data.
  1070. fmt.Println(resp)
  1071. }
  1072. func ExampleRDS_DescribeEngineDefaultParameters() {
  1073. svc := rds.New(nil)
  1074. params := &rds.DescribeEngineDefaultParametersInput{
  1075. DBParameterGroupFamily: aws.String("String"), // Required
  1076. Filters: []*rds.Filter{
  1077. { // Required
  1078. Name: aws.String("String"), // Required
  1079. Values: []*string{ // Required
  1080. aws.String("String"), // Required
  1081. // More values...
  1082. },
  1083. },
  1084. // More values...
  1085. },
  1086. Marker: aws.String("String"),
  1087. MaxRecords: aws.Int64(1),
  1088. }
  1089. resp, err := svc.DescribeEngineDefaultParameters(params)
  1090. if err != nil {
  1091. // Print the error, cast err to awserr.Error to get the Code and
  1092. // Message from an error.
  1093. fmt.Println(err.Error())
  1094. return
  1095. }
  1096. // Pretty-print the response data.
  1097. fmt.Println(resp)
  1098. }
  1099. func ExampleRDS_DescribeEventCategories() {
  1100. svc := rds.New(nil)
  1101. params := &rds.DescribeEventCategoriesInput{
  1102. Filters: []*rds.Filter{
  1103. { // Required
  1104. Name: aws.String("String"), // Required
  1105. Values: []*string{ // Required
  1106. aws.String("String"), // Required
  1107. // More values...
  1108. },
  1109. },
  1110. // More values...
  1111. },
  1112. SourceType: aws.String("String"),
  1113. }
  1114. resp, err := svc.DescribeEventCategories(params)
  1115. if err != nil {
  1116. // Print the error, cast err to awserr.Error to get the Code and
  1117. // Message from an error.
  1118. fmt.Println(err.Error())
  1119. return
  1120. }
  1121. // Pretty-print the response data.
  1122. fmt.Println(resp)
  1123. }
  1124. func ExampleRDS_DescribeEventSubscriptions() {
  1125. svc := rds.New(nil)
  1126. params := &rds.DescribeEventSubscriptionsInput{
  1127. Filters: []*rds.Filter{
  1128. { // Required
  1129. Name: aws.String("String"), // Required
  1130. Values: []*string{ // Required
  1131. aws.String("String"), // Required
  1132. // More values...
  1133. },
  1134. },
  1135. // More values...
  1136. },
  1137. Marker: aws.String("String"),
  1138. MaxRecords: aws.Int64(1),
  1139. SubscriptionName: aws.String("String"),
  1140. }
  1141. resp, err := svc.DescribeEventSubscriptions(params)
  1142. if err != nil {
  1143. // Print the error, cast err to awserr.Error to get the Code and
  1144. // Message from an error.
  1145. fmt.Println(err.Error())
  1146. return
  1147. }
  1148. // Pretty-print the response data.
  1149. fmt.Println(resp)
  1150. }
  1151. func ExampleRDS_DescribeEvents() {
  1152. svc := rds.New(nil)
  1153. params := &rds.DescribeEventsInput{
  1154. Duration: aws.Int64(1),
  1155. EndTime: aws.Time(time.Now()),
  1156. EventCategories: []*string{
  1157. aws.String("String"), // Required
  1158. // More values...
  1159. },
  1160. Filters: []*rds.Filter{
  1161. { // Required
  1162. Name: aws.String("String"), // Required
  1163. Values: []*string{ // Required
  1164. aws.String("String"), // Required
  1165. // More values...
  1166. },
  1167. },
  1168. // More values...
  1169. },
  1170. Marker: aws.String("String"),
  1171. MaxRecords: aws.Int64(1),
  1172. SourceIdentifier: aws.String("String"),
  1173. SourceType: aws.String("SourceType"),
  1174. StartTime: aws.Time(time.Now()),
  1175. }
  1176. resp, err := svc.DescribeEvents(params)
  1177. if err != nil {
  1178. // Print the error, cast err to awserr.Error to get the Code and
  1179. // Message from an error.
  1180. fmt.Println(err.Error())
  1181. return
  1182. }
  1183. // Pretty-print the response data.
  1184. fmt.Println(resp)
  1185. }
  1186. func ExampleRDS_DescribeOptionGroupOptions() {
  1187. svc := rds.New(nil)
  1188. params := &rds.DescribeOptionGroupOptionsInput{
  1189. EngineName: aws.String("String"), // Required
  1190. Filters: []*rds.Filter{
  1191. { // Required
  1192. Name: aws.String("String"), // Required
  1193. Values: []*string{ // Required
  1194. aws.String("String"), // Required
  1195. // More values...
  1196. },
  1197. },
  1198. // More values...
  1199. },
  1200. MajorEngineVersion: aws.String("String"),
  1201. Marker: aws.String("String"),
  1202. MaxRecords: aws.Int64(1),
  1203. }
  1204. resp, err := svc.DescribeOptionGroupOptions(params)
  1205. if err != nil {
  1206. // Print the error, cast err to awserr.Error to get the Code and
  1207. // Message from an error.
  1208. fmt.Println(err.Error())
  1209. return
  1210. }
  1211. // Pretty-print the response data.
  1212. fmt.Println(resp)
  1213. }
  1214. func ExampleRDS_DescribeOptionGroups() {
  1215. svc := rds.New(nil)
  1216. params := &rds.DescribeOptionGroupsInput{
  1217. EngineName: aws.String("String"),
  1218. Filters: []*rds.Filter{
  1219. { // Required
  1220. Name: aws.String("String"), // Required
  1221. Values: []*string{ // Required
  1222. aws.String("String"), // Required
  1223. // More values...
  1224. },
  1225. },
  1226. // More values...
  1227. },
  1228. MajorEngineVersion: aws.String("String"),
  1229. Marker: aws.String("String"),
  1230. MaxRecords: aws.Int64(1),
  1231. OptionGroupName: aws.String("String"),
  1232. }
  1233. resp, err := svc.DescribeOptionGroups(params)
  1234. if err != nil {
  1235. // Print the error, cast err to awserr.Error to get the Code and
  1236. // Message from an error.
  1237. fmt.Println(err.Error())
  1238. return
  1239. }
  1240. // Pretty-print the response data.
  1241. fmt.Println(resp)
  1242. }
  1243. func ExampleRDS_DescribeOrderableDBInstanceOptions() {
  1244. svc := rds.New(nil)
  1245. params := &rds.DescribeOrderableDBInstanceOptionsInput{
  1246. Engine: aws.String("String"), // Required
  1247. DBInstanceClass: aws.String("String"),
  1248. EngineVersion: aws.String("String"),
  1249. Filters: []*rds.Filter{
  1250. { // Required
  1251. Name: aws.String("String"), // Required
  1252. Values: []*string{ // Required
  1253. aws.String("String"), // Required
  1254. // More values...
  1255. },
  1256. },
  1257. // More values...
  1258. },
  1259. LicenseModel: aws.String("String"),
  1260. Marker: aws.String("String"),
  1261. MaxRecords: aws.Int64(1),
  1262. Vpc: aws.Bool(true),
  1263. }
  1264. resp, err := svc.DescribeOrderableDBInstanceOptions(params)
  1265. if err != nil {
  1266. // Print the error, cast err to awserr.Error to get the Code and
  1267. // Message from an error.
  1268. fmt.Println(err.Error())
  1269. return
  1270. }
  1271. // Pretty-print the response data.
  1272. fmt.Println(resp)
  1273. }
  1274. func ExampleRDS_DescribePendingMaintenanceActions() {
  1275. svc := rds.New(nil)
  1276. params := &rds.DescribePendingMaintenanceActionsInput{
  1277. Filters: []*rds.Filter{
  1278. { // Required
  1279. Name: aws.String("String"), // Required
  1280. Values: []*string{ // Required
  1281. aws.String("String"), // Required
  1282. // More values...
  1283. },
  1284. },
  1285. // More values...
  1286. },
  1287. Marker: aws.String("String"),
  1288. MaxRecords: aws.Int64(1),
  1289. ResourceIdentifier: aws.String("String"),
  1290. }
  1291. resp, err := svc.DescribePendingMaintenanceActions(params)
  1292. if err != nil {
  1293. // Print the error, cast err to awserr.Error to get the Code and
  1294. // Message from an error.
  1295. fmt.Println(err.Error())
  1296. return
  1297. }
  1298. // Pretty-print the response data.
  1299. fmt.Println(resp)
  1300. }
  1301. func ExampleRDS_DescribeReservedDBInstances() {
  1302. svc := rds.New(nil)
  1303. params := &rds.DescribeReservedDBInstancesInput{
  1304. DBInstanceClass: aws.String("String"),
  1305. Duration: aws.String("String"),
  1306. Filters: []*rds.Filter{
  1307. { // Required
  1308. Name: aws.String("String"), // Required
  1309. Values: []*string{ // Required
  1310. aws.String("String"), // Required
  1311. // More values...
  1312. },
  1313. },
  1314. // More values...
  1315. },
  1316. Marker: aws.String("String"),
  1317. MaxRecords: aws.Int64(1),
  1318. MultiAZ: aws.Bool(true),
  1319. OfferingType: aws.String("String"),
  1320. ProductDescription: aws.String("String"),
  1321. ReservedDBInstanceId: aws.String("String"),
  1322. ReservedDBInstancesOfferingId: aws.String("String"),
  1323. }
  1324. resp, err := svc.DescribeReservedDBInstances(params)
  1325. if err != nil {
  1326. // Print the error, cast err to awserr.Error to get the Code and
  1327. // Message from an error.
  1328. fmt.Println(err.Error())
  1329. return
  1330. }
  1331. // Pretty-print the response data.
  1332. fmt.Println(resp)
  1333. }
  1334. func ExampleRDS_DescribeReservedDBInstancesOfferings() {
  1335. svc := rds.New(nil)
  1336. params := &rds.DescribeReservedDBInstancesOfferingsInput{
  1337. DBInstanceClass: aws.String("String"),
  1338. Duration: aws.String("String"),
  1339. Filters: []*rds.Filter{
  1340. { // Required
  1341. Name: aws.String("String"), // Required
  1342. Values: []*string{ // Required
  1343. aws.String("String"), // Required
  1344. // More values...
  1345. },
  1346. },
  1347. // More values...
  1348. },
  1349. Marker: aws.String("String"),
  1350. MaxRecords: aws.Int64(1),
  1351. MultiAZ: aws.Bool(true),
  1352. OfferingType: aws.String("String"),
  1353. ProductDescription: aws.String("String"),
  1354. ReservedDBInstancesOfferingId: aws.String("String"),
  1355. }
  1356. resp, err := svc.DescribeReservedDBInstancesOfferings(params)
  1357. if err != nil {
  1358. // Print the error, cast err to awserr.Error to get the Code and
  1359. // Message from an error.
  1360. fmt.Println(err.Error())
  1361. return
  1362. }
  1363. // Pretty-print the response data.
  1364. fmt.Println(resp)
  1365. }
  1366. func ExampleRDS_DownloadDBLogFilePortion() {
  1367. svc := rds.New(nil)
  1368. params := &rds.DownloadDBLogFilePortionInput{
  1369. DBInstanceIdentifier: aws.String("String"), // Required
  1370. LogFileName: aws.String("String"), // Required
  1371. Marker: aws.String("String"),
  1372. NumberOfLines: aws.Int64(1),
  1373. }
  1374. resp, err := svc.DownloadDBLogFilePortion(params)
  1375. if err != nil {
  1376. // Print the error, cast err to awserr.Error to get the Code and
  1377. // Message from an error.
  1378. fmt.Println(err.Error())
  1379. return
  1380. }
  1381. // Pretty-print the response data.
  1382. fmt.Println(resp)
  1383. }
  1384. func ExampleRDS_FailoverDBCluster() {
  1385. svc := rds.New(nil)
  1386. params := &rds.FailoverDBClusterInput{
  1387. DBClusterIdentifier: aws.String("String"),
  1388. }
  1389. resp, err := svc.FailoverDBCluster(params)
  1390. if err != nil {
  1391. // Print the error, cast err to awserr.Error to get the Code and
  1392. // Message from an error.
  1393. fmt.Println(err.Error())
  1394. return
  1395. }
  1396. // Pretty-print the response data.
  1397. fmt.Println(resp)
  1398. }
  1399. func ExampleRDS_ListTagsForResource() {
  1400. svc := rds.New(nil)
  1401. params := &rds.ListTagsForResourceInput{
  1402. ResourceName: aws.String("String"), // Required
  1403. Filters: []*rds.Filter{
  1404. { // Required
  1405. Name: aws.String("String"), // Required
  1406. Values: []*string{ // Required
  1407. aws.String("String"), // Required
  1408. // More values...
  1409. },
  1410. },
  1411. // More values...
  1412. },
  1413. }
  1414. resp, err := svc.ListTagsForResource(params)
  1415. if err != nil {
  1416. // Print the error, cast err to awserr.Error to get the Code and
  1417. // Message from an error.
  1418. fmt.Println(err.Error())
  1419. return
  1420. }
  1421. // Pretty-print the response data.
  1422. fmt.Println(resp)
  1423. }
  1424. func ExampleRDS_ModifyDBCluster() {
  1425. svc := rds.New(nil)
  1426. params := &rds.ModifyDBClusterInput{
  1427. ApplyImmediately: aws.Bool(true),
  1428. BackupRetentionPeriod: aws.Int64(1),
  1429. DBClusterIdentifier: aws.String("String"),
  1430. DBClusterParameterGroupName: aws.String("String"),
  1431. MasterUserPassword: aws.String("String"),
  1432. NewDBClusterIdentifier: aws.String("String"),
  1433. OptionGroupName: aws.String("String"),
  1434. Port: aws.Int64(1),
  1435. PreferredBackupWindow: aws.String("String"),
  1436. PreferredMaintenanceWindow: aws.String("String"),
  1437. VpcSecurityGroupIds: []*string{
  1438. aws.String("String"), // Required
  1439. // More values...
  1440. },
  1441. }
  1442. resp, err := svc.ModifyDBCluster(params)
  1443. if err != nil {
  1444. // Print the error, cast err to awserr.Error to get the Code and
  1445. // Message from an error.
  1446. fmt.Println(err.Error())
  1447. return
  1448. }
  1449. // Pretty-print the response data.
  1450. fmt.Println(resp)
  1451. }
  1452. func ExampleRDS_ModifyDBClusterParameterGroup() {
  1453. svc := rds.New(nil)
  1454. params := &rds.ModifyDBClusterParameterGroupInput{
  1455. DBClusterParameterGroupName: aws.String("String"), // Required
  1456. Parameters: []*rds.Parameter{ // Required
  1457. { // Required
  1458. AllowedValues: aws.String("String"),
  1459. ApplyMethod: aws.String("ApplyMethod"),
  1460. ApplyType: aws.String("String"),
  1461. DataType: aws.String("String"),
  1462. Description: aws.String("String"),
  1463. IsModifiable: aws.Bool(true),
  1464. MinimumEngineVersion: aws.String("String"),
  1465. ParameterName: aws.String("String"),
  1466. ParameterValue: aws.String("String"),
  1467. Source: aws.String("String"),
  1468. },
  1469. // More values...
  1470. },
  1471. }
  1472. resp, err := svc.ModifyDBClusterParameterGroup(params)
  1473. if err != nil {
  1474. // Print the error, cast err to awserr.Error to get the Code and
  1475. // Message from an error.
  1476. fmt.Println(err.Error())
  1477. return
  1478. }
  1479. // Pretty-print the response data.
  1480. fmt.Println(resp)
  1481. }
  1482. func ExampleRDS_ModifyDBInstance() {
  1483. svc := rds.New(nil)
  1484. params := &rds.ModifyDBInstanceInput{
  1485. DBInstanceIdentifier: aws.String("String"), // Required
  1486. AllocatedStorage: aws.Int64(1),
  1487. AllowMajorVersionUpgrade: aws.Bool(true),
  1488. ApplyImmediately: aws.Bool(true),
  1489. AutoMinorVersionUpgrade: aws.Bool(true),
  1490. BackupRetentionPeriod: aws.Int64(1),
  1491. CACertificateIdentifier: aws.String("String"),
  1492. DBInstanceClass: aws.String("String"),
  1493. DBParameterGroupName: aws.String("String"),
  1494. DBSecurityGroups: []*string{
  1495. aws.String("String"), // Required
  1496. // More values...
  1497. },
  1498. EngineVersion: aws.String("String"),
  1499. Iops: aws.Int64(1),
  1500. MasterUserPassword: aws.String("String"),
  1501. MultiAZ: aws.Bool(true),
  1502. NewDBInstanceIdentifier: aws.String("String"),
  1503. OptionGroupName: aws.String("String"),
  1504. PreferredBackupWindow: aws.String("String"),
  1505. PreferredMaintenanceWindow: aws.String("String"),
  1506. StorageType: aws.String("String"),
  1507. TdeCredentialArn: aws.String("String"),
  1508. TdeCredentialPassword: aws.String("String"),
  1509. VpcSecurityGroupIds: []*string{
  1510. aws.String("String"), // Required
  1511. // More values...
  1512. },
  1513. }
  1514. resp, err := svc.ModifyDBInstance(params)
  1515. if err != nil {
  1516. // Print the error, cast err to awserr.Error to get the Code and
  1517. // Message from an error.
  1518. fmt.Println(err.Error())
  1519. return
  1520. }
  1521. // Pretty-print the response data.
  1522. fmt.Println(resp)
  1523. }
  1524. func ExampleRDS_ModifyDBParameterGroup() {
  1525. svc := rds.New(nil)
  1526. params := &rds.ModifyDBParameterGroupInput{
  1527. DBParameterGroupName: aws.String("String"), // Required
  1528. Parameters: []*rds.Parameter{ // Required
  1529. { // Required
  1530. AllowedValues: aws.String("String"),
  1531. ApplyMethod: aws.String("ApplyMethod"),
  1532. ApplyType: aws.String("String"),
  1533. DataType: aws.String("String"),
  1534. Description: aws.String("String"),
  1535. IsModifiable: aws.Bool(true),
  1536. MinimumEngineVersion: aws.String("String"),
  1537. ParameterName: aws.String("String"),
  1538. ParameterValue: aws.String("String"),
  1539. Source: aws.String("String"),
  1540. },
  1541. // More values...
  1542. },
  1543. }
  1544. resp, err := svc.ModifyDBParameterGroup(params)
  1545. if err != nil {
  1546. // Print the error, cast err to awserr.Error to get the Code and
  1547. // Message from an error.
  1548. fmt.Println(err.Error())
  1549. return
  1550. }
  1551. // Pretty-print the response data.
  1552. fmt.Println(resp)
  1553. }
  1554. func ExampleRDS_ModifyDBSubnetGroup() {
  1555. svc := rds.New(nil)
  1556. params := &rds.ModifyDBSubnetGroupInput{
  1557. DBSubnetGroupName: aws.String("String"), // Required
  1558. SubnetIds: []*string{ // Required
  1559. aws.String("String"), // Required
  1560. // More values...
  1561. },
  1562. DBSubnetGroupDescription: aws.String("String"),
  1563. }
  1564. resp, err := svc.ModifyDBSubnetGroup(params)
  1565. if err != nil {
  1566. // Print the error, cast err to awserr.Error to get the Code and
  1567. // Message from an error.
  1568. fmt.Println(err.Error())
  1569. return
  1570. }
  1571. // Pretty-print the response data.
  1572. fmt.Println(resp)
  1573. }
  1574. func ExampleRDS_ModifyEventSubscription() {
  1575. svc := rds.New(nil)
  1576. params := &rds.ModifyEventSubscriptionInput{
  1577. SubscriptionName: aws.String("String"), // Required
  1578. Enabled: aws.Bool(true),
  1579. EventCategories: []*string{
  1580. aws.String("String"), // Required
  1581. // More values...
  1582. },
  1583. SnsTopicArn: aws.String("String"),
  1584. SourceType: aws.String("String"),
  1585. }
  1586. resp, err := svc.ModifyEventSubscription(params)
  1587. if err != nil {
  1588. // Print the error, cast err to awserr.Error to get the Code and
  1589. // Message from an error.
  1590. fmt.Println(err.Error())
  1591. return
  1592. }
  1593. // Pretty-print the response data.
  1594. fmt.Println(resp)
  1595. }
  1596. func ExampleRDS_ModifyOptionGroup() {
  1597. svc := rds.New(nil)
  1598. params := &rds.ModifyOptionGroupInput{
  1599. OptionGroupName: aws.String("String"), // Required
  1600. ApplyImmediately: aws.Bool(true),
  1601. OptionsToInclude: []*rds.OptionConfiguration{
  1602. { // Required
  1603. OptionName: aws.String("String"), // Required
  1604. DBSecurityGroupMemberships: []*string{
  1605. aws.String("String"), // Required
  1606. // More values...
  1607. },
  1608. OptionSettings: []*rds.OptionSetting{
  1609. { // Required
  1610. AllowedValues: aws.String("String"),
  1611. ApplyType: aws.String("String"),
  1612. DataType: aws.String("String"),
  1613. DefaultValue: aws.String("String"),
  1614. Description: aws.String("String"),
  1615. IsCollection: aws.Bool(true),
  1616. IsModifiable: aws.Bool(true),
  1617. Name: aws.String("String"),
  1618. Value: aws.String("String"),
  1619. },
  1620. // More values...
  1621. },
  1622. Port: aws.Int64(1),
  1623. VpcSecurityGroupMemberships: []*string{
  1624. aws.String("String"), // Required
  1625. // More values...
  1626. },
  1627. },
  1628. // More values...
  1629. },
  1630. OptionsToRemove: []*string{
  1631. aws.String("String"), // Required
  1632. // More values...
  1633. },
  1634. }
  1635. resp, err := svc.ModifyOptionGroup(params)
  1636. if err != nil {
  1637. // Print the error, cast err to awserr.Error to get the Code and
  1638. // Message from an error.
  1639. fmt.Println(err.Error())
  1640. return
  1641. }
  1642. // Pretty-print the response data.
  1643. fmt.Println(resp)
  1644. }
  1645. func ExampleRDS_PromoteReadReplica() {
  1646. svc := rds.New(nil)
  1647. params := &rds.PromoteReadReplicaInput{
  1648. DBInstanceIdentifier: aws.String("String"), // Required
  1649. BackupRetentionPeriod: aws.Int64(1),
  1650. PreferredBackupWindow: aws.String("String"),
  1651. }
  1652. resp, err := svc.PromoteReadReplica(params)
  1653. if err != nil {
  1654. // Print the error, cast err to awserr.Error to get the Code and
  1655. // Message from an error.
  1656. fmt.Println(err.Error())
  1657. return
  1658. }
  1659. // Pretty-print the response data.
  1660. fmt.Println(resp)
  1661. }
  1662. func ExampleRDS_PurchaseReservedDBInstancesOffering() {
  1663. svc := rds.New(nil)
  1664. params := &rds.PurchaseReservedDBInstancesOfferingInput{
  1665. ReservedDBInstancesOfferingId: aws.String("String"), // Required
  1666. DBInstanceCount: aws.Int64(1),
  1667. ReservedDBInstanceId: aws.String("String"),
  1668. Tags: []*rds.Tag{
  1669. { // Required
  1670. Key: aws.String("String"),
  1671. Value: aws.String("String"),
  1672. },
  1673. // More values...
  1674. },
  1675. }
  1676. resp, err := svc.PurchaseReservedDBInstancesOffering(params)
  1677. if err != nil {
  1678. // Print the error, cast err to awserr.Error to get the Code and
  1679. // Message from an error.
  1680. fmt.Println(err.Error())
  1681. return
  1682. }
  1683. // Pretty-print the response data.
  1684. fmt.Println(resp)
  1685. }
  1686. func ExampleRDS_RebootDBInstance() {
  1687. svc := rds.New(nil)
  1688. params := &rds.RebootDBInstanceInput{
  1689. DBInstanceIdentifier: aws.String("String"), // Required
  1690. ForceFailover: aws.Bool(true),
  1691. }
  1692. resp, err := svc.RebootDBInstance(params)
  1693. if err != nil {
  1694. // Print the error, cast err to awserr.Error to get the Code and
  1695. // Message from an error.
  1696. fmt.Println(err.Error())
  1697. return
  1698. }
  1699. // Pretty-print the response data.
  1700. fmt.Println(resp)
  1701. }
  1702. func ExampleRDS_RemoveSourceIdentifierFromSubscription() {
  1703. svc := rds.New(nil)
  1704. params := &rds.RemoveSourceIdentifierFromSubscriptionInput{
  1705. SourceIdentifier: aws.String("String"), // Required
  1706. SubscriptionName: aws.String("String"), // Required
  1707. }
  1708. resp, err := svc.RemoveSourceIdentifierFromSubscription(params)
  1709. if err != nil {
  1710. // Print the error, cast err to awserr.Error to get the Code and
  1711. // Message from an error.
  1712. fmt.Println(err.Error())
  1713. return
  1714. }
  1715. // Pretty-print the response data.
  1716. fmt.Println(resp)
  1717. }
  1718. func ExampleRDS_RemoveTagsFromResource() {
  1719. svc := rds.New(nil)
  1720. params := &rds.RemoveTagsFromResourceInput{
  1721. ResourceName: aws.String("String"), // Required
  1722. TagKeys: []*string{ // Required
  1723. aws.String("String"), // Required
  1724. // More values...
  1725. },
  1726. }
  1727. resp, err := svc.RemoveTagsFromResource(params)
  1728. if err != nil {
  1729. // Print the error, cast err to awserr.Error to get the Code and
  1730. // Message from an error.
  1731. fmt.Println(err.Error())
  1732. return
  1733. }
  1734. // Pretty-print the response data.
  1735. fmt.Println(resp)
  1736. }
  1737. func ExampleRDS_ResetDBClusterParameterGroup() {
  1738. svc := rds.New(nil)
  1739. params := &rds.ResetDBClusterParameterGroupInput{
  1740. DBClusterParameterGroupName: aws.String("String"), // Required
  1741. Parameters: []*rds.Parameter{
  1742. { // Required
  1743. AllowedValues: aws.String("String"),
  1744. ApplyMethod: aws.String("ApplyMethod"),
  1745. ApplyType: aws.String("String"),
  1746. DataType: aws.String("String"),
  1747. Description: aws.String("String"),
  1748. IsModifiable: aws.Bool(true),
  1749. MinimumEngineVersion: aws.String("String"),
  1750. ParameterName: aws.String("String"),
  1751. ParameterValue: aws.String("String"),
  1752. Source: aws.String("String"),
  1753. },
  1754. // More values...
  1755. },
  1756. ResetAllParameters: aws.Bool(true),
  1757. }
  1758. resp, err := svc.ResetDBClusterParameterGroup(params)
  1759. if err != nil {
  1760. // Print the error, cast err to awserr.Error to get the Code and
  1761. // Message from an error.
  1762. fmt.Println(err.Error())
  1763. return
  1764. }
  1765. // Pretty-print the response data.
  1766. fmt.Println(resp)
  1767. }
  1768. func ExampleRDS_ResetDBParameterGroup() {
  1769. svc := rds.New(nil)
  1770. params := &rds.ResetDBParameterGroupInput{
  1771. DBParameterGroupName: aws.String("String"), // Required
  1772. Parameters: []*rds.Parameter{
  1773. { // Required
  1774. AllowedValues: aws.String("String"),
  1775. ApplyMethod: aws.String("ApplyMethod"),
  1776. ApplyType: aws.String("String"),
  1777. DataType: aws.String("String"),
  1778. Description: aws.String("String"),
  1779. IsModifiable: aws.Bool(true),
  1780. MinimumEngineVersion: aws.String("String"),
  1781. ParameterName: aws.String("String"),
  1782. ParameterValue: aws.String("String"),
  1783. Source: aws.String("String"),
  1784. },
  1785. // More values...
  1786. },
  1787. ResetAllParameters: aws.Bool(true),
  1788. }
  1789. resp, err := svc.ResetDBParameterGroup(params)
  1790. if err != nil {
  1791. // Print the error, cast err to awserr.Error to get the Code and
  1792. // Message from an error.
  1793. fmt.Println(err.Error())
  1794. return
  1795. }
  1796. // Pretty-print the response data.
  1797. fmt.Println(resp)
  1798. }
  1799. func ExampleRDS_RestoreDBClusterFromSnapshot() {
  1800. svc := rds.New(nil)
  1801. params := &rds.RestoreDBClusterFromSnapshotInput{
  1802. DBClusterIdentifier: aws.String("String"), // Required
  1803. Engine: aws.String("String"), // Required
  1804. SnapshotIdentifier: aws.String("String"), // Required
  1805. AvailabilityZones: []*string{
  1806. aws.String("String"), // Required
  1807. // More values...
  1808. },
  1809. DBSubnetGroupName: aws.String("String"),
  1810. DatabaseName: aws.String("String"),
  1811. EngineVersion: aws.String("String"),
  1812. OptionGroupName: aws.String("String"),
  1813. Port: aws.Int64(1),
  1814. Tags: []*rds.Tag{
  1815. { // Required
  1816. Key: aws.String("String"),
  1817. Value: aws.String("String"),
  1818. },
  1819. // More values...
  1820. },
  1821. VpcSecurityGroupIds: []*string{
  1822. aws.String("String"), // Required
  1823. // More values...
  1824. },
  1825. }
  1826. resp, err := svc.RestoreDBClusterFromSnapshot(params)
  1827. if err != nil {
  1828. // Print the error, cast err to awserr.Error to get the Code and
  1829. // Message from an error.
  1830. fmt.Println(err.Error())
  1831. return
  1832. }
  1833. // Pretty-print the response data.
  1834. fmt.Println(resp)
  1835. }
  1836. func ExampleRDS_RestoreDBClusterToPointInTime() {
  1837. svc := rds.New(nil)
  1838. params := &rds.RestoreDBClusterToPointInTimeInput{
  1839. DBClusterIdentifier: aws.String("String"), // Required
  1840. SourceDBClusterIdentifier: aws.String("String"), // Required
  1841. DBSubnetGroupName: aws.String("String"),
  1842. OptionGroupName: aws.String("String"),
  1843. Port: aws.Int64(1),
  1844. RestoreToTime: aws.Time(time.Now()),
  1845. Tags: []*rds.Tag{
  1846. { // Required
  1847. Key: aws.String("String"),
  1848. Value: aws.String("String"),
  1849. },
  1850. // More values...
  1851. },
  1852. UseLatestRestorableTime: aws.Bool(true),
  1853. VpcSecurityGroupIds: []*string{
  1854. aws.String("String"), // Required
  1855. // More values...
  1856. },
  1857. }
  1858. resp, err := svc.RestoreDBClusterToPointInTime(params)
  1859. if err != nil {
  1860. // Print the error, cast err to awserr.Error to get the Code and
  1861. // Message from an error.
  1862. fmt.Println(err.Error())
  1863. return
  1864. }
  1865. // Pretty-print the response data.
  1866. fmt.Println(resp)
  1867. }
  1868. func ExampleRDS_RestoreDBInstanceFromDBSnapshot() {
  1869. svc := rds.New(nil)
  1870. params := &rds.RestoreDBInstanceFromDBSnapshotInput{
  1871. DBInstanceIdentifier: aws.String("String"), // Required
  1872. DBSnapshotIdentifier: aws.String("String"), // Required
  1873. AutoMinorVersionUpgrade: aws.Bool(true),
  1874. AvailabilityZone: aws.String("String"),
  1875. DBInstanceClass: aws.String("String"),
  1876. DBName: aws.String("String"),
  1877. DBSubnetGroupName: aws.String("String"),
  1878. Engine: aws.String("String"),
  1879. Iops: aws.Int64(1),
  1880. LicenseModel: aws.String("String"),
  1881. MultiAZ: aws.Bool(true),
  1882. OptionGroupName: aws.String("String"),
  1883. Port: aws.Int64(1),
  1884. PubliclyAccessible: aws.Bool(true),
  1885. StorageType: aws.String("String"),
  1886. Tags: []*rds.Tag{
  1887. { // Required
  1888. Key: aws.String("String"),
  1889. Value: aws.String("String"),
  1890. },
  1891. // More values...
  1892. },
  1893. TdeCredentialArn: aws.String("String"),
  1894. TdeCredentialPassword: aws.String("String"),
  1895. }
  1896. resp, err := svc.RestoreDBInstanceFromDBSnapshot(params)
  1897. if err != nil {
  1898. // Print the error, cast err to awserr.Error to get the Code and
  1899. // Message from an error.
  1900. fmt.Println(err.Error())
  1901. return
  1902. }
  1903. // Pretty-print the response data.
  1904. fmt.Println(resp)
  1905. }
  1906. func ExampleRDS_RestoreDBInstanceToPointInTime() {
  1907. svc := rds.New(nil)
  1908. params := &rds.RestoreDBInstanceToPointInTimeInput{
  1909. SourceDBInstanceIdentifier: aws.String("String"), // Required
  1910. TargetDBInstanceIdentifier: aws.String("String"), // Required
  1911. AutoMinorVersionUpgrade: aws.Bool(true),
  1912. AvailabilityZone: aws.String("String"),
  1913. DBInstanceClass: aws.String("String"),
  1914. DBName: aws.String("String"),
  1915. DBSubnetGroupName: aws.String("String"),
  1916. Engine: aws.String("String"),
  1917. Iops: aws.Int64(1),
  1918. LicenseModel: aws.String("String"),
  1919. MultiAZ: aws.Bool(true),
  1920. OptionGroupName: aws.String("String"),
  1921. Port: aws.Int64(1),
  1922. PubliclyAccessible: aws.Bool(true),
  1923. RestoreTime: aws.Time(time.Now()),
  1924. StorageType: aws.String("String"),
  1925. Tags: []*rds.Tag{
  1926. { // Required
  1927. Key: aws.String("String"),
  1928. Value: aws.String("String"),
  1929. },
  1930. // More values...
  1931. },
  1932. TdeCredentialArn: aws.String("String"),
  1933. TdeCredentialPassword: aws.String("String"),
  1934. UseLatestRestorableTime: aws.Bool(true),
  1935. }
  1936. resp, err := svc.RestoreDBInstanceToPointInTime(params)
  1937. if err != nil {
  1938. // Print the error, cast err to awserr.Error to get the Code and
  1939. // Message from an error.
  1940. fmt.Println(err.Error())
  1941. return
  1942. }
  1943. // Pretty-print the response data.
  1944. fmt.Println(resp)
  1945. }
  1946. func ExampleRDS_RevokeDBSecurityGroupIngress() {
  1947. svc := rds.New(nil)
  1948. params := &rds.RevokeDBSecurityGroupIngressInput{
  1949. DBSecurityGroupName: aws.String("String"), // Required
  1950. CIDRIP: aws.String("String"),
  1951. EC2SecurityGroupId: aws.String("String"),
  1952. EC2SecurityGroupName: aws.String("String"),
  1953. EC2SecurityGroupOwnerId: aws.String("String"),
  1954. }
  1955. resp, err := svc.RevokeDBSecurityGroupIngress(params)
  1956. if err != nil {
  1957. // Print the error, cast err to awserr.Error to get the Code and
  1958. // Message from an error.
  1959. fmt.Println(err.Error())
  1960. return
  1961. }
  1962. // Pretty-print the response data.
  1963. fmt.Println(resp)
  1964. }