From d43439f542aac478e400c879d32e567a406d172b Mon Sep 17 00:00:00 2001 From: awssdkgo Date: Wed, 31 May 2017 19:04:56 +0000 Subject: [PATCH] Release v1.8.32 --- CHANGELOG.md | 7 + aws/version.go | 2 +- models/apis/rds/2014-10-31/api-2.json | 71 +++++ models/apis/rds/2014-10-31/docs-2.json | 37 ++- service/rds/api.go | 388 ++++++++++++++++++++++++- service/rds/examples_test.go | 43 +++ service/rds/rdsiface/interface.go | 8 + 7 files changed, 543 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0fb91edf98..a7998396384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Release v1.8.32 (2017-05-31) +=== + +### Service Client Updates +* `service/rds`: Updates service API and documentation + * Amazon RDS customers can now easily and quickly stop and start their DB instances. + Release v1.8.31 (2017-05-30) === diff --git a/aws/version.go b/aws/version.go index 794d5de6026..24a03e83239 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.8.31" +const SDKVersion = "1.8.32" diff --git a/models/apis/rds/2014-10-31/api-2.json b/models/apis/rds/2014-10-31/api-2.json index a00178cb44f..e289f9ebf3b 100644 --- a/models/apis/rds/2014-10-31/api-2.json +++ b/models/apis/rds/2014-10-31/api-2.json @@ -1501,6 +1501,50 @@ {"shape":"AuthorizationNotFoundFault"}, {"shape":"InvalidDBSecurityGroupStateFault"} ] + }, + "StartDBInstance":{ + "name":"StartDBInstance", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StartDBInstanceMessage"}, + "output":{ + "shape":"StartDBInstanceResult", + "resultWrapper":"StartDBInstanceResult" + }, + "errors":[ + {"shape":"DBInstanceNotFoundFault"}, + {"shape":"InvalidDBInstanceStateFault"}, + {"shape":"InsufficientDBInstanceCapacityFault"}, + {"shape":"DBSubnetGroupNotFoundFault"}, + {"shape":"DBSubnetGroupDoesNotCoverEnoughAZs"}, + {"shape":"InvalidDBClusterStateFault"}, + {"shape":"InvalidSubnet"}, + {"shape":"InvalidVPCNetworkStateFault"}, + {"shape":"DBClusterNotFoundFault"}, + {"shape":"AuthorizationNotFoundFault"}, + {"shape":"KMSKeyNotAccessibleFault"} + ] + }, + "StopDBInstance":{ + "name":"StopDBInstance", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StopDBInstanceMessage"}, + "output":{ + "shape":"StopDBInstanceResult", + "resultWrapper":"StopDBInstanceResult" + }, + "errors":[ + {"shape":"DBInstanceNotFoundFault"}, + {"shape":"InvalidDBInstanceStateFault"}, + {"shape":"DBSnapshotAlreadyExistsFault"}, + {"shape":"SnapshotQuotaExceededFault"}, + {"shape":"InvalidDBClusterStateFault"} + ] } }, "shapes":{ @@ -4941,6 +4985,33 @@ "db-cluster-snapshot" ] }, + "StartDBInstanceMessage":{ + "type":"structure", + "required":["DBInstanceIdentifier"], + "members":{ + "DBInstanceIdentifier":{"shape":"String"} + } + }, + "StartDBInstanceResult":{ + "type":"structure", + "members":{ + "DBInstance":{"shape":"DBInstance"} + } + }, + "StopDBInstanceMessage":{ + "type":"structure", + "required":["DBInstanceIdentifier"], + "members":{ + "DBInstanceIdentifier":{"shape":"String"}, + "DBSnapshotIdentifier":{"shape":"String"} + } + }, + "StopDBInstanceResult":{ + "type":"structure", + "members":{ + "DBInstance":{"shape":"DBInstance"} + } + }, "StorageQuotaExceededFault":{ "type":"structure", "members":{ diff --git a/models/apis/rds/2014-10-31/docs-2.json b/models/apis/rds/2014-10-31/docs-2.json index 3cb192a96e1..f0467e930d4 100644 --- a/models/apis/rds/2014-10-31/docs-2.json +++ b/models/apis/rds/2014-10-31/docs-2.json @@ -88,7 +88,9 @@ "RestoreDBClusterToPointInTime": "

Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group.

For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.

", "RestoreDBInstanceFromDBSnapshot": "

Creates a new DB instance from a DB snapshot. The target database is created from the source database restore point with the most of original configuration with the default security group and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored AZ deployment and not a single-AZ deployment.

If your intent is to replace your original DB instance with the new, restored DB instance, then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot action. RDS does not allow two DB instances with the same name. Once you have renamed your original DB instance with a different identifier, then you can pass the original name of the DB instance as the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot action. The result is that you will replace the original DB instance with the DB instance created from the snapshot.

If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.

", "RestoreDBInstanceToPointInTime": "

Restores a DB instance to an arbitrary point in time. You can restore to any point in time before the time identified by the LatestRestorableTime property. You can restore to a point up to the number of days specified by the BackupRetentionPeriod property.

The target database is created with most of the original configuration, but in a system-selected availability zone, with the default security group, the default subnet group, and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored deployment and not a single-AZ deployment.

", - "RevokeDBSecurityGroupIngress": "

Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2 or VPC Security Groups. Required parameters for this API are one of CIDRIP, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId).

" + "RevokeDBSecurityGroupIngress": "

Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2 or VPC Security Groups. Required parameters for this API are one of CIDRIP, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId).

", + "StartDBInstance": "

Starts a DB instance that was stopped using the AWS console, the stop-db-instance AWS CLI command, or the StopDBInstance action. For more information, see Stopping and Starting a DB instance in the AWS RDS user guide.

", + "StopDBInstance": "

Stops a DB instance. When you stop a DB instance, Amazon RDS retains the DB instance's metadata, including its endpoint, DB parameter group, and option group membership. Amazon RDS also retains the transaction logs so you can do a point-in-time restore if necessary. For more information, see Stopping and Starting a DB instance in the AWS RDS user guide.

" }, "shapes": { "AccountAttributesMessage": { @@ -701,7 +703,9 @@ "PromoteReadReplicaResult$DBInstance": null, "RebootDBInstanceResult$DBInstance": null, "RestoreDBInstanceFromDBSnapshotResult$DBInstance": null, - "RestoreDBInstanceToPointInTimeResult$DBInstance": null + "RestoreDBInstanceToPointInTimeResult$DBInstance": null, + "StartDBInstanceResult$DBInstance": null, + "StopDBInstanceResult$DBInstance": null } }, "DBInstanceAlreadyExistsFault": { @@ -2232,6 +2236,26 @@ "Event$SourceType": "

Specifies the source type for this event.

" } }, + "StartDBInstanceMessage": { + "base": null, + "refs": { + } + }, + "StartDBInstanceResult": { + "base": null, + "refs": { + } + }, + "StopDBInstanceMessage": { + "base": null, + "refs": { + } + }, + "StopDBInstanceResult": { + "base": null, + "refs": { + } + }, "StorageQuotaExceededFault": { "base": "

Request would result in user exceeding the allowed amount of storage available across all DB instances.

", "refs": { @@ -2287,7 +2311,7 @@ "CopyOptionGroupMessage$TargetOptionGroupIdentifier": "

The identifier for the copied option group.

Constraints:

Example: my-option-group

", "CopyOptionGroupMessage$TargetOptionGroupDescription": "

The description for the copied option group.

", "CreateDBClusterMessage$CharacterSetName": "

A value that indicates that the DB cluster should be associated with the specified CharacterSet.

", - "CreateDBClusterMessage$DatabaseName": "

The name for your database of up to 8 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database in the DB cluster you are creating.

", + "CreateDBClusterMessage$DatabaseName": "

The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database in the DB cluster you are creating.

", "CreateDBClusterMessage$DBClusterIdentifier": "

The DB cluster identifier. This parameter is stored as a lowercase string.

Constraints:

Example: my-cluster1

", "CreateDBClusterMessage$DBClusterParameterGroupName": "

The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, default.aurora5.6 will be used.

Constraints:

", "CreateDBClusterMessage$DBSubnetGroupName": "

A DB subnet group to associate with this DB cluster.

Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.

Example: mySubnetgroup

", @@ -2306,7 +2330,7 @@ "CreateDBClusterParameterGroupMessage$Description": "

The description for the DB cluster parameter group.

", "CreateDBClusterSnapshotMessage$DBClusterSnapshotIdentifier": "

The identifier of the DB cluster snapshot. This parameter is stored as a lowercase string.

Constraints:

Example: my-cluster1-snapshot1

", "CreateDBClusterSnapshotMessage$DBClusterIdentifier": "

The identifier of the DB cluster to create a snapshot for. This parameter is not case-sensitive.

Constraints:

Example: my-cluster1

", - "CreateDBInstanceMessage$DBName": "

The meaning of this parameter differs according to the database engine you use.

Type: String

MySQL

The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.

Constraints:

MariaDB

The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.

Constraints:

PostgreSQL

The name of the database to create when the DB instance is created. If this parameter is not specified, the default \"postgres\" database is created in the DB instance.

Constraints:

Oracle

The Oracle System ID (SID) of the created DB instance.

Default: ORCL

Constraints:

SQL Server

Not applicable. Must be null.

Amazon Aurora

The name of the database to create when the primary instance of the DB cluster is created. If this parameter is not specified, no database is created in the DB instance.

Constraints:

", + "CreateDBInstanceMessage$DBName": "

The meaning of this parameter differs according to the database engine you use.

Type: String

MySQL

The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.

Constraints:

MariaDB

The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.

Constraints:

PostgreSQL

The name of the database to create when the DB instance is created. If this parameter is not specified, the default \"postgres\" database is created in the DB instance.

Constraints:

Oracle

The Oracle System ID (SID) of the created DB instance. If you specify null, the default value ORCL is used. You can't specify the string NULL, or any other reserved word, for DBName.

Default: ORCL

Constraints:

SQL Server

Not applicable. Must be null.

Amazon Aurora

The name of the database to create when the primary instance of the DB cluster is created. If this parameter is not specified, no database is created in the DB instance.

Constraints:

", "CreateDBInstanceMessage$DBInstanceIdentifier": "

The DB instance identifier. This parameter is stored as a lowercase string.

Constraints:

Example: mydbinstance

", "CreateDBInstanceMessage$DBInstanceClass": "

The compute and memory capacity of the DB instance. Note that not all instance classes are available in all regions for all DB engines.

Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large

", "CreateDBInstanceMessage$Engine": "

The name of the database engine to be used for this instance.

Valid Values: mysql | mariadb | oracle-se1 | oracle-se2 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora

Not every database engine is available for every AWS region.

", @@ -2317,7 +2341,7 @@ "CreateDBInstanceMessage$PreferredMaintenanceWindow": "

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). For more information, see DB Instance Maintenance.

Format: ddd:hh24:mi-ddd:hh24:mi

Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.

Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints: Minimum 30-minute window.

", "CreateDBInstanceMessage$DBParameterGroupName": "

The name of the DB parameter group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine will be used.

Constraints:

", "CreateDBInstanceMessage$PreferredBackupWindow": "

The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter. For more information, see DB Instance Backups.

Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred DB Instance Maintenance Window.

Constraints:

", - "CreateDBInstanceMessage$EngineVersion": "

The version number of the database engine to use.

The following are the database engines and major and minor versions that are available with Amazon RDS. Not every database engine is available for every AWS region.

Amazon Aurora

MariaDB

Microsoft SQL Server 2016

Microsoft SQL Server 2014

Microsoft SQL Server 2012

Microsoft SQL Server 2008 R2

MySQL

Oracle 12c

Oracle 11g

PostgreSQL

", + "CreateDBInstanceMessage$EngineVersion": "

The version number of the database engine to use.

The following are the database engines and major and minor versions that are available with Amazon RDS. Not every database engine is available for every AWS region.

Amazon Aurora

MariaDB

Microsoft SQL Server 2016

Microsoft SQL Server 2014

Microsoft SQL Server 2012

Microsoft SQL Server 2008 R2

MySQL

Oracle 12c

Oracle 11g

PostgreSQL

", "CreateDBInstanceMessage$LicenseModel": "

License model information for this DB instance.

Valid values: license-included | bring-your-own-license | general-public-license

", "CreateDBInstanceMessage$OptionGroupName": "

Indicates that the DB instance should be associated with the specified option group.

Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance

", "CreateDBInstanceMessage$CharacterSetName": "

For supported engines, indicates that the DB instance should be associated with the specified CharacterSet.

", @@ -2814,6 +2838,9 @@ "SourceRegion$Endpoint": "

The source region endpoint.

", "SourceRegion$Status": "

The status of the source region.

", "SourceRegionMessage$Marker": "

An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

", + "StartDBInstanceMessage$DBInstanceIdentifier": "

The user-supplied instance identifier.

", + "StopDBInstanceMessage$DBInstanceIdentifier": "

The user-supplied instance identifier.

", + "StopDBInstanceMessage$DBSnapshotIdentifier": "

The user-supplied instance identifier of the DB Snapshot created immediately before the DB instance is stopped.

", "Subnet$SubnetIdentifier": "

Specifies the identifier of the subnet.

", "Subnet$SubnetStatus": "

Specifies the status of the subnet.

", "SubnetIdentifierList$member": null, diff --git a/service/rds/api.go b/service/rds/api.go index 786172c72bf..daa8723530d 100644 --- a/service/rds/api.go +++ b/service/rds/api.go @@ -9352,6 +9352,222 @@ func (c *RDS) RevokeDBSecurityGroupIngressWithContext(ctx aws.Context, input *Re return out, req.Send() } +const opStartDBInstance = "StartDBInstance" + +// StartDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StartDBInstance operation. The "output" return +// value can be used to capture response data after the request's "Send" method +// is called. +// +// See StartDBInstance for usage and error information. +// +// Creating a request object using this method should be used when you want to inject +// custom logic into the request's lifecycle using a custom handler, or if you want to +// access properties on the request object before or after sending the request. If +// you just want the service response, call the StartDBInstance method directly +// instead. +// +// Note: You must call the "Send" method on the returned request object in order +// to execute the request. +// +// // Example sending a request using the StartDBInstanceRequest method. +// req, resp := client.StartDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance +func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request.Request, output *StartDBInstanceOutput) { + op := &request.Operation{ + Name: opStartDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartDBInstanceInput{} + } + + output = &StartDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartDBInstance API operation for Amazon Relational Database Service. +// +// Starts a DB instance that was stopped using the AWS console, the stop-db-instance +// AWS CLI command, or the StopDBInstance action. For more information, see +// Stopping and Starting a DB instance in the AWS RDS user guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation StartDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" +// Specified DB instance class is not available in the specified Availability +// Zone. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// DB subnet group does not cover all Availability Zones after it is created +// because users' change. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" +// Specified CIDRIP or EC2 security group is not authorized for the specified +// DB security group. +// +// RDS may not also be authorized via IAM to perform necessary actions on your +// behalf. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// Error accessing KMS key. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance +func (c *RDS) StartDBInstance(input *StartDBInstanceInput) (*StartDBInstanceOutput, error) { + req, out := c.StartDBInstanceRequest(input) + return out, req.Send() +} + +// StartDBInstanceWithContext is the same as StartDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StartDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) StartDBInstanceWithContext(ctx aws.Context, input *StartDBInstanceInput, opts ...request.Option) (*StartDBInstanceOutput, error) { + req, out := c.StartDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopDBInstance = "StopDBInstance" + +// StopDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StopDBInstance operation. The "output" return +// value can be used to capture response data after the request's "Send" method +// is called. +// +// See StopDBInstance for usage and error information. +// +// Creating a request object using this method should be used when you want to inject +// custom logic into the request's lifecycle using a custom handler, or if you want to +// access properties on the request object before or after sending the request. If +// you just want the service response, call the StopDBInstance method directly +// instead. +// +// Note: You must call the "Send" method on the returned request object in order +// to execute the request. +// +// // Example sending a request using the StopDBInstanceRequest method. +// req, resp := client.StopDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance +func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Request, output *StopDBInstanceOutput) { + op := &request.Operation{ + Name: opStopDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopDBInstanceInput{} + } + + output = &StopDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopDBInstance API operation for Amazon Relational Database Service. +// +// Stops a DB instance. When you stop a DB instance, Amazon RDS retains the +// DB instance's metadata, including its endpoint, DB parameter group, and option +// group membership. Amazon RDS also retains the transaction logs so you can +// do a point-in-time restore if necessary. For more information, see Stopping +// and Starting a DB instance in the AWS RDS user guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation StopDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" +// DBSnapshotIdentifier is already used by an existing snapshot. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// Request would result in user exceeding the allowed number of DB snapshots. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance +func (c *RDS) StopDBInstance(input *StopDBInstanceInput) (*StopDBInstanceOutput, error) { + req, out := c.StopDBInstanceRequest(input) + return out, req.Send() +} + +// StopDBInstanceWithContext is the same as StopDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StopDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) StopDBInstanceWithContext(ctx aws.Context, input *StopDBInstanceInput, opts ...request.Option) (*StopDBInstanceOutput, error) { + req, out := c.StopDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // Describes a quota for an AWS account, for example, the number of DB instances // allowed. // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AccountQuota @@ -10873,7 +11089,7 @@ type CreateDBClusterInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` - // The name for your database of up to 8 alpha-numeric characters. If you do + // The name for your database of up to 64 alpha-numeric characters. If you do // not provide a name, Amazon RDS will not create a database in the DB cluster // you are creating. DatabaseName *string `type:"string"` @@ -11628,7 +11844,9 @@ type CreateDBInstanceInput struct { // // Oracle // - // The Oracle System ID (SID) of the created DB instance. + // The Oracle System ID (SID) of the created DB instance. If you specify null, + // the default value ORCL is used. You can't specify the string NULL, or any + // other reserved word, for DBName. // // Default: ORCL // @@ -11795,6 +12013,9 @@ type CreateDBInstanceInput struct { // // Oracle 12c // + // * 12.1.0.2.v8 (supported for EE in all AWS regions, and SE2 in all AWS + // regions except us-gov-west-1) + // // * 12.1.0.2.v7 (supported for EE in all AWS regions, and SE2 in all AWS // regions except us-gov-west-1) // @@ -11818,6 +12039,8 @@ type CreateDBInstanceInput struct { // // Oracle 11g // + // * 11.2.0.4.v12 (supported for EE, SE1, and SE, in all AWS regions) + // // * 11.2.0.4.v11 (supported for EE, SE1, and SE, in all AWS regions) // // * 11.2.0.4.v10 (supported for EE, SE1, and SE, in all AWS regions) @@ -11840,14 +12063,13 @@ type CreateDBInstanceInput struct { // // PostgreSQL // - // * Version 9.6: 9.6.1 + // * Version 9.6.x: 9.6.1 | 9.6.2 // - // * Version 9.5:9.5.4 | 9.5.2 + // * Version 9.5.x:9.5.6 | 9.5.4 | 9.5.2 // - // * Version 9.4: 9.4.9 | 9.4.7 | 9.4.5 | 9.4.4 | 9.4.1 + // * Version 9.4.x:9.4.11 | 9.4.9 | 9.4.7 // - // * Version 9.3: 9.3.14 | 9.3.12 | 9.3.10 | 9.3.9 | 9.3.6 | 9.3.5 | 9.3.3 - // | 9.3.2 | 9.3.1 + // * Version 9.3.x:9.3.16 | 9.3.14 | 9.3.12 EngineVersion *string `type:"string"` // The amount of Provisioned IOPS (input/output operations per second) to be @@ -27085,6 +27307,158 @@ func (s *SourceRegion) SetStatus(v string) *SourceRegion { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstanceMessage +type StartDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The user-supplied instance identifier. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *StartDBInstanceInput) SetDBInstanceIdentifier(v string) *StartDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstanceResult +type StartDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Contains the result of a successful invocation of the following actions: + // + // * CreateDBInstance + // + // * DeleteDBInstance + // + // * ModifyDBInstance + // + // This data type is used as a response element in the DescribeDBInstances action. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s StartDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *StartDBInstanceOutput) SetDBInstance(v *DBInstance) *StartDBInstanceOutput { + s.DBInstance = v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstanceMessage +type StopDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The user-supplied instance identifier. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The user-supplied instance identifier of the DB Snapshot created immediately + // before the DB instance is stopped. + DBSnapshotIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s StopDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *StopDBInstanceInput) SetDBInstanceIdentifier(v string) *StopDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. +func (s *StopDBInstanceInput) SetDBSnapshotIdentifier(v string) *StopDBInstanceInput { + s.DBSnapshotIdentifier = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstanceResult +type StopDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Contains the result of a successful invocation of the following actions: + // + // * CreateDBInstance + // + // * DeleteDBInstance + // + // * ModifyDBInstance + // + // This data type is used as a response element in the DescribeDBInstances action. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s StopDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *StopDBInstanceOutput) SetDBInstance(v *DBInstance) *StopDBInstanceOutput { + s.DBInstance = v + return s +} + // This data type is used as a response element in the DescribeDBSubnetGroups // action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/Subnet diff --git a/service/rds/examples_test.go b/service/rds/examples_test.go index df8dfcc4715..3b3a919af96 100644 --- a/service/rds/examples_test.go +++ b/service/rds/examples_test.go @@ -2796,3 +2796,46 @@ func ExampleRDS_RevokeDBSecurityGroupIngress() { // Pretty-print the response data. fmt.Println(resp) } + +func ExampleRDS_StartDBInstance() { + sess := session.Must(session.NewSession()) + + svc := rds.New(sess) + + params := &rds.StartDBInstanceInput{ + DBInstanceIdentifier: aws.String("String"), // Required + } + resp, err := svc.StartDBInstance(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 ExampleRDS_StopDBInstance() { + sess := session.Must(session.NewSession()) + + svc := rds.New(sess) + + params := &rds.StopDBInstanceInput{ + DBInstanceIdentifier: aws.String("String"), // Required + DBSnapshotIdentifier: aws.String("String"), + } + resp, err := svc.StopDBInstance(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) +} diff --git a/service/rds/rdsiface/interface.go b/service/rds/rdsiface/interface.go index 7b35112ff0b..0716dc815ba 100644 --- a/service/rds/rdsiface/interface.go +++ b/service/rds/rdsiface/interface.go @@ -459,6 +459,14 @@ type RDSAPI interface { RevokeDBSecurityGroupIngressWithContext(aws.Context, *rds.RevokeDBSecurityGroupIngressInput, ...request.Option) (*rds.RevokeDBSecurityGroupIngressOutput, error) RevokeDBSecurityGroupIngressRequest(*rds.RevokeDBSecurityGroupIngressInput) (*request.Request, *rds.RevokeDBSecurityGroupIngressOutput) + StartDBInstance(*rds.StartDBInstanceInput) (*rds.StartDBInstanceOutput, error) + StartDBInstanceWithContext(aws.Context, *rds.StartDBInstanceInput, ...request.Option) (*rds.StartDBInstanceOutput, error) + StartDBInstanceRequest(*rds.StartDBInstanceInput) (*request.Request, *rds.StartDBInstanceOutput) + + StopDBInstance(*rds.StopDBInstanceInput) (*rds.StopDBInstanceOutput, error) + StopDBInstanceWithContext(aws.Context, *rds.StopDBInstanceInput, ...request.Option) (*rds.StopDBInstanceOutput, error) + StopDBInstanceRequest(*rds.StopDBInstanceInput) (*request.Request, *rds.StopDBInstanceOutput) + WaitUntilDBInstanceAvailable(*rds.DescribeDBInstancesInput) error WaitUntilDBInstanceAvailableWithContext(aws.Context, *rds.DescribeDBInstancesInput, ...request.WaiterOption) error