1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- package databasemigrationservice_test
- import (
- "bytes"
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/databasemigrationservice"
- )
- var _ time.Duration
- var _ bytes.Buffer
- func ExampleDatabaseMigrationService_AddTagsToResource() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.AddTagsToResourceInput{
- ResourceArn: aws.String("String"), // Required
- Tags: []*databasemigrationservice.Tag{ // Required
- { // Required
- Key: aws.String("String"),
- Value: aws.String("String"),
- },
- // More values...
- },
- }
- resp, err := svc.AddTagsToResource(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_CreateEndpoint() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.CreateEndpointInput{
- EndpointIdentifier: aws.String("String"), // Required
- EndpointType: aws.String("ReplicationEndpointTypeValue"), // Required
- EngineName: aws.String("String"), // Required
- Password: aws.String("SecretString"), // Required
- Port: aws.Int64(1), // Required
- ServerName: aws.String("String"), // Required
- Username: aws.String("String"), // Required
- CertificateArn: aws.String("String"),
- DatabaseName: aws.String("String"),
- ExtraConnectionAttributes: aws.String("String"),
- KmsKeyId: aws.String("String"),
- SslMode: aws.String("DmsSslModeValue"),
- Tags: []*databasemigrationservice.Tag{
- { // Required
- Key: aws.String("String"),
- Value: aws.String("String"),
- },
- // More values...
- },
- }
- resp, err := svc.CreateEndpoint(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_CreateReplicationInstance() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.CreateReplicationInstanceInput{
- ReplicationInstanceClass: aws.String("String"), // Required
- ReplicationInstanceIdentifier: aws.String("String"), // Required
- AllocatedStorage: aws.Int64(1),
- AutoMinorVersionUpgrade: aws.Bool(true),
- AvailabilityZone: aws.String("String"),
- EngineVersion: aws.String("String"),
- KmsKeyId: aws.String("String"),
- MultiAZ: aws.Bool(true),
- PreferredMaintenanceWindow: aws.String("String"),
- PubliclyAccessible: aws.Bool(true),
- ReplicationSubnetGroupIdentifier: aws.String("String"),
- Tags: []*databasemigrationservice.Tag{
- { // Required
- Key: aws.String("String"),
- Value: aws.String("String"),
- },
- // More values...
- },
- VpcSecurityGroupIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.CreateReplicationInstance(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_CreateReplicationSubnetGroup() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.CreateReplicationSubnetGroupInput{
- ReplicationSubnetGroupDescription: aws.String("String"), // Required
- ReplicationSubnetGroupIdentifier: aws.String("String"), // Required
- SubnetIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- Tags: []*databasemigrationservice.Tag{
- { // Required
- Key: aws.String("String"),
- Value: aws.String("String"),
- },
- // More values...
- },
- }
- resp, err := svc.CreateReplicationSubnetGroup(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_CreateReplicationTask() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.CreateReplicationTaskInput{
- MigrationType: aws.String("MigrationTypeValue"), // Required
- ReplicationInstanceArn: aws.String("String"), // Required
- ReplicationTaskIdentifier: aws.String("String"), // Required
- SourceEndpointArn: aws.String("String"), // Required
- TableMappings: aws.String("String"), // Required
- TargetEndpointArn: aws.String("String"), // Required
- CdcStartTime: aws.Time(time.Now()),
- ReplicationTaskSettings: aws.String("String"),
- Tags: []*databasemigrationservice.Tag{
- { // Required
- Key: aws.String("String"),
- Value: aws.String("String"),
- },
- // More values...
- },
- }
- resp, err := svc.CreateReplicationTask(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DeleteCertificate() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DeleteCertificateInput{
- CertificateArn: aws.String("String"), // Required
- }
- resp, err := svc.DeleteCertificate(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DeleteEndpoint() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DeleteEndpointInput{
- EndpointArn: aws.String("String"), // Required
- }
- resp, err := svc.DeleteEndpoint(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DeleteReplicationInstance() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DeleteReplicationInstanceInput{
- ReplicationInstanceArn: aws.String("String"), // Required
- }
- resp, err := svc.DeleteReplicationInstance(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DeleteReplicationSubnetGroup() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DeleteReplicationSubnetGroupInput{
- ReplicationSubnetGroupIdentifier: aws.String("String"), // Required
- }
- resp, err := svc.DeleteReplicationSubnetGroup(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DeleteReplicationTask() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DeleteReplicationTaskInput{
- ReplicationTaskArn: aws.String("String"), // Required
- }
- resp, err := svc.DeleteReplicationTask(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeAccountAttributes() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- var params *databasemigrationservice.DescribeAccountAttributesInput
- resp, err := svc.DescribeAccountAttributes(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeCertificates() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeCertificatesInput{
- Filters: []*databasemigrationservice.Filter{
- { // Required
- Name: aws.String("String"), // Required
- Values: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeCertificates(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeConnections() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeConnectionsInput{
- Filters: []*databasemigrationservice.Filter{
- { // Required
- Name: aws.String("String"), // Required
- Values: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeConnections(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeEndpointTypes() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeEndpointTypesInput{
- Filters: []*databasemigrationservice.Filter{
- { // Required
- Name: aws.String("String"), // Required
- Values: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeEndpointTypes(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeEndpoints() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeEndpointsInput{
- Filters: []*databasemigrationservice.Filter{
- { // Required
- Name: aws.String("String"), // Required
- Values: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeEndpoints(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeOrderableReplicationInstances() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeOrderableReplicationInstancesInput{
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeOrderableReplicationInstances(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeRefreshSchemasStatus() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeRefreshSchemasStatusInput{
- EndpointArn: aws.String("String"), // Required
- }
- resp, err := svc.DescribeRefreshSchemasStatus(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeReplicationInstances() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeReplicationInstancesInput{
- Filters: []*databasemigrationservice.Filter{
- { // Required
- Name: aws.String("String"), // Required
- Values: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeReplicationInstances(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeReplicationSubnetGroups() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeReplicationSubnetGroupsInput{
- Filters: []*databasemigrationservice.Filter{
- { // Required
- Name: aws.String("String"), // Required
- Values: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeReplicationSubnetGroups(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeReplicationTasks() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeReplicationTasksInput{
- Filters: []*databasemigrationservice.Filter{
- { // Required
- Name: aws.String("String"), // Required
- Values: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeReplicationTasks(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeSchemas() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeSchemasInput{
- EndpointArn: aws.String("String"), // Required
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeSchemas(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_DescribeTableStatistics() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.DescribeTableStatisticsInput{
- ReplicationTaskArn: aws.String("String"), // Required
- Marker: aws.String("String"),
- MaxRecords: aws.Int64(1),
- }
- resp, err := svc.DescribeTableStatistics(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_ImportCertificate() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.ImportCertificateInput{
- CertificateIdentifier: aws.String("String"), // Required
- CertificatePem: aws.String("String"),
- }
- resp, err := svc.ImportCertificate(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_ListTagsForResource() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.ListTagsForResourceInput{
- ResourceArn: aws.String("String"), // Required
- }
- resp, err := svc.ListTagsForResource(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_ModifyEndpoint() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.ModifyEndpointInput{
- EndpointArn: aws.String("String"), // Required
- CertificateArn: aws.String("String"),
- DatabaseName: aws.String("String"),
- EndpointIdentifier: aws.String("String"),
- EndpointType: aws.String("ReplicationEndpointTypeValue"),
- EngineName: aws.String("String"),
- ExtraConnectionAttributes: aws.String("String"),
- Password: aws.String("SecretString"),
- Port: aws.Int64(1),
- ServerName: aws.String("String"),
- SslMode: aws.String("DmsSslModeValue"),
- Username: aws.String("String"),
- }
- resp, err := svc.ModifyEndpoint(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_ModifyReplicationInstance() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.ModifyReplicationInstanceInput{
- ReplicationInstanceArn: aws.String("String"), // Required
- AllocatedStorage: aws.Int64(1),
- AllowMajorVersionUpgrade: aws.Bool(true),
- ApplyImmediately: aws.Bool(true),
- AutoMinorVersionUpgrade: aws.Bool(true),
- EngineVersion: aws.String("String"),
- MultiAZ: aws.Bool(true),
- PreferredMaintenanceWindow: aws.String("String"),
- ReplicationInstanceClass: aws.String("String"),
- ReplicationInstanceIdentifier: aws.String("String"),
- VpcSecurityGroupIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.ModifyReplicationInstance(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_ModifyReplicationSubnetGroup() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.ModifyReplicationSubnetGroupInput{
- ReplicationSubnetGroupIdentifier: aws.String("String"), // Required
- SubnetIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- ReplicationSubnetGroupDescription: aws.String("String"),
- }
- resp, err := svc.ModifyReplicationSubnetGroup(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_RefreshSchemas() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.RefreshSchemasInput{
- EndpointArn: aws.String("String"), // Required
- ReplicationInstanceArn: aws.String("String"), // Required
- }
- resp, err := svc.RefreshSchemas(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_RemoveTagsFromResource() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.RemoveTagsFromResourceInput{
- ResourceArn: aws.String("String"), // Required
- TagKeys: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.RemoveTagsFromResource(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_StartReplicationTask() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.StartReplicationTaskInput{
- ReplicationTaskArn: aws.String("String"), // Required
- StartReplicationTaskType: aws.String("StartReplicationTaskTypeValue"), // Required
- CdcStartTime: aws.Time(time.Now()),
- }
- resp, err := svc.StartReplicationTask(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_StopReplicationTask() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.StopReplicationTaskInput{
- ReplicationTaskArn: aws.String("String"), // Required
- }
- resp, err := svc.StopReplicationTask(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
- func ExampleDatabaseMigrationService_TestConnection() {
- sess, err := session.NewSession()
- if err != nil {
- fmt.Println("failed to create session,", err)
- return
- }
- svc := databasemigrationservice.New(sess)
- params := &databasemigrationservice.TestConnectionInput{
- EndpointArn: aws.String("String"), // Required
- ReplicationInstanceArn: aws.String("String"), // Required
- }
- resp, err := svc.TestConnection(params)
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
- // Pretty-print the response data.
- fmt.Println(resp)
- }
|