本文整理汇总了Golang中github.com/datacratic/aws-sdk-go/service/rds.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleRDS_CopyDBParameterGroup
func ExampleRDS_CopyDBParameterGroup() {
svc := rds.New(nil)
params := &rds.CopyDBParameterGroupInput{
SourceDBParameterGroupIdentifier: aws.String("String"), // Required
TargetDBParameterGroupDescription: aws.String("String"), // Required
TargetDBParameterGroupIdentifier: aws.String("String"), // Required
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CopyDBParameterGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例2: ExampleRDS_CreateDBSnapshot
func ExampleRDS_CreateDBSnapshot() {
svc := rds.New(nil)
params := &rds.CreateDBSnapshotInput{
DBInstanceIdentifier: aws.String("String"), // Required
DBSnapshotIdentifier: aws.String("String"), // Required
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateDBSnapshot(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:27,代码来源:examples_test.go
示例3: ExampleRDS_ResetDBParameterGroup
func ExampleRDS_ResetDBParameterGroup() {
svc := rds.New(nil)
params := &rds.ResetDBParameterGroupInput{
DBParameterGroupName: aws.String("String"), // Required
Parameters: []*rds.Parameter{
&rds.Parameter{ // Required
AllowedValues: aws.String("String"),
ApplyMethod: aws.String("ApplyMethod"),
ApplyType: aws.String("String"),
DataType: aws.String("String"),
Description: aws.String("String"),
IsModifiable: aws.Boolean(true),
MinimumEngineVersion: aws.String("String"),
ParameterName: aws.String("String"),
ParameterValue: aws.String("String"),
Source: aws.String("String"),
},
// More values...
},
ResetAllParameters: aws.Boolean(true),
}
resp, err := svc.ResetDBParameterGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例4: ExampleRDS_PurchaseReservedDBInstancesOffering
func ExampleRDS_PurchaseReservedDBInstancesOffering() {
svc := rds.New(nil)
params := &rds.PurchaseReservedDBInstancesOfferingInput{
ReservedDBInstancesOfferingID: aws.String("String"), // Required
DBInstanceCount: aws.Long(1),
ReservedDBInstanceID: aws.String("String"),
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.PurchaseReservedDBInstancesOffering(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例5: ExampleRDS_AddTagsToResource
func ExampleRDS_AddTagsToResource() {
svc := rds.New(nil)
params := &rds.AddTagsToResourceInput{
ResourceName: aws.String("String"), // Required
Tags: []*rds.Tag{ // Required
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.AddTagsToResource(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:26,代码来源:examples_test.go
示例6: ExampleRDS_DescribeDBEngineVersions
func ExampleRDS_DescribeDBEngineVersions() {
svc := rds.New(nil)
params := &rds.DescribeDBEngineVersionsInput{
DBParameterGroupFamily: aws.String("String"),
DefaultOnly: aws.Boolean(true),
Engine: aws.String("String"),
EngineVersion: aws.String("String"),
Filters: []*rds.Filter{
&rds.Filter{ // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("String"), // Required
// More values...
},
},
// More values...
},
ListSupportedCharacterSets: aws.Boolean(true),
Marker: aws.String("String"),
MaxRecords: aws.Long(1),
}
resp, err := svc.DescribeDBEngineVersions(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例7: ExampleRDS_CreateOptionGroup
func ExampleRDS_CreateOptionGroup() {
svc := rds.New(nil)
params := &rds.CreateOptionGroupInput{
EngineName: aws.String("String"), // Required
MajorEngineVersion: aws.String("String"), // Required
OptionGroupDescription: aws.String("String"), // Required
OptionGroupName: aws.String("String"), // Required
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateOptionGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:29,代码来源:examples_test.go
示例8: ExampleRDS_ModifyEventSubscription
func ExampleRDS_ModifyEventSubscription() {
svc := rds.New(nil)
params := &rds.ModifyEventSubscriptionInput{
SubscriptionName: aws.String("String"), // Required
Enabled: aws.Boolean(true),
EventCategories: []*string{
aws.String("String"), // Required
// More values...
},
SNSTopicARN: aws.String("String"),
SourceType: aws.String("String"),
}
resp, err := svc.ModifyEventSubscription(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:26,代码来源:examples_test.go
示例9: ExampleRDS_DescribeDBLogFiles
func ExampleRDS_DescribeDBLogFiles() {
svc := rds.New(nil)
params := &rds.DescribeDBLogFilesInput{
DBInstanceIdentifier: aws.String("String"), // Required
FileLastWritten: aws.Long(1),
FileSize: aws.Long(1),
FilenameContains: aws.String("String"),
Filters: []*rds.Filter{
&rds.Filter{ // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("String"), // Required
// More values...
},
},
// More values...
},
Marker: aws.String("String"),
MaxRecords: aws.Long(1),
}
resp, err := svc.DescribeDBLogFiles(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:34,代码来源:examples_test.go
示例10: ExampleRDS_DescribeEventSubscriptions
func ExampleRDS_DescribeEventSubscriptions() {
svc := rds.New(nil)
params := &rds.DescribeEventSubscriptionsInput{
Filters: []*rds.Filter{
&rds.Filter{ // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("String"), // Required
// More values...
},
},
// More values...
},
Marker: aws.String("String"),
MaxRecords: aws.Long(1),
SubscriptionName: aws.String("String"),
}
resp, err := svc.DescribeEventSubscriptions(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:31,代码来源:examples_test.go
示例11: ExampleRDS_CreateDBInstance
func ExampleRDS_CreateDBInstance() {
svc := rds.New(nil)
params := &rds.CreateDBInstanceInput{
AllocatedStorage: aws.Long(1), // Required
DBInstanceClass: aws.String("String"), // Required
DBInstanceIdentifier: aws.String("String"), // Required
Engine: aws.String("String"), // Required
MasterUserPassword: aws.String("String"), // Required
MasterUsername: aws.String("String"), // Required
AutoMinorVersionUpgrade: aws.Boolean(true),
AvailabilityZone: aws.String("String"),
BackupRetentionPeriod: aws.Long(1),
CharacterSetName: aws.String("String"),
DBName: aws.String("String"),
DBParameterGroupName: aws.String("String"),
DBSecurityGroups: []*string{
aws.String("String"), // Required
// More values...
},
DBSubnetGroupName: aws.String("String"),
EngineVersion: aws.String("String"),
IOPS: aws.Long(1),
KMSKeyID: aws.String("String"),
LicenseModel: aws.String("String"),
MultiAZ: aws.Boolean(true),
OptionGroupName: aws.String("String"),
Port: aws.Long(1),
PreferredBackupWindow: aws.String("String"),
PreferredMaintenanceWindow: aws.String("String"),
PubliclyAccessible: aws.Boolean(true),
StorageEncrypted: aws.Boolean(true),
StorageType: aws.String("String"),
TDECredentialARN: aws.String("String"),
TDECredentialPassword: aws.String("String"),
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
VPCSecurityGroupIDs: []*string{
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.CreateDBInstance(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:60,代码来源:examples_test.go
示例12: ExampleRDS_DescribeOrderableDBInstanceOptions
func ExampleRDS_DescribeOrderableDBInstanceOptions() {
svc := rds.New(nil)
params := &rds.DescribeOrderableDBInstanceOptionsInput{
Engine: aws.String("String"), // Required
DBInstanceClass: aws.String("String"),
EngineVersion: aws.String("String"),
Filters: []*rds.Filter{
&rds.Filter{ // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("String"), // Required
// More values...
},
},
// More values...
},
LicenseModel: aws.String("String"),
Marker: aws.String("String"),
MaxRecords: aws.Long(1),
VPC: aws.Boolean(true),
}
resp, err := svc.DescribeOrderableDBInstanceOptions(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例13: ExampleRDS_ModifyOptionGroup
func ExampleRDS_ModifyOptionGroup() {
svc := rds.New(nil)
params := &rds.ModifyOptionGroupInput{
OptionGroupName: aws.String("String"), // Required
ApplyImmediately: aws.Boolean(true),
OptionsToInclude: []*rds.OptionConfiguration{
&rds.OptionConfiguration{ // Required
OptionName: aws.String("String"), // Required
DBSecurityGroupMemberships: []*string{
aws.String("String"), // Required
// More values...
},
OptionSettings: []*rds.OptionSetting{
&rds.OptionSetting{ // Required
AllowedValues: aws.String("String"),
ApplyType: aws.String("String"),
DataType: aws.String("String"),
DefaultValue: aws.String("String"),
Description: aws.String("String"),
IsCollection: aws.Boolean(true),
IsModifiable: aws.Boolean(true),
Name: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
Port: aws.Long(1),
VPCSecurityGroupMemberships: []*string{
aws.String("String"), // Required
// More values...
},
},
// More values...
},
OptionsToRemove: []*string{
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.ModifyOptionGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:53,代码来源:examples_test.go
示例14: ExampleRDS_ModifyDBInstance
func ExampleRDS_ModifyDBInstance() {
svc := rds.New(nil)
params := &rds.ModifyDBInstanceInput{
DBInstanceIdentifier: aws.String("String"), // Required
AllocatedStorage: aws.Long(1),
AllowMajorVersionUpgrade: aws.Boolean(true),
ApplyImmediately: aws.Boolean(true),
AutoMinorVersionUpgrade: aws.Boolean(true),
BackupRetentionPeriod: aws.Long(1),
DBInstanceClass: aws.String("String"),
DBParameterGroupName: aws.String("String"),
DBSecurityGroups: []*string{
aws.String("String"), // Required
// More values...
},
EngineVersion: aws.String("String"),
IOPS: aws.Long(1),
MasterUserPassword: aws.String("String"),
MultiAZ: aws.Boolean(true),
NewDBInstanceIdentifier: aws.String("String"),
OptionGroupName: aws.String("String"),
PreferredBackupWindow: aws.String("String"),
PreferredMaintenanceWindow: aws.String("String"),
StorageType: aws.String("String"),
TDECredentialARN: aws.String("String"),
TDECredentialPassword: aws.String("String"),
VPCSecurityGroupIDs: []*string{
aws.String("String"), // Required
// More values...
},
}
resp, err := svc.ModifyDBInstance(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:45,代码来源:examples_test.go
示例15: ExampleRDS_RestoreDBInstanceToPointInTime
func ExampleRDS_RestoreDBInstanceToPointInTime() {
svc := rds.New(nil)
params := &rds.RestoreDBInstanceToPointInTimeInput{
SourceDBInstanceIdentifier: aws.String("String"), // Required
TargetDBInstanceIdentifier: aws.String("String"), // Required
AutoMinorVersionUpgrade: aws.Boolean(true),
AvailabilityZone: aws.String("String"),
DBInstanceClass: aws.String("String"),
DBName: aws.String("String"),
DBSubnetGroupName: aws.String("String"),
Engine: aws.String("String"),
IOPS: aws.Long(1),
LicenseModel: aws.String("String"),
MultiAZ: aws.Boolean(true),
OptionGroupName: aws.String("String"),
Port: aws.Long(1),
PubliclyAccessible: aws.Boolean(true),
RestoreTime: aws.Time(time.Now()),
StorageType: aws.String("String"),
TDECredentialARN: aws.String("String"),
TDECredentialPassword: aws.String("String"),
Tags: []*rds.Tag{
&rds.Tag{ // Required
Key: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
UseLatestRestorableTime: aws.Boolean(true),
}
resp, err := svc.RestoreDBInstanceToPointInTime(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:44,代码来源:examples_test.go
示例16: ExampleRDS_DeleteOptionGroup
func ExampleRDS_DeleteOptionGroup() {
svc := rds.New(nil)
params := &rds.DeleteOptionGroupInput{
OptionGroupName: aws.String("String"), // Required
}
resp, err := svc.DeleteOptionGroup(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例17: ExampleRDS_RebootDBInstance
func ExampleRDS_RebootDBInstance() {
svc := rds.New(nil)
params := &rds.RebootDBInstanceInput{
DBInstanceIdentifier: aws.String("String"), // Required
ForceFailover: aws.Boolean(true),
}
resp, err := svc.RebootDBInstance(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例18: ExampleRDS_RemoveSourceIdentifierFromSubscription
func ExampleRDS_RemoveSourceIdentifierFromSubscription() {
svc := rds.New(nil)
params := &rds.RemoveSourceIdentifierFromSubscriptionInput{
SourceIdentifier: aws.String("String"), // Required
SubscriptionName: aws.String("String"), // Required
}
resp, err := svc.RemoveSourceIdentifierFromSubscription(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例19: ExampleRDS_ApplyPendingMaintenanceAction
func ExampleRDS_ApplyPendingMaintenanceAction() {
svc := rds.New(nil)
params := &rds.ApplyPendingMaintenanceActionInput{
ApplyAction: aws.String("String"), // Required
OptInType: aws.String("String"), // Required
ResourceIdentifier: aws.String("String"), // Required
}
resp, err := svc.ApplyPendingMaintenanceAction(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:21,代码来源:examples_test.go
示例20: ExampleRDS_PromoteReadReplica
func ExampleRDS_PromoteReadReplica() {
svc := rds.New(nil)
params := &rds.PromoteReadReplicaInput{
DBInstanceIdentifier: aws.String("String"), // Required
BackupRetentionPeriod: aws.Long(1),
PreferredBackupWindow: aws.String("String"),
}
resp, err := svc.PromoteReadReplica(params)
if awserr := aws.Error(err); awserr != nil {
// A service error occurred.
fmt.Println("Error:", awserr.Code, awserr.Message)
} else if err != nil {
// A non-service error occurred.
panic(err)
}
// Pretty-print the response data.
fmt.Println(awsutil.StringValue(resp))
}
开发者ID:datacratic,项目名称:aws-sdk-go,代码行数:21,代码来源:examples_test.go
注:本文中的github.com/datacratic/aws-sdk-go/service/rds.New函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论