Skip to content
This repository was archived by the owner on Dec 19, 2017. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions rds/rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ type DBInstance struct {
Port int `xml:"Endpoint>Port"`
PreferredBackupWindow string `xml:"PreferredBackupWindow"`
PreferredMaintenanceWindow string `xml:"PreferredMaintenanceWindow"`
StorageType string `xml:"StorageType"`
VpcSecurityGroupIds []string `xml:"VpcSecurityGroups>VpcSecurityGroupMembership>VpcSecurityGroupId"`
DBSecurityGroupNames []string `xml:"DBSecurityGroups>DBSecurityGroup>DBSecurityGroupName"`
DBSubnetGroup DBSubnetGroup `xml:"DBSubnetGroup"`
Expand Down Expand Up @@ -186,6 +187,7 @@ type CreateDBInstance struct {
PreferredBackupWindow string // hh24:mi-hh24:mi
PreferredMaintenanceWindow string // ddd:hh24:mi-ddd:hh24:mi
PubliclyAccessible bool
StorageType string
VpcSecurityGroupIds []string
DBSecurityGroupNames []string
DBParameterGroupName string
Expand Down Expand Up @@ -267,6 +269,10 @@ func (rds *Rds) CreateDBInstance(options *CreateDBInstance) (resp *SimpleResp, e
params["PubliclyAccessible"] = "true"
}

if options.StorageType != "" {
params["StorageType"] = options.StorageType
}

for j, group := range options.VpcSecurityGroupIds {
params["VpcSecurityGroupIds.member."+strconv.Itoa(j+1)] = group
}
Expand Down Expand Up @@ -691,6 +697,7 @@ type RestoreDBInstanceFromDBSnapshot struct {
OptionGroupName string
Port int
PubliclyAccessible bool
StorageType string

SetIops bool
SetPort bool
Expand Down Expand Up @@ -750,6 +757,10 @@ func (rds *Rds) RestoreDBInstanceFromDBSnapshot(options *RestoreDBInstanceFromDB
params["PubliclyAccessible"] = "true"
}

if options.StorageType != "" {
params["StorageType"] = options.StorageType
}

resp = &SimpleResp{}

err = rds.query(params, resp)
Expand Down
5 changes: 3 additions & 2 deletions rds/rds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (s *S) Test_CreateDBInstance(c *C) {
MasterUserPassword: "bazbarbaz",
DBInstanceClass: "db.m1.small",
DBSecurityGroupNames: []string{"foo", "bar"},
StorageType: "gp2",
DBParameterGroupName: "default.mysql5.6",

SetBackupRetentionPeriod: true,
Expand Down Expand Up @@ -206,7 +207,7 @@ func (s *S) Test_DescribeDBParameters(c *C) {

options := rds.DescribeDBParameters{
DBParameterGroupName: "mydbparamgroup3",
Source: "user",
Source: "user",
}

resp, err := s.rds.DescribeDBParameters(&options)
Expand Down Expand Up @@ -379,7 +380,7 @@ func (s *S) Test_ModifyDBParameterGroup(c *C) {

options := rds.ModifyDBParameterGroup{
DBParameterGroupName: "mydbparamgroup3",
Parameters: []rds.Parameter{
Parameters: []rds.Parameter{
rds.Parameter{
ApplyMethod: "immediate",
ParameterName: "character_set_server",
Expand Down