• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang databasemigrationservice.New函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/aws/aws-sdk-go/service/databasemigrationservice.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了New函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: ExampleDatabaseMigrationService_AddTagsToResource

func ExampleDatabaseMigrationService_AddTagsToResource() {
	svc := databasemigrationservice.New(session.New())

	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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:25,代码来源:examples_test.go


示例2: ExampleDatabaseMigrationService_CreateReplicationTask

func ExampleDatabaseMigrationService_CreateReplicationTask() {
	svc := databasemigrationservice.New(session.New())

	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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:32,代码来源:examples_test.go


示例3: ExampleDatabaseMigrationService_TestConnection

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:25,代码来源:examples_test.go


示例4: ExampleDatabaseMigrationService_CreateReplicationInstance

func ExampleDatabaseMigrationService_CreateReplicationInstance() {
	svc := databasemigrationservice.New(session.New())

	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"),
		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...
		},
	}
	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)
}
开发者ID:cam-stitt,项目名称:aws-sdk-go,代码行数:34,代码来源:examples_test.go


示例5: ExampleDatabaseMigrationService_RemoveTagsFromResource

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:28,代码来源:examples_test.go


示例6: ExampleDatabaseMigrationService_StartReplicationTask

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:26,代码来源:examples_test.go


示例7: ExampleDatabaseMigrationService_ModifyEndpoint

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:35,代码来源:examples_test.go


示例8: ExampleDatabaseMigrationService_ModifyReplicationSubnetGroup

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:29,代码来源:examples_test.go


示例9: ExampleDatabaseMigrationService_DescribeTableStatistics

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:26,代码来源:examples_test.go


示例10: ExampleDatabaseMigrationService_ImportCertificate

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:25,代码来源:examples_test.go


示例11: ExampleDatabaseMigrationService_CreateReplicationSubnetGroup

func ExampleDatabaseMigrationService_CreateReplicationSubnetGroup() {
	svc := databasemigrationservice.New(session.New())

	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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:30,代码来源:examples_test.go


示例12: ExampleDatabaseMigrationService_DescribeReplicationTasks

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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:35,代码来源:examples_test.go


示例13: ExampleDatabaseMigrationService_ModifyReplicationInstance

func ExampleDatabaseMigrationService_ModifyReplicationInstance() {
	svc := databasemigrationservice.New(session.New())

	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"),
		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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:30,代码来源:examples_test.go


示例14: ExampleDatabaseMigrationService_CreateEndpoint

func ExampleDatabaseMigrationService_CreateEndpoint() {
	svc := databasemigrationservice.New(session.New())

	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
		DatabaseName:              aws.String("String"),
		ExtraConnectionAttributes: aws.String("String"),
		KmsKeyId:                  aws.String("String"),
		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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:34,代码来源:examples_test.go


示例15: ExampleDatabaseMigrationService_DescribeAccountAttributes

func ExampleDatabaseMigrationService_DescribeAccountAttributes() {
	svc := databasemigrationservice.New(session.New())

	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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go


示例16: ExampleDatabaseMigrationService_StopReplicationTask

func ExampleDatabaseMigrationService_StopReplicationTask() {
	svc := databasemigrationservice.New(session.New())

	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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go


示例17: ExampleDatabaseMigrationService_DescribeRefreshSchemasStatus

func ExampleDatabaseMigrationService_DescribeRefreshSchemasStatus() {
	svc := databasemigrationservice.New(session.New())

	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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go


示例18: ExampleDatabaseMigrationService_DescribeOrderableReplicationInstances

func ExampleDatabaseMigrationService_DescribeOrderableReplicationInstances() {
	svc := databasemigrationservice.New(session.New())

	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)
}
开发者ID:radeksimko,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go



注:本文中的github.com/aws/aws-sdk-go/service/databasemigrationservice.New函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang datapipeline.New函数代码示例发布时间:2022-05-24
下一篇:
Golang configservice.New函数代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap