examples_test.go 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004
  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/aws/session"
  9. "github.com/aws/aws-sdk-go/service/rds"
  10. )
  11. var _ time.Duration
  12. var _ bytes.Buffer
  13. func ExampleRDS_AddSourceIdentifierToSubscription() {
  14. sess, err := session.NewSession()
  15. if err != nil {
  16. fmt.Println("failed to create session,", err)
  17. return
  18. }
  19. svc := rds.New(sess)
  20. params := &rds.AddSourceIdentifierToSubscriptionInput{
  21. SourceIdentifier: aws.String("String"), // Required
  22. SubscriptionName: aws.String("String"), // Required
  23. }
  24. resp, err := svc.AddSourceIdentifierToSubscription(params)
  25. if err != nil {
  26. // Print the error, cast err to awserr.Error to get the Code and
  27. // Message from an error.
  28. fmt.Println(err.Error())
  29. return
  30. }
  31. // Pretty-print the response data.
  32. fmt.Println(resp)
  33. }
  34. func ExampleRDS_AddTagsToResource() {
  35. sess, err := session.NewSession()
  36. if err != nil {
  37. fmt.Println("failed to create session,", err)
  38. return
  39. }
  40. svc := rds.New(sess)
  41. params := &rds.AddTagsToResourceInput{
  42. ResourceName: aws.String("String"), // Required
  43. Tags: []*rds.Tag{ // Required
  44. { // Required
  45. Key: aws.String("String"),
  46. Value: aws.String("String"),
  47. },
  48. // More values...
  49. },
  50. }
  51. resp, err := svc.AddTagsToResource(params)
  52. if err != nil {
  53. // Print the error, cast err to awserr.Error to get the Code and
  54. // Message from an error.
  55. fmt.Println(err.Error())
  56. return
  57. }
  58. // Pretty-print the response data.
  59. fmt.Println(resp)
  60. }
  61. func ExampleRDS_ApplyPendingMaintenanceAction() {
  62. sess, err := session.NewSession()
  63. if err != nil {
  64. fmt.Println("failed to create session,", err)
  65. return
  66. }
  67. svc := rds.New(sess)
  68. params := &rds.ApplyPendingMaintenanceActionInput{
  69. ApplyAction: aws.String("String"), // Required
  70. OptInType: aws.String("String"), // Required
  71. ResourceIdentifier: aws.String("String"), // Required
  72. }
  73. resp, err := svc.ApplyPendingMaintenanceAction(params)
  74. if err != nil {
  75. // Print the error, cast err to awserr.Error to get the Code and
  76. // Message from an error.
  77. fmt.Println(err.Error())
  78. return
  79. }
  80. // Pretty-print the response data.
  81. fmt.Println(resp)
  82. }
  83. func ExampleRDS_AuthorizeDBSecurityGroupIngress() {
  84. sess, err := session.NewSession()
  85. if err != nil {
  86. fmt.Println("failed to create session,", err)
  87. return
  88. }
  89. svc := rds.New(sess)
  90. params := &rds.AuthorizeDBSecurityGroupIngressInput{
  91. DBSecurityGroupName: aws.String("String"), // Required
  92. CIDRIP: aws.String("String"),
  93. EC2SecurityGroupId: aws.String("String"),
  94. EC2SecurityGroupName: aws.String("String"),
  95. EC2SecurityGroupOwnerId: aws.String("String"),
  96. }
  97. resp, err := svc.AuthorizeDBSecurityGroupIngress(params)
  98. if err != nil {
  99. // Print the error, cast err to awserr.Error to get the Code and
  100. // Message from an error.
  101. fmt.Println(err.Error())
  102. return
  103. }
  104. // Pretty-print the response data.
  105. fmt.Println(resp)
  106. }
  107. func ExampleRDS_CopyDBClusterParameterGroup() {
  108. sess, err := session.NewSession()
  109. if err != nil {
  110. fmt.Println("failed to create session,", err)
  111. return
  112. }
  113. svc := rds.New(sess)
  114. params := &rds.CopyDBClusterParameterGroupInput{
  115. SourceDBClusterParameterGroupIdentifier: aws.String("String"), // Required
  116. TargetDBClusterParameterGroupDescription: aws.String("String"), // Required
  117. TargetDBClusterParameterGroupIdentifier: aws.String("String"), // Required
  118. Tags: []*rds.Tag{
  119. { // Required
  120. Key: aws.String("String"),
  121. Value: aws.String("String"),
  122. },
  123. // More values...
  124. },
  125. }
  126. resp, err := svc.CopyDBClusterParameterGroup(params)
  127. if err != nil {
  128. // Print the error, cast err to awserr.Error to get the Code and
  129. // Message from an error.
  130. fmt.Println(err.Error())
  131. return
  132. }
  133. // Pretty-print the response data.
  134. fmt.Println(resp)
  135. }
  136. func ExampleRDS_CopyDBClusterSnapshot() {
  137. sess, err := session.NewSession()
  138. if err != nil {
  139. fmt.Println("failed to create session,", err)
  140. return
  141. }
  142. svc := rds.New(sess)
  143. params := &rds.CopyDBClusterSnapshotInput{
  144. SourceDBClusterSnapshotIdentifier: aws.String("String"), // Required
  145. TargetDBClusterSnapshotIdentifier: aws.String("String"), // Required
  146. Tags: []*rds.Tag{
  147. { // Required
  148. Key: aws.String("String"),
  149. Value: aws.String("String"),
  150. },
  151. // More values...
  152. },
  153. }
  154. resp, err := svc.CopyDBClusterSnapshot(params)
  155. if err != nil {
  156. // Print the error, cast err to awserr.Error to get the Code and
  157. // Message from an error.
  158. fmt.Println(err.Error())
  159. return
  160. }
  161. // Pretty-print the response data.
  162. fmt.Println(resp)
  163. }
  164. func ExampleRDS_CopyDBParameterGroup() {
  165. sess, err := session.NewSession()
  166. if err != nil {
  167. fmt.Println("failed to create session,", err)
  168. return
  169. }
  170. svc := rds.New(sess)
  171. params := &rds.CopyDBParameterGroupInput{
  172. SourceDBParameterGroupIdentifier: aws.String("String"), // Required
  173. TargetDBParameterGroupDescription: aws.String("String"), // Required
  174. TargetDBParameterGroupIdentifier: aws.String("String"), // Required
  175. Tags: []*rds.Tag{
  176. { // Required
  177. Key: aws.String("String"),
  178. Value: aws.String("String"),
  179. },
  180. // More values...
  181. },
  182. }
  183. resp, err := svc.CopyDBParameterGroup(params)
  184. if err != nil {
  185. // Print the error, cast err to awserr.Error to get the Code and
  186. // Message from an error.
  187. fmt.Println(err.Error())
  188. return
  189. }
  190. // Pretty-print the response data.
  191. fmt.Println(resp)
  192. }
  193. func ExampleRDS_CopyDBSnapshot() {
  194. sess, err := session.NewSession()
  195. if err != nil {
  196. fmt.Println("failed to create session,", err)
  197. return
  198. }
  199. svc := rds.New(sess)
  200. params := &rds.CopyDBSnapshotInput{
  201. SourceDBSnapshotIdentifier: aws.String("String"), // Required
  202. TargetDBSnapshotIdentifier: aws.String("String"), // Required
  203. CopyTags: aws.Bool(true),
  204. KmsKeyId: aws.String("String"),
  205. Tags: []*rds.Tag{
  206. { // Required
  207. Key: aws.String("String"),
  208. Value: aws.String("String"),
  209. },
  210. // More values...
  211. },
  212. }
  213. resp, err := svc.CopyDBSnapshot(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_CopyOptionGroup() {
  224. sess, err := session.NewSession()
  225. if err != nil {
  226. fmt.Println("failed to create session,", err)
  227. return
  228. }
  229. svc := rds.New(sess)
  230. params := &rds.CopyOptionGroupInput{
  231. SourceOptionGroupIdentifier: aws.String("String"), // Required
  232. TargetOptionGroupDescription: aws.String("String"), // Required
  233. TargetOptionGroupIdentifier: aws.String("String"), // Required
  234. Tags: []*rds.Tag{
  235. { // Required
  236. Key: aws.String("String"),
  237. Value: aws.String("String"),
  238. },
  239. // More values...
  240. },
  241. }
  242. resp, err := svc.CopyOptionGroup(params)
  243. if err != nil {
  244. // Print the error, cast err to awserr.Error to get the Code and
  245. // Message from an error.
  246. fmt.Println(err.Error())
  247. return
  248. }
  249. // Pretty-print the response data.
  250. fmt.Println(resp)
  251. }
  252. func ExampleRDS_CreateDBCluster() {
  253. sess, err := session.NewSession()
  254. if err != nil {
  255. fmt.Println("failed to create session,", err)
  256. return
  257. }
  258. svc := rds.New(sess)
  259. params := &rds.CreateDBClusterInput{
  260. DBClusterIdentifier: aws.String("String"), // Required
  261. Engine: aws.String("String"), // Required
  262. AvailabilityZones: []*string{
  263. aws.String("String"), // Required
  264. // More values...
  265. },
  266. BackupRetentionPeriod: aws.Int64(1),
  267. CharacterSetName: aws.String("String"),
  268. DBClusterParameterGroupName: aws.String("String"),
  269. DBSubnetGroupName: aws.String("String"),
  270. DatabaseName: aws.String("String"),
  271. EngineVersion: aws.String("String"),
  272. KmsKeyId: aws.String("String"),
  273. MasterUserPassword: aws.String("String"),
  274. MasterUsername: aws.String("String"),
  275. OptionGroupName: aws.String("String"),
  276. Port: aws.Int64(1),
  277. PreferredBackupWindow: aws.String("String"),
  278. PreferredMaintenanceWindow: aws.String("String"),
  279. ReplicationSourceIdentifier: aws.String("String"),
  280. StorageEncrypted: aws.Bool(true),
  281. Tags: []*rds.Tag{
  282. { // Required
  283. Key: aws.String("String"),
  284. Value: aws.String("String"),
  285. },
  286. // More values...
  287. },
  288. VpcSecurityGroupIds: []*string{
  289. aws.String("String"), // Required
  290. // More values...
  291. },
  292. }
  293. resp, err := svc.CreateDBCluster(params)
  294. if err != nil {
  295. // Print the error, cast err to awserr.Error to get the Code and
  296. // Message from an error.
  297. fmt.Println(err.Error())
  298. return
  299. }
  300. // Pretty-print the response data.
  301. fmt.Println(resp)
  302. }
  303. func ExampleRDS_CreateDBClusterParameterGroup() {
  304. sess, err := session.NewSession()
  305. if err != nil {
  306. fmt.Println("failed to create session,", err)
  307. return
  308. }
  309. svc := rds.New(sess)
  310. params := &rds.CreateDBClusterParameterGroupInput{
  311. DBClusterParameterGroupName: aws.String("String"), // Required
  312. DBParameterGroupFamily: aws.String("String"), // Required
  313. Description: aws.String("String"), // Required
  314. Tags: []*rds.Tag{
  315. { // Required
  316. Key: aws.String("String"),
  317. Value: aws.String("String"),
  318. },
  319. // More values...
  320. },
  321. }
  322. resp, err := svc.CreateDBClusterParameterGroup(params)
  323. if err != nil {
  324. // Print the error, cast err to awserr.Error to get the Code and
  325. // Message from an error.
  326. fmt.Println(err.Error())
  327. return
  328. }
  329. // Pretty-print the response data.
  330. fmt.Println(resp)
  331. }
  332. func ExampleRDS_CreateDBClusterSnapshot() {
  333. sess, err := session.NewSession()
  334. if err != nil {
  335. fmt.Println("failed to create session,", err)
  336. return
  337. }
  338. svc := rds.New(sess)
  339. params := &rds.CreateDBClusterSnapshotInput{
  340. DBClusterIdentifier: aws.String("String"), // Required
  341. DBClusterSnapshotIdentifier: aws.String("String"), // Required
  342. Tags: []*rds.Tag{
  343. { // Required
  344. Key: aws.String("String"),
  345. Value: aws.String("String"),
  346. },
  347. // More values...
  348. },
  349. }
  350. resp, err := svc.CreateDBClusterSnapshot(params)
  351. if err != nil {
  352. // Print the error, cast err to awserr.Error to get the Code and
  353. // Message from an error.
  354. fmt.Println(err.Error())
  355. return
  356. }
  357. // Pretty-print the response data.
  358. fmt.Println(resp)
  359. }
  360. func ExampleRDS_CreateDBInstance() {
  361. sess, err := session.NewSession()
  362. if err != nil {
  363. fmt.Println("failed to create session,", err)
  364. return
  365. }
  366. svc := rds.New(sess)
  367. params := &rds.CreateDBInstanceInput{
  368. DBInstanceClass: aws.String("String"), // Required
  369. DBInstanceIdentifier: aws.String("String"), // Required
  370. Engine: aws.String("String"), // Required
  371. AllocatedStorage: aws.Int64(1),
  372. AutoMinorVersionUpgrade: aws.Bool(true),
  373. AvailabilityZone: aws.String("String"),
  374. BackupRetentionPeriod: aws.Int64(1),
  375. CharacterSetName: aws.String("String"),
  376. CopyTagsToSnapshot: aws.Bool(true),
  377. DBClusterIdentifier: aws.String("String"),
  378. DBName: aws.String("String"),
  379. DBParameterGroupName: aws.String("String"),
  380. DBSecurityGroups: []*string{
  381. aws.String("String"), // Required
  382. // More values...
  383. },
  384. DBSubnetGroupName: aws.String("String"),
  385. Domain: aws.String("String"),
  386. DomainIAMRoleName: aws.String("String"),
  387. EngineVersion: aws.String("String"),
  388. Iops: aws.Int64(1),
  389. KmsKeyId: aws.String("String"),
  390. LicenseModel: aws.String("String"),
  391. MasterUserPassword: aws.String("String"),
  392. MasterUsername: aws.String("String"),
  393. MonitoringInterval: aws.Int64(1),
  394. MonitoringRoleArn: aws.String("String"),
  395. MultiAZ: aws.Bool(true),
  396. OptionGroupName: aws.String("String"),
  397. Port: aws.Int64(1),
  398. PreferredBackupWindow: aws.String("String"),
  399. PreferredMaintenanceWindow: aws.String("String"),
  400. PromotionTier: aws.Int64(1),
  401. PubliclyAccessible: aws.Bool(true),
  402. StorageEncrypted: aws.Bool(true),
  403. StorageType: aws.String("String"),
  404. Tags: []*rds.Tag{
  405. { // Required
  406. Key: aws.String("String"),
  407. Value: aws.String("String"),
  408. },
  409. // More values...
  410. },
  411. TdeCredentialArn: aws.String("String"),
  412. TdeCredentialPassword: aws.String("String"),
  413. VpcSecurityGroupIds: []*string{
  414. aws.String("String"), // Required
  415. // More values...
  416. },
  417. }
  418. resp, err := svc.CreateDBInstance(params)
  419. if err != nil {
  420. // Print the error, cast err to awserr.Error to get the Code and
  421. // Message from an error.
  422. fmt.Println(err.Error())
  423. return
  424. }
  425. // Pretty-print the response data.
  426. fmt.Println(resp)
  427. }
  428. func ExampleRDS_CreateDBInstanceReadReplica() {
  429. sess, err := session.NewSession()
  430. if err != nil {
  431. fmt.Println("failed to create session,", err)
  432. return
  433. }
  434. svc := rds.New(sess)
  435. params := &rds.CreateDBInstanceReadReplicaInput{
  436. DBInstanceIdentifier: aws.String("String"), // Required
  437. SourceDBInstanceIdentifier: aws.String("String"), // Required
  438. AutoMinorVersionUpgrade: aws.Bool(true),
  439. AvailabilityZone: aws.String("String"),
  440. CopyTagsToSnapshot: aws.Bool(true),
  441. DBInstanceClass: aws.String("String"),
  442. DBSubnetGroupName: aws.String("String"),
  443. Iops: aws.Int64(1),
  444. MonitoringInterval: aws.Int64(1),
  445. MonitoringRoleArn: aws.String("String"),
  446. OptionGroupName: aws.String("String"),
  447. Port: aws.Int64(1),
  448. PubliclyAccessible: aws.Bool(true),
  449. StorageType: aws.String("String"),
  450. Tags: []*rds.Tag{
  451. { // Required
  452. Key: aws.String("String"),
  453. Value: aws.String("String"),
  454. },
  455. // More values...
  456. },
  457. }
  458. resp, err := svc.CreateDBInstanceReadReplica(params)
  459. if err != nil {
  460. // Print the error, cast err to awserr.Error to get the Code and
  461. // Message from an error.
  462. fmt.Println(err.Error())
  463. return
  464. }
  465. // Pretty-print the response data.
  466. fmt.Println(resp)
  467. }
  468. func ExampleRDS_CreateDBParameterGroup() {
  469. sess, err := session.NewSession()
  470. if err != nil {
  471. fmt.Println("failed to create session,", err)
  472. return
  473. }
  474. svc := rds.New(sess)
  475. params := &rds.CreateDBParameterGroupInput{
  476. DBParameterGroupFamily: aws.String("String"), // Required
  477. DBParameterGroupName: aws.String("String"), // Required
  478. Description: aws.String("String"), // Required
  479. Tags: []*rds.Tag{
  480. { // Required
  481. Key: aws.String("String"),
  482. Value: aws.String("String"),
  483. },
  484. // More values...
  485. },
  486. }
  487. resp, err := svc.CreateDBParameterGroup(params)
  488. if err != nil {
  489. // Print the error, cast err to awserr.Error to get the Code and
  490. // Message from an error.
  491. fmt.Println(err.Error())
  492. return
  493. }
  494. // Pretty-print the response data.
  495. fmt.Println(resp)
  496. }
  497. func ExampleRDS_CreateDBSecurityGroup() {
  498. sess, err := session.NewSession()
  499. if err != nil {
  500. fmt.Println("failed to create session,", err)
  501. return
  502. }
  503. svc := rds.New(sess)
  504. params := &rds.CreateDBSecurityGroupInput{
  505. DBSecurityGroupDescription: aws.String("String"), // Required
  506. DBSecurityGroupName: aws.String("String"), // Required
  507. Tags: []*rds.Tag{
  508. { // Required
  509. Key: aws.String("String"),
  510. Value: aws.String("String"),
  511. },
  512. // More values...
  513. },
  514. }
  515. resp, err := svc.CreateDBSecurityGroup(params)
  516. if err != nil {
  517. // Print the error, cast err to awserr.Error to get the Code and
  518. // Message from an error.
  519. fmt.Println(err.Error())
  520. return
  521. }
  522. // Pretty-print the response data.
  523. fmt.Println(resp)
  524. }
  525. func ExampleRDS_CreateDBSnapshot() {
  526. sess, err := session.NewSession()
  527. if err != nil {
  528. fmt.Println("failed to create session,", err)
  529. return
  530. }
  531. svc := rds.New(sess)
  532. params := &rds.CreateDBSnapshotInput{
  533. DBInstanceIdentifier: aws.String("String"), // Required
  534. DBSnapshotIdentifier: aws.String("String"), // Required
  535. Tags: []*rds.Tag{
  536. { // Required
  537. Key: aws.String("String"),
  538. Value: aws.String("String"),
  539. },
  540. // More values...
  541. },
  542. }
  543. resp, err := svc.CreateDBSnapshot(params)
  544. if err != nil {
  545. // Print the error, cast err to awserr.Error to get the Code and
  546. // Message from an error.
  547. fmt.Println(err.Error())
  548. return
  549. }
  550. // Pretty-print the response data.
  551. fmt.Println(resp)
  552. }
  553. func ExampleRDS_CreateDBSubnetGroup() {
  554. sess, err := session.NewSession()
  555. if err != nil {
  556. fmt.Println("failed to create session,", err)
  557. return
  558. }
  559. svc := rds.New(sess)
  560. params := &rds.CreateDBSubnetGroupInput{
  561. DBSubnetGroupDescription: aws.String("String"), // Required
  562. DBSubnetGroupName: aws.String("String"), // Required
  563. SubnetIds: []*string{ // Required
  564. aws.String("String"), // Required
  565. // More values...
  566. },
  567. Tags: []*rds.Tag{
  568. { // Required
  569. Key: aws.String("String"),
  570. Value: aws.String("String"),
  571. },
  572. // More values...
  573. },
  574. }
  575. resp, err := svc.CreateDBSubnetGroup(params)
  576. if err != nil {
  577. // Print the error, cast err to awserr.Error to get the Code and
  578. // Message from an error.
  579. fmt.Println(err.Error())
  580. return
  581. }
  582. // Pretty-print the response data.
  583. fmt.Println(resp)
  584. }
  585. func ExampleRDS_CreateEventSubscription() {
  586. sess, err := session.NewSession()
  587. if err != nil {
  588. fmt.Println("failed to create session,", err)
  589. return
  590. }
  591. svc := rds.New(sess)
  592. params := &rds.CreateEventSubscriptionInput{
  593. SnsTopicArn: aws.String("String"), // Required
  594. SubscriptionName: aws.String("String"), // Required
  595. Enabled: aws.Bool(true),
  596. EventCategories: []*string{
  597. aws.String("String"), // Required
  598. // More values...
  599. },
  600. SourceIds: []*string{
  601. aws.String("String"), // Required
  602. // More values...
  603. },
  604. SourceType: aws.String("String"),
  605. Tags: []*rds.Tag{
  606. { // Required
  607. Key: aws.String("String"),
  608. Value: aws.String("String"),
  609. },
  610. // More values...
  611. },
  612. }
  613. resp, err := svc.CreateEventSubscription(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_CreateOptionGroup() {
  624. sess, err := session.NewSession()
  625. if err != nil {
  626. fmt.Println("failed to create session,", err)
  627. return
  628. }
  629. svc := rds.New(sess)
  630. params := &rds.CreateOptionGroupInput{
  631. EngineName: aws.String("String"), // Required
  632. MajorEngineVersion: aws.String("String"), // Required
  633. OptionGroupDescription: aws.String("String"), // Required
  634. OptionGroupName: aws.String("String"), // Required
  635. Tags: []*rds.Tag{
  636. { // Required
  637. Key: aws.String("String"),
  638. Value: aws.String("String"),
  639. },
  640. // More values...
  641. },
  642. }
  643. resp, err := svc.CreateOptionGroup(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_DeleteDBCluster() {
  654. sess, err := session.NewSession()
  655. if err != nil {
  656. fmt.Println("failed to create session,", err)
  657. return
  658. }
  659. svc := rds.New(sess)
  660. params := &rds.DeleteDBClusterInput{
  661. DBClusterIdentifier: aws.String("String"), // Required
  662. FinalDBSnapshotIdentifier: aws.String("String"),
  663. SkipFinalSnapshot: aws.Bool(true),
  664. }
  665. resp, err := svc.DeleteDBCluster(params)
  666. if err != nil {
  667. // Print the error, cast err to awserr.Error to get the Code and
  668. // Message from an error.
  669. fmt.Println(err.Error())
  670. return
  671. }
  672. // Pretty-print the response data.
  673. fmt.Println(resp)
  674. }
  675. func ExampleRDS_DeleteDBClusterParameterGroup() {
  676. sess, err := session.NewSession()
  677. if err != nil {
  678. fmt.Println("failed to create session,", err)
  679. return
  680. }
  681. svc := rds.New(sess)
  682. params := &rds.DeleteDBClusterParameterGroupInput{
  683. DBClusterParameterGroupName: aws.String("String"), // Required
  684. }
  685. resp, err := svc.DeleteDBClusterParameterGroup(params)
  686. if err != nil {
  687. // Print the error, cast err to awserr.Error to get the Code and
  688. // Message from an error.
  689. fmt.Println(err.Error())
  690. return
  691. }
  692. // Pretty-print the response data.
  693. fmt.Println(resp)
  694. }
  695. func ExampleRDS_DeleteDBClusterSnapshot() {
  696. sess, err := session.NewSession()
  697. if err != nil {
  698. fmt.Println("failed to create session,", err)
  699. return
  700. }
  701. svc := rds.New(sess)
  702. params := &rds.DeleteDBClusterSnapshotInput{
  703. DBClusterSnapshotIdentifier: aws.String("String"), // Required
  704. }
  705. resp, err := svc.DeleteDBClusterSnapshot(params)
  706. if err != nil {
  707. // Print the error, cast err to awserr.Error to get the Code and
  708. // Message from an error.
  709. fmt.Println(err.Error())
  710. return
  711. }
  712. // Pretty-print the response data.
  713. fmt.Println(resp)
  714. }
  715. func ExampleRDS_DeleteDBInstance() {
  716. sess, err := session.NewSession()
  717. if err != nil {
  718. fmt.Println("failed to create session,", err)
  719. return
  720. }
  721. svc := rds.New(sess)
  722. params := &rds.DeleteDBInstanceInput{
  723. DBInstanceIdentifier: aws.String("String"), // Required
  724. FinalDBSnapshotIdentifier: aws.String("String"),
  725. SkipFinalSnapshot: aws.Bool(true),
  726. }
  727. resp, err := svc.DeleteDBInstance(params)
  728. if err != nil {
  729. // Print the error, cast err to awserr.Error to get the Code and
  730. // Message from an error.
  731. fmt.Println(err.Error())
  732. return
  733. }
  734. // Pretty-print the response data.
  735. fmt.Println(resp)
  736. }
  737. func ExampleRDS_DeleteDBParameterGroup() {
  738. sess, err := session.NewSession()
  739. if err != nil {
  740. fmt.Println("failed to create session,", err)
  741. return
  742. }
  743. svc := rds.New(sess)
  744. params := &rds.DeleteDBParameterGroupInput{
  745. DBParameterGroupName: aws.String("String"), // Required
  746. }
  747. resp, err := svc.DeleteDBParameterGroup(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 ExampleRDS_DeleteDBSecurityGroup() {
  758. sess, err := session.NewSession()
  759. if err != nil {
  760. fmt.Println("failed to create session,", err)
  761. return
  762. }
  763. svc := rds.New(sess)
  764. params := &rds.DeleteDBSecurityGroupInput{
  765. DBSecurityGroupName: aws.String("String"), // Required
  766. }
  767. resp, err := svc.DeleteDBSecurityGroup(params)
  768. if err != nil {
  769. // Print the error, cast err to awserr.Error to get the Code and
  770. // Message from an error.
  771. fmt.Println(err.Error())
  772. return
  773. }
  774. // Pretty-print the response data.
  775. fmt.Println(resp)
  776. }
  777. func ExampleRDS_DeleteDBSnapshot() {
  778. sess, err := session.NewSession()
  779. if err != nil {
  780. fmt.Println("failed to create session,", err)
  781. return
  782. }
  783. svc := rds.New(sess)
  784. params := &rds.DeleteDBSnapshotInput{
  785. DBSnapshotIdentifier: aws.String("String"), // Required
  786. }
  787. resp, err := svc.DeleteDBSnapshot(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 ExampleRDS_DeleteDBSubnetGroup() {
  798. sess, err := session.NewSession()
  799. if err != nil {
  800. fmt.Println("failed to create session,", err)
  801. return
  802. }
  803. svc := rds.New(sess)
  804. params := &rds.DeleteDBSubnetGroupInput{
  805. DBSubnetGroupName: aws.String("String"), // Required
  806. }
  807. resp, err := svc.DeleteDBSubnetGroup(params)
  808. if err != nil {
  809. // Print the error, cast err to awserr.Error to get the Code and
  810. // Message from an error.
  811. fmt.Println(err.Error())
  812. return
  813. }
  814. // Pretty-print the response data.
  815. fmt.Println(resp)
  816. }
  817. func ExampleRDS_DeleteEventSubscription() {
  818. sess, err := session.NewSession()
  819. if err != nil {
  820. fmt.Println("failed to create session,", err)
  821. return
  822. }
  823. svc := rds.New(sess)
  824. params := &rds.DeleteEventSubscriptionInput{
  825. SubscriptionName: aws.String("String"), // Required
  826. }
  827. resp, err := svc.DeleteEventSubscription(params)
  828. if err != nil {
  829. // Print the error, cast err to awserr.Error to get the Code and
  830. // Message from an error.
  831. fmt.Println(err.Error())
  832. return
  833. }
  834. // Pretty-print the response data.
  835. fmt.Println(resp)
  836. }
  837. func ExampleRDS_DeleteOptionGroup() {
  838. sess, err := session.NewSession()
  839. if err != nil {
  840. fmt.Println("failed to create session,", err)
  841. return
  842. }
  843. svc := rds.New(sess)
  844. params := &rds.DeleteOptionGroupInput{
  845. OptionGroupName: aws.String("String"), // Required
  846. }
  847. resp, err := svc.DeleteOptionGroup(params)
  848. if err != nil {
  849. // Print the error, cast err to awserr.Error to get the Code and
  850. // Message from an error.
  851. fmt.Println(err.Error())
  852. return
  853. }
  854. // Pretty-print the response data.
  855. fmt.Println(resp)
  856. }
  857. func ExampleRDS_DescribeAccountAttributes() {
  858. sess, err := session.NewSession()
  859. if err != nil {
  860. fmt.Println("failed to create session,", err)
  861. return
  862. }
  863. svc := rds.New(sess)
  864. var params *rds.DescribeAccountAttributesInput
  865. resp, err := svc.DescribeAccountAttributes(params)
  866. if err != nil {
  867. // Print the error, cast err to awserr.Error to get the Code and
  868. // Message from an error.
  869. fmt.Println(err.Error())
  870. return
  871. }
  872. // Pretty-print the response data.
  873. fmt.Println(resp)
  874. }
  875. func ExampleRDS_DescribeCertificates() {
  876. sess, err := session.NewSession()
  877. if err != nil {
  878. fmt.Println("failed to create session,", err)
  879. return
  880. }
  881. svc := rds.New(sess)
  882. params := &rds.DescribeCertificatesInput{
  883. CertificateIdentifier: 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.DescribeCertificates(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_DescribeDBClusterParameterGroups() {
  908. sess, err := session.NewSession()
  909. if err != nil {
  910. fmt.Println("failed to create session,", err)
  911. return
  912. }
  913. svc := rds.New(sess)
  914. params := &rds.DescribeDBClusterParameterGroupsInput{
  915. DBClusterParameterGroupName: aws.String("String"),
  916. Filters: []*rds.Filter{
  917. { // Required
  918. Name: aws.String("String"), // Required
  919. Values: []*string{ // Required
  920. aws.String("String"), // Required
  921. // More values...
  922. },
  923. },
  924. // More values...
  925. },
  926. Marker: aws.String("String"),
  927. MaxRecords: aws.Int64(1),
  928. }
  929. resp, err := svc.DescribeDBClusterParameterGroups(params)
  930. if err != nil {
  931. // Print the error, cast err to awserr.Error to get the Code and
  932. // Message from an error.
  933. fmt.Println(err.Error())
  934. return
  935. }
  936. // Pretty-print the response data.
  937. fmt.Println(resp)
  938. }
  939. func ExampleRDS_DescribeDBClusterParameters() {
  940. sess, err := session.NewSession()
  941. if err != nil {
  942. fmt.Println("failed to create session,", err)
  943. return
  944. }
  945. svc := rds.New(sess)
  946. params := &rds.DescribeDBClusterParametersInput{
  947. DBClusterParameterGroupName: aws.String("String"), // Required
  948. Filters: []*rds.Filter{
  949. { // Required
  950. Name: aws.String("String"), // Required
  951. Values: []*string{ // Required
  952. aws.String("String"), // Required
  953. // More values...
  954. },
  955. },
  956. // More values...
  957. },
  958. Marker: aws.String("String"),
  959. MaxRecords: aws.Int64(1),
  960. Source: aws.String("String"),
  961. }
  962. resp, err := svc.DescribeDBClusterParameters(params)
  963. if err != nil {
  964. // Print the error, cast err to awserr.Error to get the Code and
  965. // Message from an error.
  966. fmt.Println(err.Error())
  967. return
  968. }
  969. // Pretty-print the response data.
  970. fmt.Println(resp)
  971. }
  972. func ExampleRDS_DescribeDBClusterSnapshotAttributes() {
  973. sess, err := session.NewSession()
  974. if err != nil {
  975. fmt.Println("failed to create session,", err)
  976. return
  977. }
  978. svc := rds.New(sess)
  979. params := &rds.DescribeDBClusterSnapshotAttributesInput{
  980. DBClusterSnapshotIdentifier: aws.String("String"), // Required
  981. }
  982. resp, err := svc.DescribeDBClusterSnapshotAttributes(params)
  983. if err != nil {
  984. // Print the error, cast err to awserr.Error to get the Code and
  985. // Message from an error.
  986. fmt.Println(err.Error())
  987. return
  988. }
  989. // Pretty-print the response data.
  990. fmt.Println(resp)
  991. }
  992. func ExampleRDS_DescribeDBClusterSnapshots() {
  993. sess, err := session.NewSession()
  994. if err != nil {
  995. fmt.Println("failed to create session,", err)
  996. return
  997. }
  998. svc := rds.New(sess)
  999. params := &rds.DescribeDBClusterSnapshotsInput{
  1000. DBClusterIdentifier: aws.String("String"),
  1001. DBClusterSnapshotIdentifier: aws.String("String"),
  1002. Filters: []*rds.Filter{
  1003. { // Required
  1004. Name: aws.String("String"), // Required
  1005. Values: []*string{ // Required
  1006. aws.String("String"), // Required
  1007. // More values...
  1008. },
  1009. },
  1010. // More values...
  1011. },
  1012. IncludePublic: aws.Bool(true),
  1013. IncludeShared: aws.Bool(true),
  1014. Marker: aws.String("String"),
  1015. MaxRecords: aws.Int64(1),
  1016. SnapshotType: aws.String("String"),
  1017. }
  1018. resp, err := svc.DescribeDBClusterSnapshots(params)
  1019. if err != nil {
  1020. // Print the error, cast err to awserr.Error to get the Code and
  1021. // Message from an error.
  1022. fmt.Println(err.Error())
  1023. return
  1024. }
  1025. // Pretty-print the response data.
  1026. fmt.Println(resp)
  1027. }
  1028. func ExampleRDS_DescribeDBClusters() {
  1029. sess, err := session.NewSession()
  1030. if err != nil {
  1031. fmt.Println("failed to create session,", err)
  1032. return
  1033. }
  1034. svc := rds.New(sess)
  1035. params := &rds.DescribeDBClustersInput{
  1036. DBClusterIdentifier: aws.String("String"),
  1037. Filters: []*rds.Filter{
  1038. { // Required
  1039. Name: aws.String("String"), // Required
  1040. Values: []*string{ // Required
  1041. aws.String("String"), // Required
  1042. // More values...
  1043. },
  1044. },
  1045. // More values...
  1046. },
  1047. Marker: aws.String("String"),
  1048. MaxRecords: aws.Int64(1),
  1049. }
  1050. resp, err := svc.DescribeDBClusters(params)
  1051. if err != nil {
  1052. // Print the error, cast err to awserr.Error to get the Code and
  1053. // Message from an error.
  1054. fmt.Println(err.Error())
  1055. return
  1056. }
  1057. // Pretty-print the response data.
  1058. fmt.Println(resp)
  1059. }
  1060. func ExampleRDS_DescribeDBEngineVersions() {
  1061. sess, err := session.NewSession()
  1062. if err != nil {
  1063. fmt.Println("failed to create session,", err)
  1064. return
  1065. }
  1066. svc := rds.New(sess)
  1067. params := &rds.DescribeDBEngineVersionsInput{
  1068. DBParameterGroupFamily: aws.String("String"),
  1069. DefaultOnly: aws.Bool(true),
  1070. Engine: aws.String("String"),
  1071. EngineVersion: aws.String("String"),
  1072. Filters: []*rds.Filter{
  1073. { // Required
  1074. Name: aws.String("String"), // Required
  1075. Values: []*string{ // Required
  1076. aws.String("String"), // Required
  1077. // More values...
  1078. },
  1079. },
  1080. // More values...
  1081. },
  1082. ListSupportedCharacterSets: aws.Bool(true),
  1083. Marker: aws.String("String"),
  1084. MaxRecords: aws.Int64(1),
  1085. }
  1086. resp, err := svc.DescribeDBEngineVersions(params)
  1087. if err != nil {
  1088. // Print the error, cast err to awserr.Error to get the Code and
  1089. // Message from an error.
  1090. fmt.Println(err.Error())
  1091. return
  1092. }
  1093. // Pretty-print the response data.
  1094. fmt.Println(resp)
  1095. }
  1096. func ExampleRDS_DescribeDBInstances() {
  1097. sess, err := session.NewSession()
  1098. if err != nil {
  1099. fmt.Println("failed to create session,", err)
  1100. return
  1101. }
  1102. svc := rds.New(sess)
  1103. params := &rds.DescribeDBInstancesInput{
  1104. DBInstanceIdentifier: aws.String("String"),
  1105. Filters: []*rds.Filter{
  1106. { // Required
  1107. Name: aws.String("String"), // Required
  1108. Values: []*string{ // Required
  1109. aws.String("String"), // Required
  1110. // More values...
  1111. },
  1112. },
  1113. // More values...
  1114. },
  1115. Marker: aws.String("String"),
  1116. MaxRecords: aws.Int64(1),
  1117. }
  1118. resp, err := svc.DescribeDBInstances(params)
  1119. if err != nil {
  1120. // Print the error, cast err to awserr.Error to get the Code and
  1121. // Message from an error.
  1122. fmt.Println(err.Error())
  1123. return
  1124. }
  1125. // Pretty-print the response data.
  1126. fmt.Println(resp)
  1127. }
  1128. func ExampleRDS_DescribeDBLogFiles() {
  1129. sess, err := session.NewSession()
  1130. if err != nil {
  1131. fmt.Println("failed to create session,", err)
  1132. return
  1133. }
  1134. svc := rds.New(sess)
  1135. params := &rds.DescribeDBLogFilesInput{
  1136. DBInstanceIdentifier: aws.String("String"), // Required
  1137. FileLastWritten: aws.Int64(1),
  1138. FileSize: aws.Int64(1),
  1139. FilenameContains: aws.String("String"),
  1140. Filters: []*rds.Filter{
  1141. { // Required
  1142. Name: aws.String("String"), // Required
  1143. Values: []*string{ // Required
  1144. aws.String("String"), // Required
  1145. // More values...
  1146. },
  1147. },
  1148. // More values...
  1149. },
  1150. Marker: aws.String("String"),
  1151. MaxRecords: aws.Int64(1),
  1152. }
  1153. resp, err := svc.DescribeDBLogFiles(params)
  1154. if err != nil {
  1155. // Print the error, cast err to awserr.Error to get the Code and
  1156. // Message from an error.
  1157. fmt.Println(err.Error())
  1158. return
  1159. }
  1160. // Pretty-print the response data.
  1161. fmt.Println(resp)
  1162. }
  1163. func ExampleRDS_DescribeDBParameterGroups() {
  1164. sess, err := session.NewSession()
  1165. if err != nil {
  1166. fmt.Println("failed to create session,", err)
  1167. return
  1168. }
  1169. svc := rds.New(sess)
  1170. params := &rds.DescribeDBParameterGroupsInput{
  1171. DBParameterGroupName: aws.String("String"),
  1172. Filters: []*rds.Filter{
  1173. { // Required
  1174. Name: aws.String("String"), // Required
  1175. Values: []*string{ // Required
  1176. aws.String("String"), // Required
  1177. // More values...
  1178. },
  1179. },
  1180. // More values...
  1181. },
  1182. Marker: aws.String("String"),
  1183. MaxRecords: aws.Int64(1),
  1184. }
  1185. resp, err := svc.DescribeDBParameterGroups(params)
  1186. if err != nil {
  1187. // Print the error, cast err to awserr.Error to get the Code and
  1188. // Message from an error.
  1189. fmt.Println(err.Error())
  1190. return
  1191. }
  1192. // Pretty-print the response data.
  1193. fmt.Println(resp)
  1194. }
  1195. func ExampleRDS_DescribeDBParameters() {
  1196. sess, err := session.NewSession()
  1197. if err != nil {
  1198. fmt.Println("failed to create session,", err)
  1199. return
  1200. }
  1201. svc := rds.New(sess)
  1202. params := &rds.DescribeDBParametersInput{
  1203. DBParameterGroupName: aws.String("String"), // Required
  1204. Filters: []*rds.Filter{
  1205. { // Required
  1206. Name: aws.String("String"), // Required
  1207. Values: []*string{ // Required
  1208. aws.String("String"), // Required
  1209. // More values...
  1210. },
  1211. },
  1212. // More values...
  1213. },
  1214. Marker: aws.String("String"),
  1215. MaxRecords: aws.Int64(1),
  1216. Source: aws.String("String"),
  1217. }
  1218. resp, err := svc.DescribeDBParameters(params)
  1219. if err != nil {
  1220. // Print the error, cast err to awserr.Error to get the Code and
  1221. // Message from an error.
  1222. fmt.Println(err.Error())
  1223. return
  1224. }
  1225. // Pretty-print the response data.
  1226. fmt.Println(resp)
  1227. }
  1228. func ExampleRDS_DescribeDBSecurityGroups() {
  1229. sess, err := session.NewSession()
  1230. if err != nil {
  1231. fmt.Println("failed to create session,", err)
  1232. return
  1233. }
  1234. svc := rds.New(sess)
  1235. params := &rds.DescribeDBSecurityGroupsInput{
  1236. DBSecurityGroupName: aws.String("String"),
  1237. Filters: []*rds.Filter{
  1238. { // Required
  1239. Name: aws.String("String"), // Required
  1240. Values: []*string{ // Required
  1241. aws.String("String"), // Required
  1242. // More values...
  1243. },
  1244. },
  1245. // More values...
  1246. },
  1247. Marker: aws.String("String"),
  1248. MaxRecords: aws.Int64(1),
  1249. }
  1250. resp, err := svc.DescribeDBSecurityGroups(params)
  1251. if err != nil {
  1252. // Print the error, cast err to awserr.Error to get the Code and
  1253. // Message from an error.
  1254. fmt.Println(err.Error())
  1255. return
  1256. }
  1257. // Pretty-print the response data.
  1258. fmt.Println(resp)
  1259. }
  1260. func ExampleRDS_DescribeDBSnapshotAttributes() {
  1261. sess, err := session.NewSession()
  1262. if err != nil {
  1263. fmt.Println("failed to create session,", err)
  1264. return
  1265. }
  1266. svc := rds.New(sess)
  1267. params := &rds.DescribeDBSnapshotAttributesInput{
  1268. DBSnapshotIdentifier: aws.String("String"), // Required
  1269. }
  1270. resp, err := svc.DescribeDBSnapshotAttributes(params)
  1271. if err != nil {
  1272. // Print the error, cast err to awserr.Error to get the Code and
  1273. // Message from an error.
  1274. fmt.Println(err.Error())
  1275. return
  1276. }
  1277. // Pretty-print the response data.
  1278. fmt.Println(resp)
  1279. }
  1280. func ExampleRDS_DescribeDBSnapshots() {
  1281. sess, err := session.NewSession()
  1282. if err != nil {
  1283. fmt.Println("failed to create session,", err)
  1284. return
  1285. }
  1286. svc := rds.New(sess)
  1287. params := &rds.DescribeDBSnapshotsInput{
  1288. DBInstanceIdentifier: aws.String("String"),
  1289. DBSnapshotIdentifier: aws.String("String"),
  1290. Filters: []*rds.Filter{
  1291. { // Required
  1292. Name: aws.String("String"), // Required
  1293. Values: []*string{ // Required
  1294. aws.String("String"), // Required
  1295. // More values...
  1296. },
  1297. },
  1298. // More values...
  1299. },
  1300. IncludePublic: aws.Bool(true),
  1301. IncludeShared: aws.Bool(true),
  1302. Marker: aws.String("String"),
  1303. MaxRecords: aws.Int64(1),
  1304. SnapshotType: aws.String("String"),
  1305. }
  1306. resp, err := svc.DescribeDBSnapshots(params)
  1307. if err != nil {
  1308. // Print the error, cast err to awserr.Error to get the Code and
  1309. // Message from an error.
  1310. fmt.Println(err.Error())
  1311. return
  1312. }
  1313. // Pretty-print the response data.
  1314. fmt.Println(resp)
  1315. }
  1316. func ExampleRDS_DescribeDBSubnetGroups() {
  1317. sess, err := session.NewSession()
  1318. if err != nil {
  1319. fmt.Println("failed to create session,", err)
  1320. return
  1321. }
  1322. svc := rds.New(sess)
  1323. params := &rds.DescribeDBSubnetGroupsInput{
  1324. DBSubnetGroupName: aws.String("String"),
  1325. Filters: []*rds.Filter{
  1326. { // Required
  1327. Name: aws.String("String"), // Required
  1328. Values: []*string{ // Required
  1329. aws.String("String"), // Required
  1330. // More values...
  1331. },
  1332. },
  1333. // More values...
  1334. },
  1335. Marker: aws.String("String"),
  1336. MaxRecords: aws.Int64(1),
  1337. }
  1338. resp, err := svc.DescribeDBSubnetGroups(params)
  1339. if err != nil {
  1340. // Print the error, cast err to awserr.Error to get the Code and
  1341. // Message from an error.
  1342. fmt.Println(err.Error())
  1343. return
  1344. }
  1345. // Pretty-print the response data.
  1346. fmt.Println(resp)
  1347. }
  1348. func ExampleRDS_DescribeEngineDefaultClusterParameters() {
  1349. sess, err := session.NewSession()
  1350. if err != nil {
  1351. fmt.Println("failed to create session,", err)
  1352. return
  1353. }
  1354. svc := rds.New(sess)
  1355. params := &rds.DescribeEngineDefaultClusterParametersInput{
  1356. DBParameterGroupFamily: aws.String("String"), // Required
  1357. Filters: []*rds.Filter{
  1358. { // Required
  1359. Name: aws.String("String"), // Required
  1360. Values: []*string{ // Required
  1361. aws.String("String"), // Required
  1362. // More values...
  1363. },
  1364. },
  1365. // More values...
  1366. },
  1367. Marker: aws.String("String"),
  1368. MaxRecords: aws.Int64(1),
  1369. }
  1370. resp, err := svc.DescribeEngineDefaultClusterParameters(params)
  1371. if err != nil {
  1372. // Print the error, cast err to awserr.Error to get the Code and
  1373. // Message from an error.
  1374. fmt.Println(err.Error())
  1375. return
  1376. }
  1377. // Pretty-print the response data.
  1378. fmt.Println(resp)
  1379. }
  1380. func ExampleRDS_DescribeEngineDefaultParameters() {
  1381. sess, err := session.NewSession()
  1382. if err != nil {
  1383. fmt.Println("failed to create session,", err)
  1384. return
  1385. }
  1386. svc := rds.New(sess)
  1387. params := &rds.DescribeEngineDefaultParametersInput{
  1388. DBParameterGroupFamily: aws.String("String"), // Required
  1389. Filters: []*rds.Filter{
  1390. { // Required
  1391. Name: aws.String("String"), // Required
  1392. Values: []*string{ // Required
  1393. aws.String("String"), // Required
  1394. // More values...
  1395. },
  1396. },
  1397. // More values...
  1398. },
  1399. Marker: aws.String("String"),
  1400. MaxRecords: aws.Int64(1),
  1401. }
  1402. resp, err := svc.DescribeEngineDefaultParameters(params)
  1403. if err != nil {
  1404. // Print the error, cast err to awserr.Error to get the Code and
  1405. // Message from an error.
  1406. fmt.Println(err.Error())
  1407. return
  1408. }
  1409. // Pretty-print the response data.
  1410. fmt.Println(resp)
  1411. }
  1412. func ExampleRDS_DescribeEventCategories() {
  1413. sess, err := session.NewSession()
  1414. if err != nil {
  1415. fmt.Println("failed to create session,", err)
  1416. return
  1417. }
  1418. svc := rds.New(sess)
  1419. params := &rds.DescribeEventCategoriesInput{
  1420. Filters: []*rds.Filter{
  1421. { // Required
  1422. Name: aws.String("String"), // Required
  1423. Values: []*string{ // Required
  1424. aws.String("String"), // Required
  1425. // More values...
  1426. },
  1427. },
  1428. // More values...
  1429. },
  1430. SourceType: aws.String("String"),
  1431. }
  1432. resp, err := svc.DescribeEventCategories(params)
  1433. if err != nil {
  1434. // Print the error, cast err to awserr.Error to get the Code and
  1435. // Message from an error.
  1436. fmt.Println(err.Error())
  1437. return
  1438. }
  1439. // Pretty-print the response data.
  1440. fmt.Println(resp)
  1441. }
  1442. func ExampleRDS_DescribeEventSubscriptions() {
  1443. sess, err := session.NewSession()
  1444. if err != nil {
  1445. fmt.Println("failed to create session,", err)
  1446. return
  1447. }
  1448. svc := rds.New(sess)
  1449. params := &rds.DescribeEventSubscriptionsInput{
  1450. Filters: []*rds.Filter{
  1451. { // Required
  1452. Name: aws.String("String"), // Required
  1453. Values: []*string{ // Required
  1454. aws.String("String"), // Required
  1455. // More values...
  1456. },
  1457. },
  1458. // More values...
  1459. },
  1460. Marker: aws.String("String"),
  1461. MaxRecords: aws.Int64(1),
  1462. SubscriptionName: aws.String("String"),
  1463. }
  1464. resp, err := svc.DescribeEventSubscriptions(params)
  1465. if err != nil {
  1466. // Print the error, cast err to awserr.Error to get the Code and
  1467. // Message from an error.
  1468. fmt.Println(err.Error())
  1469. return
  1470. }
  1471. // Pretty-print the response data.
  1472. fmt.Println(resp)
  1473. }
  1474. func ExampleRDS_DescribeEvents() {
  1475. sess, err := session.NewSession()
  1476. if err != nil {
  1477. fmt.Println("failed to create session,", err)
  1478. return
  1479. }
  1480. svc := rds.New(sess)
  1481. params := &rds.DescribeEventsInput{
  1482. Duration: aws.Int64(1),
  1483. EndTime: aws.Time(time.Now()),
  1484. EventCategories: []*string{
  1485. aws.String("String"), // Required
  1486. // More values...
  1487. },
  1488. Filters: []*rds.Filter{
  1489. { // Required
  1490. Name: aws.String("String"), // Required
  1491. Values: []*string{ // Required
  1492. aws.String("String"), // Required
  1493. // More values...
  1494. },
  1495. },
  1496. // More values...
  1497. },
  1498. Marker: aws.String("String"),
  1499. MaxRecords: aws.Int64(1),
  1500. SourceIdentifier: aws.String("String"),
  1501. SourceType: aws.String("SourceType"),
  1502. StartTime: aws.Time(time.Now()),
  1503. }
  1504. resp, err := svc.DescribeEvents(params)
  1505. if err != nil {
  1506. // Print the error, cast err to awserr.Error to get the Code and
  1507. // Message from an error.
  1508. fmt.Println(err.Error())
  1509. return
  1510. }
  1511. // Pretty-print the response data.
  1512. fmt.Println(resp)
  1513. }
  1514. func ExampleRDS_DescribeOptionGroupOptions() {
  1515. sess, err := session.NewSession()
  1516. if err != nil {
  1517. fmt.Println("failed to create session,", err)
  1518. return
  1519. }
  1520. svc := rds.New(sess)
  1521. params := &rds.DescribeOptionGroupOptionsInput{
  1522. EngineName: aws.String("String"), // Required
  1523. Filters: []*rds.Filter{
  1524. { // Required
  1525. Name: aws.String("String"), // Required
  1526. Values: []*string{ // Required
  1527. aws.String("String"), // Required
  1528. // More values...
  1529. },
  1530. },
  1531. // More values...
  1532. },
  1533. MajorEngineVersion: aws.String("String"),
  1534. Marker: aws.String("String"),
  1535. MaxRecords: aws.Int64(1),
  1536. }
  1537. resp, err := svc.DescribeOptionGroupOptions(params)
  1538. if err != nil {
  1539. // Print the error, cast err to awserr.Error to get the Code and
  1540. // Message from an error.
  1541. fmt.Println(err.Error())
  1542. return
  1543. }
  1544. // Pretty-print the response data.
  1545. fmt.Println(resp)
  1546. }
  1547. func ExampleRDS_DescribeOptionGroups() {
  1548. sess, err := session.NewSession()
  1549. if err != nil {
  1550. fmt.Println("failed to create session,", err)
  1551. return
  1552. }
  1553. svc := rds.New(sess)
  1554. params := &rds.DescribeOptionGroupsInput{
  1555. EngineName: aws.String("String"),
  1556. Filters: []*rds.Filter{
  1557. { // Required
  1558. Name: aws.String("String"), // Required
  1559. Values: []*string{ // Required
  1560. aws.String("String"), // Required
  1561. // More values...
  1562. },
  1563. },
  1564. // More values...
  1565. },
  1566. MajorEngineVersion: aws.String("String"),
  1567. Marker: aws.String("String"),
  1568. MaxRecords: aws.Int64(1),
  1569. OptionGroupName: aws.String("String"),
  1570. }
  1571. resp, err := svc.DescribeOptionGroups(params)
  1572. if err != nil {
  1573. // Print the error, cast err to awserr.Error to get the Code and
  1574. // Message from an error.
  1575. fmt.Println(err.Error())
  1576. return
  1577. }
  1578. // Pretty-print the response data.
  1579. fmt.Println(resp)
  1580. }
  1581. func ExampleRDS_DescribeOrderableDBInstanceOptions() {
  1582. sess, err := session.NewSession()
  1583. if err != nil {
  1584. fmt.Println("failed to create session,", err)
  1585. return
  1586. }
  1587. svc := rds.New(sess)
  1588. params := &rds.DescribeOrderableDBInstanceOptionsInput{
  1589. Engine: aws.String("String"), // Required
  1590. DBInstanceClass: aws.String("String"),
  1591. EngineVersion: aws.String("String"),
  1592. Filters: []*rds.Filter{
  1593. { // Required
  1594. Name: aws.String("String"), // Required
  1595. Values: []*string{ // Required
  1596. aws.String("String"), // Required
  1597. // More values...
  1598. },
  1599. },
  1600. // More values...
  1601. },
  1602. LicenseModel: aws.String("String"),
  1603. Marker: aws.String("String"),
  1604. MaxRecords: aws.Int64(1),
  1605. Vpc: aws.Bool(true),
  1606. }
  1607. resp, err := svc.DescribeOrderableDBInstanceOptions(params)
  1608. if err != nil {
  1609. // Print the error, cast err to awserr.Error to get the Code and
  1610. // Message from an error.
  1611. fmt.Println(err.Error())
  1612. return
  1613. }
  1614. // Pretty-print the response data.
  1615. fmt.Println(resp)
  1616. }
  1617. func ExampleRDS_DescribePendingMaintenanceActions() {
  1618. sess, err := session.NewSession()
  1619. if err != nil {
  1620. fmt.Println("failed to create session,", err)
  1621. return
  1622. }
  1623. svc := rds.New(sess)
  1624. params := &rds.DescribePendingMaintenanceActionsInput{
  1625. Filters: []*rds.Filter{
  1626. { // Required
  1627. Name: aws.String("String"), // Required
  1628. Values: []*string{ // Required
  1629. aws.String("String"), // Required
  1630. // More values...
  1631. },
  1632. },
  1633. // More values...
  1634. },
  1635. Marker: aws.String("String"),
  1636. MaxRecords: aws.Int64(1),
  1637. ResourceIdentifier: aws.String("String"),
  1638. }
  1639. resp, err := svc.DescribePendingMaintenanceActions(params)
  1640. if err != nil {
  1641. // Print the error, cast err to awserr.Error to get the Code and
  1642. // Message from an error.
  1643. fmt.Println(err.Error())
  1644. return
  1645. }
  1646. // Pretty-print the response data.
  1647. fmt.Println(resp)
  1648. }
  1649. func ExampleRDS_DescribeReservedDBInstances() {
  1650. sess, err := session.NewSession()
  1651. if err != nil {
  1652. fmt.Println("failed to create session,", err)
  1653. return
  1654. }
  1655. svc := rds.New(sess)
  1656. params := &rds.DescribeReservedDBInstancesInput{
  1657. DBInstanceClass: aws.String("String"),
  1658. Duration: aws.String("String"),
  1659. Filters: []*rds.Filter{
  1660. { // Required
  1661. Name: aws.String("String"), // Required
  1662. Values: []*string{ // Required
  1663. aws.String("String"), // Required
  1664. // More values...
  1665. },
  1666. },
  1667. // More values...
  1668. },
  1669. Marker: aws.String("String"),
  1670. MaxRecords: aws.Int64(1),
  1671. MultiAZ: aws.Bool(true),
  1672. OfferingType: aws.String("String"),
  1673. ProductDescription: aws.String("String"),
  1674. ReservedDBInstanceId: aws.String("String"),
  1675. ReservedDBInstancesOfferingId: aws.String("String"),
  1676. }
  1677. resp, err := svc.DescribeReservedDBInstances(params)
  1678. if err != nil {
  1679. // Print the error, cast err to awserr.Error to get the Code and
  1680. // Message from an error.
  1681. fmt.Println(err.Error())
  1682. return
  1683. }
  1684. // Pretty-print the response data.
  1685. fmt.Println(resp)
  1686. }
  1687. func ExampleRDS_DescribeReservedDBInstancesOfferings() {
  1688. sess, err := session.NewSession()
  1689. if err != nil {
  1690. fmt.Println("failed to create session,", err)
  1691. return
  1692. }
  1693. svc := rds.New(sess)
  1694. params := &rds.DescribeReservedDBInstancesOfferingsInput{
  1695. DBInstanceClass: aws.String("String"),
  1696. Duration: aws.String("String"),
  1697. Filters: []*rds.Filter{
  1698. { // Required
  1699. Name: aws.String("String"), // Required
  1700. Values: []*string{ // Required
  1701. aws.String("String"), // Required
  1702. // More values...
  1703. },
  1704. },
  1705. // More values...
  1706. },
  1707. Marker: aws.String("String"),
  1708. MaxRecords: aws.Int64(1),
  1709. MultiAZ: aws.Bool(true),
  1710. OfferingType: aws.String("String"),
  1711. ProductDescription: aws.String("String"),
  1712. ReservedDBInstancesOfferingId: aws.String("String"),
  1713. }
  1714. resp, err := svc.DescribeReservedDBInstancesOfferings(params)
  1715. if err != nil {
  1716. // Print the error, cast err to awserr.Error to get the Code and
  1717. // Message from an error.
  1718. fmt.Println(err.Error())
  1719. return
  1720. }
  1721. // Pretty-print the response data.
  1722. fmt.Println(resp)
  1723. }
  1724. func ExampleRDS_DownloadDBLogFilePortion() {
  1725. sess, err := session.NewSession()
  1726. if err != nil {
  1727. fmt.Println("failed to create session,", err)
  1728. return
  1729. }
  1730. svc := rds.New(sess)
  1731. params := &rds.DownloadDBLogFilePortionInput{
  1732. DBInstanceIdentifier: aws.String("String"), // Required
  1733. LogFileName: aws.String("String"), // Required
  1734. Marker: aws.String("String"),
  1735. NumberOfLines: aws.Int64(1),
  1736. }
  1737. resp, err := svc.DownloadDBLogFilePortion(params)
  1738. if err != nil {
  1739. // Print the error, cast err to awserr.Error to get the Code and
  1740. // Message from an error.
  1741. fmt.Println(err.Error())
  1742. return
  1743. }
  1744. // Pretty-print the response data.
  1745. fmt.Println(resp)
  1746. }
  1747. func ExampleRDS_FailoverDBCluster() {
  1748. sess, err := session.NewSession()
  1749. if err != nil {
  1750. fmt.Println("failed to create session,", err)
  1751. return
  1752. }
  1753. svc := rds.New(sess)
  1754. params := &rds.FailoverDBClusterInput{
  1755. DBClusterIdentifier: aws.String("String"),
  1756. TargetDBInstanceIdentifier: aws.String("String"),
  1757. }
  1758. resp, err := svc.FailoverDBCluster(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_ListTagsForResource() {
  1769. sess, err := session.NewSession()
  1770. if err != nil {
  1771. fmt.Println("failed to create session,", err)
  1772. return
  1773. }
  1774. svc := rds.New(sess)
  1775. params := &rds.ListTagsForResourceInput{
  1776. ResourceName: aws.String("String"), // Required
  1777. Filters: []*rds.Filter{
  1778. { // Required
  1779. Name: aws.String("String"), // Required
  1780. Values: []*string{ // Required
  1781. aws.String("String"), // Required
  1782. // More values...
  1783. },
  1784. },
  1785. // More values...
  1786. },
  1787. }
  1788. resp, err := svc.ListTagsForResource(params)
  1789. if err != nil {
  1790. // Print the error, cast err to awserr.Error to get the Code and
  1791. // Message from an error.
  1792. fmt.Println(err.Error())
  1793. return
  1794. }
  1795. // Pretty-print the response data.
  1796. fmt.Println(resp)
  1797. }
  1798. func ExampleRDS_ModifyDBCluster() {
  1799. sess, err := session.NewSession()
  1800. if err != nil {
  1801. fmt.Println("failed to create session,", err)
  1802. return
  1803. }
  1804. svc := rds.New(sess)
  1805. params := &rds.ModifyDBClusterInput{
  1806. DBClusterIdentifier: aws.String("String"), // Required
  1807. ApplyImmediately: aws.Bool(true),
  1808. BackupRetentionPeriod: aws.Int64(1),
  1809. DBClusterParameterGroupName: aws.String("String"),
  1810. MasterUserPassword: aws.String("String"),
  1811. NewDBClusterIdentifier: aws.String("String"),
  1812. OptionGroupName: aws.String("String"),
  1813. Port: aws.Int64(1),
  1814. PreferredBackupWindow: aws.String("String"),
  1815. PreferredMaintenanceWindow: aws.String("String"),
  1816. VpcSecurityGroupIds: []*string{
  1817. aws.String("String"), // Required
  1818. // More values...
  1819. },
  1820. }
  1821. resp, err := svc.ModifyDBCluster(params)
  1822. if err != nil {
  1823. // Print the error, cast err to awserr.Error to get the Code and
  1824. // Message from an error.
  1825. fmt.Println(err.Error())
  1826. return
  1827. }
  1828. // Pretty-print the response data.
  1829. fmt.Println(resp)
  1830. }
  1831. func ExampleRDS_ModifyDBClusterParameterGroup() {
  1832. sess, err := session.NewSession()
  1833. if err != nil {
  1834. fmt.Println("failed to create session,", err)
  1835. return
  1836. }
  1837. svc := rds.New(sess)
  1838. params := &rds.ModifyDBClusterParameterGroupInput{
  1839. DBClusterParameterGroupName: aws.String("String"), // Required
  1840. Parameters: []*rds.Parameter{ // Required
  1841. { // Required
  1842. AllowedValues: aws.String("String"),
  1843. ApplyMethod: aws.String("ApplyMethod"),
  1844. ApplyType: aws.String("String"),
  1845. DataType: aws.String("String"),
  1846. Description: aws.String("String"),
  1847. IsModifiable: aws.Bool(true),
  1848. MinimumEngineVersion: aws.String("String"),
  1849. ParameterName: aws.String("String"),
  1850. ParameterValue: aws.String("String"),
  1851. Source: aws.String("String"),
  1852. },
  1853. // More values...
  1854. },
  1855. }
  1856. resp, err := svc.ModifyDBClusterParameterGroup(params)
  1857. if err != nil {
  1858. // Print the error, cast err to awserr.Error to get the Code and
  1859. // Message from an error.
  1860. fmt.Println(err.Error())
  1861. return
  1862. }
  1863. // Pretty-print the response data.
  1864. fmt.Println(resp)
  1865. }
  1866. func ExampleRDS_ModifyDBClusterSnapshotAttribute() {
  1867. sess, err := session.NewSession()
  1868. if err != nil {
  1869. fmt.Println("failed to create session,", err)
  1870. return
  1871. }
  1872. svc := rds.New(sess)
  1873. params := &rds.ModifyDBClusterSnapshotAttributeInput{
  1874. AttributeName: aws.String("String"), // Required
  1875. DBClusterSnapshotIdentifier: aws.String("String"), // Required
  1876. ValuesToAdd: []*string{
  1877. aws.String("String"), // Required
  1878. // More values...
  1879. },
  1880. ValuesToRemove: []*string{
  1881. aws.String("String"), // Required
  1882. // More values...
  1883. },
  1884. }
  1885. resp, err := svc.ModifyDBClusterSnapshotAttribute(params)
  1886. if err != nil {
  1887. // Print the error, cast err to awserr.Error to get the Code and
  1888. // Message from an error.
  1889. fmt.Println(err.Error())
  1890. return
  1891. }
  1892. // Pretty-print the response data.
  1893. fmt.Println(resp)
  1894. }
  1895. func ExampleRDS_ModifyDBInstance() {
  1896. sess, err := session.NewSession()
  1897. if err != nil {
  1898. fmt.Println("failed to create session,", err)
  1899. return
  1900. }
  1901. svc := rds.New(sess)
  1902. params := &rds.ModifyDBInstanceInput{
  1903. DBInstanceIdentifier: aws.String("String"), // Required
  1904. AllocatedStorage: aws.Int64(1),
  1905. AllowMajorVersionUpgrade: aws.Bool(true),
  1906. ApplyImmediately: aws.Bool(true),
  1907. AutoMinorVersionUpgrade: aws.Bool(true),
  1908. BackupRetentionPeriod: aws.Int64(1),
  1909. CACertificateIdentifier: aws.String("String"),
  1910. CopyTagsToSnapshot: aws.Bool(true),
  1911. DBInstanceClass: aws.String("String"),
  1912. DBParameterGroupName: aws.String("String"),
  1913. DBPortNumber: aws.Int64(1),
  1914. DBSecurityGroups: []*string{
  1915. aws.String("String"), // Required
  1916. // More values...
  1917. },
  1918. DBSubnetGroupName: aws.String("String"),
  1919. Domain: aws.String("String"),
  1920. DomainIAMRoleName: aws.String("String"),
  1921. EngineVersion: aws.String("String"),
  1922. Iops: aws.Int64(1),
  1923. LicenseModel: aws.String("String"),
  1924. MasterUserPassword: aws.String("String"),
  1925. MonitoringInterval: aws.Int64(1),
  1926. MonitoringRoleArn: aws.String("String"),
  1927. MultiAZ: aws.Bool(true),
  1928. NewDBInstanceIdentifier: aws.String("String"),
  1929. OptionGroupName: aws.String("String"),
  1930. PreferredBackupWindow: aws.String("String"),
  1931. PreferredMaintenanceWindow: aws.String("String"),
  1932. PromotionTier: aws.Int64(1),
  1933. PubliclyAccessible: aws.Bool(true),
  1934. StorageType: aws.String("String"),
  1935. TdeCredentialArn: aws.String("String"),
  1936. TdeCredentialPassword: aws.String("String"),
  1937. VpcSecurityGroupIds: []*string{
  1938. aws.String("String"), // Required
  1939. // More values...
  1940. },
  1941. }
  1942. resp, err := svc.ModifyDBInstance(params)
  1943. if err != nil {
  1944. // Print the error, cast err to awserr.Error to get the Code and
  1945. // Message from an error.
  1946. fmt.Println(err.Error())
  1947. return
  1948. }
  1949. // Pretty-print the response data.
  1950. fmt.Println(resp)
  1951. }
  1952. func ExampleRDS_ModifyDBParameterGroup() {
  1953. sess, err := session.NewSession()
  1954. if err != nil {
  1955. fmt.Println("failed to create session,", err)
  1956. return
  1957. }
  1958. svc := rds.New(sess)
  1959. params := &rds.ModifyDBParameterGroupInput{
  1960. DBParameterGroupName: aws.String("String"), // Required
  1961. Parameters: []*rds.Parameter{ // Required
  1962. { // Required
  1963. AllowedValues: aws.String("String"),
  1964. ApplyMethod: aws.String("ApplyMethod"),
  1965. ApplyType: aws.String("String"),
  1966. DataType: aws.String("String"),
  1967. Description: aws.String("String"),
  1968. IsModifiable: aws.Bool(true),
  1969. MinimumEngineVersion: aws.String("String"),
  1970. ParameterName: aws.String("String"),
  1971. ParameterValue: aws.String("String"),
  1972. Source: aws.String("String"),
  1973. },
  1974. // More values...
  1975. },
  1976. }
  1977. resp, err := svc.ModifyDBParameterGroup(params)
  1978. if err != nil {
  1979. // Print the error, cast err to awserr.Error to get the Code and
  1980. // Message from an error.
  1981. fmt.Println(err.Error())
  1982. return
  1983. }
  1984. // Pretty-print the response data.
  1985. fmt.Println(resp)
  1986. }
  1987. func ExampleRDS_ModifyDBSnapshotAttribute() {
  1988. sess, err := session.NewSession()
  1989. if err != nil {
  1990. fmt.Println("failed to create session,", err)
  1991. return
  1992. }
  1993. svc := rds.New(sess)
  1994. params := &rds.ModifyDBSnapshotAttributeInput{
  1995. AttributeName: aws.String("String"), // Required
  1996. DBSnapshotIdentifier: aws.String("String"), // Required
  1997. ValuesToAdd: []*string{
  1998. aws.String("String"), // Required
  1999. // More values...
  2000. },
  2001. ValuesToRemove: []*string{
  2002. aws.String("String"), // Required
  2003. // More values...
  2004. },
  2005. }
  2006. resp, err := svc.ModifyDBSnapshotAttribute(params)
  2007. if err != nil {
  2008. // Print the error, cast err to awserr.Error to get the Code and
  2009. // Message from an error.
  2010. fmt.Println(err.Error())
  2011. return
  2012. }
  2013. // Pretty-print the response data.
  2014. fmt.Println(resp)
  2015. }
  2016. func ExampleRDS_ModifyDBSubnetGroup() {
  2017. sess, err := session.NewSession()
  2018. if err != nil {
  2019. fmt.Println("failed to create session,", err)
  2020. return
  2021. }
  2022. svc := rds.New(sess)
  2023. params := &rds.ModifyDBSubnetGroupInput{
  2024. DBSubnetGroupName: aws.String("String"), // Required
  2025. SubnetIds: []*string{ // Required
  2026. aws.String("String"), // Required
  2027. // More values...
  2028. },
  2029. DBSubnetGroupDescription: aws.String("String"),
  2030. }
  2031. resp, err := svc.ModifyDBSubnetGroup(params)
  2032. if err != nil {
  2033. // Print the error, cast err to awserr.Error to get the Code and
  2034. // Message from an error.
  2035. fmt.Println(err.Error())
  2036. return
  2037. }
  2038. // Pretty-print the response data.
  2039. fmt.Println(resp)
  2040. }
  2041. func ExampleRDS_ModifyEventSubscription() {
  2042. sess, err := session.NewSession()
  2043. if err != nil {
  2044. fmt.Println("failed to create session,", err)
  2045. return
  2046. }
  2047. svc := rds.New(sess)
  2048. params := &rds.ModifyEventSubscriptionInput{
  2049. SubscriptionName: aws.String("String"), // Required
  2050. Enabled: aws.Bool(true),
  2051. EventCategories: []*string{
  2052. aws.String("String"), // Required
  2053. // More values...
  2054. },
  2055. SnsTopicArn: aws.String("String"),
  2056. SourceType: aws.String("String"),
  2057. }
  2058. resp, err := svc.ModifyEventSubscription(params)
  2059. if err != nil {
  2060. // Print the error, cast err to awserr.Error to get the Code and
  2061. // Message from an error.
  2062. fmt.Println(err.Error())
  2063. return
  2064. }
  2065. // Pretty-print the response data.
  2066. fmt.Println(resp)
  2067. }
  2068. func ExampleRDS_ModifyOptionGroup() {
  2069. sess, err := session.NewSession()
  2070. if err != nil {
  2071. fmt.Println("failed to create session,", err)
  2072. return
  2073. }
  2074. svc := rds.New(sess)
  2075. params := &rds.ModifyOptionGroupInput{
  2076. OptionGroupName: aws.String("String"), // Required
  2077. ApplyImmediately: aws.Bool(true),
  2078. OptionsToInclude: []*rds.OptionConfiguration{
  2079. { // Required
  2080. OptionName: aws.String("String"), // Required
  2081. DBSecurityGroupMemberships: []*string{
  2082. aws.String("String"), // Required
  2083. // More values...
  2084. },
  2085. OptionSettings: []*rds.OptionSetting{
  2086. { // Required
  2087. AllowedValues: aws.String("String"),
  2088. ApplyType: aws.String("String"),
  2089. DataType: aws.String("String"),
  2090. DefaultValue: aws.String("String"),
  2091. Description: aws.String("String"),
  2092. IsCollection: aws.Bool(true),
  2093. IsModifiable: aws.Bool(true),
  2094. Name: aws.String("String"),
  2095. Value: aws.String("String"),
  2096. },
  2097. // More values...
  2098. },
  2099. OptionVersion: aws.String("String"),
  2100. Port: aws.Int64(1),
  2101. VpcSecurityGroupMemberships: []*string{
  2102. aws.String("String"), // Required
  2103. // More values...
  2104. },
  2105. },
  2106. // More values...
  2107. },
  2108. OptionsToRemove: []*string{
  2109. aws.String("String"), // Required
  2110. // More values...
  2111. },
  2112. }
  2113. resp, err := svc.ModifyOptionGroup(params)
  2114. if err != nil {
  2115. // Print the error, cast err to awserr.Error to get the Code and
  2116. // Message from an error.
  2117. fmt.Println(err.Error())
  2118. return
  2119. }
  2120. // Pretty-print the response data.
  2121. fmt.Println(resp)
  2122. }
  2123. func ExampleRDS_PromoteReadReplica() {
  2124. sess, err := session.NewSession()
  2125. if err != nil {
  2126. fmt.Println("failed to create session,", err)
  2127. return
  2128. }
  2129. svc := rds.New(sess)
  2130. params := &rds.PromoteReadReplicaInput{
  2131. DBInstanceIdentifier: aws.String("String"), // Required
  2132. BackupRetentionPeriod: aws.Int64(1),
  2133. PreferredBackupWindow: aws.String("String"),
  2134. }
  2135. resp, err := svc.PromoteReadReplica(params)
  2136. if err != nil {
  2137. // Print the error, cast err to awserr.Error to get the Code and
  2138. // Message from an error.
  2139. fmt.Println(err.Error())
  2140. return
  2141. }
  2142. // Pretty-print the response data.
  2143. fmt.Println(resp)
  2144. }
  2145. func ExampleRDS_PromoteReadReplicaDBCluster() {
  2146. sess, err := session.NewSession()
  2147. if err != nil {
  2148. fmt.Println("failed to create session,", err)
  2149. return
  2150. }
  2151. svc := rds.New(sess)
  2152. params := &rds.PromoteReadReplicaDBClusterInput{
  2153. DBClusterIdentifier: aws.String("String"), // Required
  2154. }
  2155. resp, err := svc.PromoteReadReplicaDBCluster(params)
  2156. if err != nil {
  2157. // Print the error, cast err to awserr.Error to get the Code and
  2158. // Message from an error.
  2159. fmt.Println(err.Error())
  2160. return
  2161. }
  2162. // Pretty-print the response data.
  2163. fmt.Println(resp)
  2164. }
  2165. func ExampleRDS_PurchaseReservedDBInstancesOffering() {
  2166. sess, err := session.NewSession()
  2167. if err != nil {
  2168. fmt.Println("failed to create session,", err)
  2169. return
  2170. }
  2171. svc := rds.New(sess)
  2172. params := &rds.PurchaseReservedDBInstancesOfferingInput{
  2173. ReservedDBInstancesOfferingId: aws.String("String"), // Required
  2174. DBInstanceCount: aws.Int64(1),
  2175. ReservedDBInstanceId: aws.String("String"),
  2176. Tags: []*rds.Tag{
  2177. { // Required
  2178. Key: aws.String("String"),
  2179. Value: aws.String("String"),
  2180. },
  2181. // More values...
  2182. },
  2183. }
  2184. resp, err := svc.PurchaseReservedDBInstancesOffering(params)
  2185. if err != nil {
  2186. // Print the error, cast err to awserr.Error to get the Code and
  2187. // Message from an error.
  2188. fmt.Println(err.Error())
  2189. return
  2190. }
  2191. // Pretty-print the response data.
  2192. fmt.Println(resp)
  2193. }
  2194. func ExampleRDS_RebootDBInstance() {
  2195. sess, err := session.NewSession()
  2196. if err != nil {
  2197. fmt.Println("failed to create session,", err)
  2198. return
  2199. }
  2200. svc := rds.New(sess)
  2201. params := &rds.RebootDBInstanceInput{
  2202. DBInstanceIdentifier: aws.String("String"), // Required
  2203. ForceFailover: aws.Bool(true),
  2204. }
  2205. resp, err := svc.RebootDBInstance(params)
  2206. if err != nil {
  2207. // Print the error, cast err to awserr.Error to get the Code and
  2208. // Message from an error.
  2209. fmt.Println(err.Error())
  2210. return
  2211. }
  2212. // Pretty-print the response data.
  2213. fmt.Println(resp)
  2214. }
  2215. func ExampleRDS_RemoveSourceIdentifierFromSubscription() {
  2216. sess, err := session.NewSession()
  2217. if err != nil {
  2218. fmt.Println("failed to create session,", err)
  2219. return
  2220. }
  2221. svc := rds.New(sess)
  2222. params := &rds.RemoveSourceIdentifierFromSubscriptionInput{
  2223. SourceIdentifier: aws.String("String"), // Required
  2224. SubscriptionName: aws.String("String"), // Required
  2225. }
  2226. resp, err := svc.RemoveSourceIdentifierFromSubscription(params)
  2227. if err != nil {
  2228. // Print the error, cast err to awserr.Error to get the Code and
  2229. // Message from an error.
  2230. fmt.Println(err.Error())
  2231. return
  2232. }
  2233. // Pretty-print the response data.
  2234. fmt.Println(resp)
  2235. }
  2236. func ExampleRDS_RemoveTagsFromResource() {
  2237. sess, err := session.NewSession()
  2238. if err != nil {
  2239. fmt.Println("failed to create session,", err)
  2240. return
  2241. }
  2242. svc := rds.New(sess)
  2243. params := &rds.RemoveTagsFromResourceInput{
  2244. ResourceName: aws.String("String"), // Required
  2245. TagKeys: []*string{ // Required
  2246. aws.String("String"), // Required
  2247. // More values...
  2248. },
  2249. }
  2250. resp, err := svc.RemoveTagsFromResource(params)
  2251. if err != nil {
  2252. // Print the error, cast err to awserr.Error to get the Code and
  2253. // Message from an error.
  2254. fmt.Println(err.Error())
  2255. return
  2256. }
  2257. // Pretty-print the response data.
  2258. fmt.Println(resp)
  2259. }
  2260. func ExampleRDS_ResetDBClusterParameterGroup() {
  2261. sess, err := session.NewSession()
  2262. if err != nil {
  2263. fmt.Println("failed to create session,", err)
  2264. return
  2265. }
  2266. svc := rds.New(sess)
  2267. params := &rds.ResetDBClusterParameterGroupInput{
  2268. DBClusterParameterGroupName: aws.String("String"), // Required
  2269. Parameters: []*rds.Parameter{
  2270. { // Required
  2271. AllowedValues: aws.String("String"),
  2272. ApplyMethod: aws.String("ApplyMethod"),
  2273. ApplyType: aws.String("String"),
  2274. DataType: aws.String("String"),
  2275. Description: aws.String("String"),
  2276. IsModifiable: aws.Bool(true),
  2277. MinimumEngineVersion: aws.String("String"),
  2278. ParameterName: aws.String("String"),
  2279. ParameterValue: aws.String("String"),
  2280. Source: aws.String("String"),
  2281. },
  2282. // More values...
  2283. },
  2284. ResetAllParameters: aws.Bool(true),
  2285. }
  2286. resp, err := svc.ResetDBClusterParameterGroup(params)
  2287. if err != nil {
  2288. // Print the error, cast err to awserr.Error to get the Code and
  2289. // Message from an error.
  2290. fmt.Println(err.Error())
  2291. return
  2292. }
  2293. // Pretty-print the response data.
  2294. fmt.Println(resp)
  2295. }
  2296. func ExampleRDS_ResetDBParameterGroup() {
  2297. sess, err := session.NewSession()
  2298. if err != nil {
  2299. fmt.Println("failed to create session,", err)
  2300. return
  2301. }
  2302. svc := rds.New(sess)
  2303. params := &rds.ResetDBParameterGroupInput{
  2304. DBParameterGroupName: aws.String("String"), // Required
  2305. Parameters: []*rds.Parameter{
  2306. { // Required
  2307. AllowedValues: aws.String("String"),
  2308. ApplyMethod: aws.String("ApplyMethod"),
  2309. ApplyType: aws.String("String"),
  2310. DataType: aws.String("String"),
  2311. Description: aws.String("String"),
  2312. IsModifiable: aws.Bool(true),
  2313. MinimumEngineVersion: aws.String("String"),
  2314. ParameterName: aws.String("String"),
  2315. ParameterValue: aws.String("String"),
  2316. Source: aws.String("String"),
  2317. },
  2318. // More values...
  2319. },
  2320. ResetAllParameters: aws.Bool(true),
  2321. }
  2322. resp, err := svc.ResetDBParameterGroup(params)
  2323. if err != nil {
  2324. // Print the error, cast err to awserr.Error to get the Code and
  2325. // Message from an error.
  2326. fmt.Println(err.Error())
  2327. return
  2328. }
  2329. // Pretty-print the response data.
  2330. fmt.Println(resp)
  2331. }
  2332. func ExampleRDS_RestoreDBClusterFromS3() {
  2333. sess, err := session.NewSession()
  2334. if err != nil {
  2335. fmt.Println("failed to create session,", err)
  2336. return
  2337. }
  2338. svc := rds.New(sess)
  2339. params := &rds.RestoreDBClusterFromS3Input{
  2340. DBClusterIdentifier: aws.String("String"), // Required
  2341. Engine: aws.String("String"), // Required
  2342. MasterUserPassword: aws.String("String"), // Required
  2343. MasterUsername: aws.String("String"), // Required
  2344. S3BucketName: aws.String("String"), // Required
  2345. S3IngestionRoleArn: aws.String("String"), // Required
  2346. SourceEngine: aws.String("String"), // Required
  2347. SourceEngineVersion: aws.String("String"), // Required
  2348. AvailabilityZones: []*string{
  2349. aws.String("String"), // Required
  2350. // More values...
  2351. },
  2352. BackupRetentionPeriod: aws.Int64(1),
  2353. CharacterSetName: aws.String("String"),
  2354. DBClusterParameterGroupName: aws.String("String"),
  2355. DBSubnetGroupName: aws.String("String"),
  2356. DatabaseName: aws.String("String"),
  2357. EngineVersion: aws.String("String"),
  2358. KmsKeyId: aws.String("String"),
  2359. OptionGroupName: aws.String("String"),
  2360. Port: aws.Int64(1),
  2361. PreferredBackupWindow: aws.String("String"),
  2362. PreferredMaintenanceWindow: aws.String("String"),
  2363. S3Prefix: aws.String("String"),
  2364. StorageEncrypted: aws.Bool(true),
  2365. Tags: []*rds.Tag{
  2366. { // Required
  2367. Key: aws.String("String"),
  2368. Value: aws.String("String"),
  2369. },
  2370. // More values...
  2371. },
  2372. VpcSecurityGroupIds: []*string{
  2373. aws.String("String"), // Required
  2374. // More values...
  2375. },
  2376. }
  2377. resp, err := svc.RestoreDBClusterFromS3(params)
  2378. if err != nil {
  2379. // Print the error, cast err to awserr.Error to get the Code and
  2380. // Message from an error.
  2381. fmt.Println(err.Error())
  2382. return
  2383. }
  2384. // Pretty-print the response data.
  2385. fmt.Println(resp)
  2386. }
  2387. func ExampleRDS_RestoreDBClusterFromSnapshot() {
  2388. sess, err := session.NewSession()
  2389. if err != nil {
  2390. fmt.Println("failed to create session,", err)
  2391. return
  2392. }
  2393. svc := rds.New(sess)
  2394. params := &rds.RestoreDBClusterFromSnapshotInput{
  2395. DBClusterIdentifier: aws.String("String"), // Required
  2396. Engine: aws.String("String"), // Required
  2397. SnapshotIdentifier: aws.String("String"), // Required
  2398. AvailabilityZones: []*string{
  2399. aws.String("String"), // Required
  2400. // More values...
  2401. },
  2402. DBSubnetGroupName: aws.String("String"),
  2403. DatabaseName: aws.String("String"),
  2404. EngineVersion: aws.String("String"),
  2405. KmsKeyId: aws.String("String"),
  2406. OptionGroupName: aws.String("String"),
  2407. Port: aws.Int64(1),
  2408. Tags: []*rds.Tag{
  2409. { // Required
  2410. Key: aws.String("String"),
  2411. Value: aws.String("String"),
  2412. },
  2413. // More values...
  2414. },
  2415. VpcSecurityGroupIds: []*string{
  2416. aws.String("String"), // Required
  2417. // More values...
  2418. },
  2419. }
  2420. resp, err := svc.RestoreDBClusterFromSnapshot(params)
  2421. if err != nil {
  2422. // Print the error, cast err to awserr.Error to get the Code and
  2423. // Message from an error.
  2424. fmt.Println(err.Error())
  2425. return
  2426. }
  2427. // Pretty-print the response data.
  2428. fmt.Println(resp)
  2429. }
  2430. func ExampleRDS_RestoreDBClusterToPointInTime() {
  2431. sess, err := session.NewSession()
  2432. if err != nil {
  2433. fmt.Println("failed to create session,", err)
  2434. return
  2435. }
  2436. svc := rds.New(sess)
  2437. params := &rds.RestoreDBClusterToPointInTimeInput{
  2438. DBClusterIdentifier: aws.String("String"), // Required
  2439. SourceDBClusterIdentifier: aws.String("String"), // Required
  2440. DBSubnetGroupName: aws.String("String"),
  2441. KmsKeyId: aws.String("String"),
  2442. OptionGroupName: aws.String("String"),
  2443. Port: aws.Int64(1),
  2444. RestoreToTime: aws.Time(time.Now()),
  2445. Tags: []*rds.Tag{
  2446. { // Required
  2447. Key: aws.String("String"),
  2448. Value: aws.String("String"),
  2449. },
  2450. // More values...
  2451. },
  2452. UseLatestRestorableTime: aws.Bool(true),
  2453. VpcSecurityGroupIds: []*string{
  2454. aws.String("String"), // Required
  2455. // More values...
  2456. },
  2457. }
  2458. resp, err := svc.RestoreDBClusterToPointInTime(params)
  2459. if err != nil {
  2460. // Print the error, cast err to awserr.Error to get the Code and
  2461. // Message from an error.
  2462. fmt.Println(err.Error())
  2463. return
  2464. }
  2465. // Pretty-print the response data.
  2466. fmt.Println(resp)
  2467. }
  2468. func ExampleRDS_RestoreDBInstanceFromDBSnapshot() {
  2469. sess, err := session.NewSession()
  2470. if err != nil {
  2471. fmt.Println("failed to create session,", err)
  2472. return
  2473. }
  2474. svc := rds.New(sess)
  2475. params := &rds.RestoreDBInstanceFromDBSnapshotInput{
  2476. DBInstanceIdentifier: aws.String("String"), // Required
  2477. DBSnapshotIdentifier: aws.String("String"), // Required
  2478. AutoMinorVersionUpgrade: aws.Bool(true),
  2479. AvailabilityZone: aws.String("String"),
  2480. CopyTagsToSnapshot: aws.Bool(true),
  2481. DBInstanceClass: aws.String("String"),
  2482. DBName: aws.String("String"),
  2483. DBSubnetGroupName: aws.String("String"),
  2484. Domain: aws.String("String"),
  2485. DomainIAMRoleName: aws.String("String"),
  2486. Engine: aws.String("String"),
  2487. Iops: aws.Int64(1),
  2488. LicenseModel: aws.String("String"),
  2489. MultiAZ: aws.Bool(true),
  2490. OptionGroupName: aws.String("String"),
  2491. Port: aws.Int64(1),
  2492. PubliclyAccessible: aws.Bool(true),
  2493. StorageType: aws.String("String"),
  2494. Tags: []*rds.Tag{
  2495. { // Required
  2496. Key: aws.String("String"),
  2497. Value: aws.String("String"),
  2498. },
  2499. // More values...
  2500. },
  2501. TdeCredentialArn: aws.String("String"),
  2502. TdeCredentialPassword: aws.String("String"),
  2503. }
  2504. resp, err := svc.RestoreDBInstanceFromDBSnapshot(params)
  2505. if err != nil {
  2506. // Print the error, cast err to awserr.Error to get the Code and
  2507. // Message from an error.
  2508. fmt.Println(err.Error())
  2509. return
  2510. }
  2511. // Pretty-print the response data.
  2512. fmt.Println(resp)
  2513. }
  2514. func ExampleRDS_RestoreDBInstanceToPointInTime() {
  2515. sess, err := session.NewSession()
  2516. if err != nil {
  2517. fmt.Println("failed to create session,", err)
  2518. return
  2519. }
  2520. svc := rds.New(sess)
  2521. params := &rds.RestoreDBInstanceToPointInTimeInput{
  2522. SourceDBInstanceIdentifier: aws.String("String"), // Required
  2523. TargetDBInstanceIdentifier: aws.String("String"), // Required
  2524. AutoMinorVersionUpgrade: aws.Bool(true),
  2525. AvailabilityZone: aws.String("String"),
  2526. CopyTagsToSnapshot: aws.Bool(true),
  2527. DBInstanceClass: aws.String("String"),
  2528. DBName: aws.String("String"),
  2529. DBSubnetGroupName: aws.String("String"),
  2530. Domain: aws.String("String"),
  2531. DomainIAMRoleName: aws.String("String"),
  2532. Engine: aws.String("String"),
  2533. Iops: aws.Int64(1),
  2534. LicenseModel: aws.String("String"),
  2535. MultiAZ: aws.Bool(true),
  2536. OptionGroupName: aws.String("String"),
  2537. Port: aws.Int64(1),
  2538. PubliclyAccessible: aws.Bool(true),
  2539. RestoreTime: aws.Time(time.Now()),
  2540. StorageType: aws.String("String"),
  2541. Tags: []*rds.Tag{
  2542. { // Required
  2543. Key: aws.String("String"),
  2544. Value: aws.String("String"),
  2545. },
  2546. // More values...
  2547. },
  2548. TdeCredentialArn: aws.String("String"),
  2549. TdeCredentialPassword: aws.String("String"),
  2550. UseLatestRestorableTime: aws.Bool(true),
  2551. }
  2552. resp, err := svc.RestoreDBInstanceToPointInTime(params)
  2553. if err != nil {
  2554. // Print the error, cast err to awserr.Error to get the Code and
  2555. // Message from an error.
  2556. fmt.Println(err.Error())
  2557. return
  2558. }
  2559. // Pretty-print the response data.
  2560. fmt.Println(resp)
  2561. }
  2562. func ExampleRDS_RevokeDBSecurityGroupIngress() {
  2563. sess, err := session.NewSession()
  2564. if err != nil {
  2565. fmt.Println("failed to create session,", err)
  2566. return
  2567. }
  2568. svc := rds.New(sess)
  2569. params := &rds.RevokeDBSecurityGroupIngressInput{
  2570. DBSecurityGroupName: aws.String("String"), // Required
  2571. CIDRIP: aws.String("String"),
  2572. EC2SecurityGroupId: aws.String("String"),
  2573. EC2SecurityGroupName: aws.String("String"),
  2574. EC2SecurityGroupOwnerId: aws.String("String"),
  2575. }
  2576. resp, err := svc.RevokeDBSecurityGroupIngress(params)
  2577. if err != nil {
  2578. // Print the error, cast err to awserr.Error to get the Code and
  2579. // Message from an error.
  2580. fmt.Println(err.Error())
  2581. return
  2582. }
  2583. // Pretty-print the response data.
  2584. fmt.Println(resp)
  2585. }