Class: Fog::AWS::RDS::Real

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/aws/rds.rb,
lib/fog/aws/requests/rds/create_db_instance.rb,
lib/fog/aws/requests/rds/create_db_snapshot.rb,
lib/fog/aws/requests/rds/delete_db_instance.rb,
lib/fog/aws/requests/rds/delete_db_snapshot.rb,
lib/fog/aws/requests/rds/modify_db_instance.rb,
lib/fog/aws/requests/rds/reboot_db_instance.rb,
lib/fog/aws/requests/rds/describe_db_instances.rb,
lib/fog/aws/requests/rds/describe_db_snapshots.rb,
lib/fog/aws/requests/rds/describe_db_parameters.rb,
lib/fog/aws/requests/rds/create_db_security_group.rb,
lib/fog/aws/requests/rds/delete_db_security_group.rb,
lib/fog/aws/requests/rds/create_db_parameter_group.rb,
lib/fog/aws/requests/rds/delete_db_parameter_group.rb,
lib/fog/aws/requests/rds/modify_db_parameter_group.rb,
lib/fog/aws/requests/rds/describe_db_security_groups.rb,
lib/fog/aws/requests/rds/describe_db_parameter_groups.rb,
lib/fog/aws/requests/rds/create_db_instance_read_replica.rb,
lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb,
lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb,
lib/fog/aws/requests/rds/restore_db_instance_from_db_snapshot.rb,
lib/fog/aws/requests/rds/restore_db_instance_to_point_in_time.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Real

Initialize connection to ELB

Notes

options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection

Examples

elb = ELB.new(
 :aws_access_key_id => your_aws_access_key_id,
 :aws_secret_access_key => your_aws_secret_access_key
)

Parameters

  • options<~Hash> - config arguments for connection. Defaults to {}.

    • region<~String> - optional region to use, in [‘eu-west-1’, ‘us-east-1’, ‘us-west-1’i, ‘ap-southeast-1’]

Returns

  • ELB object with connection to AWS.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/fog/aws/rds.rb', line 82

def initialize(options={})
  @aws_access_key_id      = options[:aws_access_key_id]
  @aws_secret_access_key  = options[:aws_secret_access_key]
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)

  options[:region] ||= 'us-east-1'
  @host = options[:host] || case options[:region]
  when 'ap-northeast-1'
    'rds.ap-northeast-1.amazonaws.com'
  when 'ap-southeast-1'
    'rds.ap-southeast-1.amazonaws.com'
  when 'eu-west-1'
    'rds.eu-west-1.amazonaws.com'
  when 'us-east-1'
    'rds.us-east-1.amazonaws.com'
  when 'us-west-1'
    'rds.us-west-1.amazonaws.com'
  else
    raise ArgumentError, "Unknown region: #{options[:region].inspect}"
  end
  @path       = options[:path]      || '/'
  @port       = options[:port]      || 443
  @scheme     = options[:scheme]    || 'https'
  @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", options[:persistent])
end

Instance Method Details

#authorize_db_security_group_ingress(name, opts = {}) ⇒ Object

authorizes a db security group ingress docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_AuthorizeDBSecurityGroupIngress.html

Parameters

  • CIDRIP <~String> - The IP range to authorize

  • DBSecurityGroupName <~String> - The name for the DB Security Group.

  • EC2SecurityGroupName <~String> - Name of the EC2 Security Group to authorize.

  • EC2SecurityGroupOwnerId <~String> - AWS Account Number of the owner of the security group specified in the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb', line 18

def authorize_db_security_group_ingress(name, opts={})
  unless opts.key?('CIDRIP') || (opts.key?('EC2SecurityGroupName') && opts.key?('EC2SecurityGroupOwnerId'))
    raise ArgumentError, 'Must specify CIDRIP, or both EC2SecurityGroupName and EC2SecurityGroupOwnerId'
  end

  request({
    'Action'  => 'AuthorizeDBSecurityGroupIngress',
    :parser   => Fog::Parsers::AWS::RDS::AuthorizeDBSecurityGroupIngress.new,
    'DBSecurityGroupName' => name
  }.merge(opts))

end

#create_db_instance(db_name, options = {}) ⇒ Object

create a db instance docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html

Parameters

  • DBInstanceIdentifier <~String> - name of the db instance to modify

  • AllocatedStorage <~Integer> Storage space, in GB

  • AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window

  • AvailabilityZone <~String> The availability zone to create the instance in

  • BackupRetentionPeriod <~Integer> 0-8 The number of days to retain automated backups.

  • DBInstanceClass <~String> The new compute and memory capacity of the DB Instance

  • DBName <~String> The name of the database to create when the DB Instance is created

  • DBParameterGroupName <~String> The name of the DB Parameter Group to apply to this DB Instance

  • DBSecurityGroups <~Array> A list of DB Security Groups to authorize on this DB Instance

  • Engine <~String> The name of the database engine to be used for this instance.

  • EngineVersion <~String> The version number of the database engine to use.

  • MasterUsername <~String> The db master user

  • MasterUserPassword <~String> The new password for the DB Instance master user

  • MultiAZ <~Boolean> Specifies if the DB Instance is a Multi-AZ deployment

  • Port <~Integer> The port number on which the database accepts connections.

  • PreferredBackupWindow <~String> The daily time range during which automated backups are created if automated backups are enabled

  • PreferredMaintenanceWindow <~String> The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/fog/aws/requests/rds/create_db_instance.rb', line 32

def create_db_instance(db_name, options={})
  
  if security_groups = options.delete('DBSecurityGroups')
    options.merge!(Fog::AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups]))
  end
    
  request({
    'Action'  => 'CreateDBInstance',
    'DBInstanceIdentifier' => db_name,
    :parser   => Fog::Parsers::AWS::RDS::CreateDBInstance.new,
  }.merge(options))
end

#create_db_instance_read_replica(instance_identifier, source_identifier, options = {}) ⇒ Object

create a read replica db instance docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html

Parameters

  • DBInstanceIdentifier <~String> - name of the db instance to create

  • SourceDBInstanceIdentifier <~String> - name of the db instance that will be the source. Must have backup retention on

  • AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window

  • AvailabilityZone <~String> The availability zone to create the instance in

  • DBInstanceClass <~String> The new compute and memory capacity of the DB Instance

  • Port <~Integer> The port number on which the database accepts connections.

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



20
21
22
23
24
25
26
27
28
29
# File 'lib/fog/aws/requests/rds/create_db_instance_read_replica.rb', line 20

def create_db_instance_read_replica(instance_identifier, source_identifier, options={})
  
    
  request({
    'Action'  => 'CreateDBInstanceReadReplica',
    'DBInstanceIdentifier' => instance_identifier,
    'SourceDBInstanceIdentifier' => source_identifier,
    :parser   => Fog::Parsers::AWS::RDS::CreateDBInstanceReadReplica.new,
  }.merge(options))
end

#create_db_parameter_group(group_name, group_family, description) ⇒ Object

create a database parameter group docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_CreateDBParameterGroup.html

Parameters

  • DBParameterGroupName <~String> - name of the parameter group

  • DBParameterGroupFamily <~String> - The DB parameter group family name. Current valid values: MySQL5.1 | MySQL5.5

  • Description <~String> - The description for the DB Parameter Grou

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fog/aws/requests/rds/create_db_parameter_group.rb', line 18

def create_db_parameter_group(group_name, group_family, description)
  
  request({
    'Action'  => 'CreateDBParameterGroup',
    'DBParameterGroupName' => group_name,
    'DBParameterGroupFamily' => group_family,
    'Description' => description,
    
    :parser   => Fog::Parsers::AWS::RDS::CreateDbParameterGroup.new
  })
end

#create_db_security_group(name, description = name) ⇒ Object

creates a db security group docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_CreateDBSecurityGroup.html

Parameters

  • DBSecurityGroupDescription <~String> - The description for the DB Security Group

  • DBSecurityGroupName <~String> - The name for the DB Security Group. This value is stored as a lowercase string. Must contain no more than 255 alphanumeric characters or hyphens. Must not be “Default”.

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



16
17
18
19
20
21
22
23
# File 'lib/fog/aws/requests/rds/create_db_security_group.rb', line 16

def create_db_security_group(name, description = name)
  request({
    'Action'  => 'CreateDBSecurityGroup',
    'DBSecurityGroupName' => name,
    'DBSecurityGroupDescription' => description,
    :parser   => Fog::Parsers::AWS::RDS::CreateDBSecurityGroup.new
  })
end

#create_db_snapshot(identifier, name) ⇒ Object

creates a db snapshot docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_CreateDBSnapshot.html

Parameters

  • DBInstanceIdentifier <~String> - ID of instance to create snapshot for

  • DBSnapshotIdentifier <~String> - The identifier for the DB Snapshot. 1-255 alphanumeric or hyphen characters. Must start with a letter

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



16
17
18
19
20
21
22
23
# File 'lib/fog/aws/requests/rds/create_db_snapshot.rb', line 16

def create_db_snapshot(identifier, name)
  request({
    'Action'  => 'CreateDBSnapshot',
    'DBInstanceIdentifier' => identifier,
    'DBSnapshotIdentifier' => name,
    :parser   => Fog::Parsers::AWS::RDS::CreateDBSnapshot.new
  })
end

#delete_db_instance(identifier, snapshot_identifier, skip_snapshot = false) ⇒ Object

delete a database instance docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DeleteDBInstance.html

Parameters

  • DBInstanceIdentifier <~String> - The DB Instance identifier for the DB Instance to be deleted.

  • FinalDBSnapshotIdentifier <~String> - The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to false

  • SkipFinalSnapshot <~Boolean> - Determines whether a final DB Snapshot is created before the DB Instance is deleted

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



18
19
20
21
22
23
24
25
26
27
# File 'lib/fog/aws/requests/rds/delete_db_instance.rb', line 18

def delete_db_instance(identifier, snapshot_identifier, skip_snapshot = false)          
  params = {}
  params['FinalDBSnapshotIdentifier'] = snapshot_identifier if snapshot_identifier
  request({
    'Action'  => 'DeleteDBInstance',
    'DBInstanceIdentifier' => identifier,
    'SkipFinalSnapshot' => skip_snapshot,            
    :parser   => Fog::Parsers::AWS::RDS::DeleteDBInstance.new
  }.merge(params))
end

#delete_db_parameter_group(group_name) ⇒ Object

delete a database parameter group docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DeleteDBParameterGroup.html

Parameters

  • DBParameterGroupName <~String> - name of the parameter group. Must not be associated with any instances

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



15
16
17
18
19
20
21
22
23
# File 'lib/fog/aws/requests/rds/delete_db_parameter_group.rb', line 15

def delete_db_parameter_group(group_name)
  
  request({
    'Action'  => 'DeleteDBParameterGroup',
    'DBParameterGroupName' => group_name,
    
    :parser   => Fog::Parsers::AWS::RDS::DeleteDbParameterGroup.new
  })
end

#delete_db_security_group(name) ⇒ Object

deletes a db security group docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_DeleteDBSecurityGroup.html

Parameters

  • DBSecurityGroupName <~String> - The name for the DB Security Group to delete

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



15
16
17
18
19
20
21
# File 'lib/fog/aws/requests/rds/delete_db_security_group.rb', line 15

def delete_db_security_group(name)
  request({
    'Action'  => 'DeleteDBSecurityGroup',
    'DBSecurityGroupName' => name,
    :parser   => Fog::Parsers::AWS::RDS::DeleteDBSecurityGroup.new
  })
end

#delete_db_snapshot(group_name) ⇒ Object

delete a database snapshot docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DeleteDBSnapshot.html

Parameters

  • DBSnapshotIdentifier <~String> - name of the snapshot

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



15
16
17
18
19
20
21
22
23
# File 'lib/fog/aws/requests/rds/delete_db_snapshot.rb', line 15

def delete_db_snapshot(group_name)
  
  request({
    'Action'  => 'DeleteDBSnapshot',
    'DBSnapshotIdentifier' => group_name,
    
    :parser   => Fog::Parsers::AWS::RDS::DeleteDBSnapshot.new
  })
end

#describe_db_instances(identifier = nil, opts = {}) ⇒ Object

Describe all or specified load db instances docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DescribeDBInstances.html

Parameters

  • DBInstanceIdentifier <~String> - ID of instance to retrieve information for. if absent information for all instances is returned

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fog/aws/requests/rds/describe_db_instances.rb', line 15

def describe_db_instances(identifier=nil, opts={})
  params = {}
  params['DBInstanceIdentifier'] = identifier if identifier
  if opts[:marker]
    params['Marker'] = opts[:marker]
  end
  if opts[:max_records]
    params['MaxRecords'] = opts[:max_records]
  end
  
  request({
    'Action'  => 'DescribeDBInstances',
    :parser   => Fog::Parsers::AWS::RDS::DescribeDBInstances.new
  }.merge(params))
end

#describe_db_parameter_groups(name = nil, opts = {}) ⇒ Object

This API returns a list of DBParameterGroup descriptions. If a DBParameterGroupName is specified, the list will contain only the descriptions of the specified DBParameterGroup docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DescribeDBParameterGroups.html

Parameters

  • DBParameterGroupName <~String> - The name of a specific database parameter group to return details for.

  • Source <~String> - The parameter types to return. user | system | engine-default

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/fog/aws/requests/rds/describe_db_parameter_groups.rb', line 16

def describe_db_parameter_groups(name=nil, opts={})
  params={}
  if opts[:marker]
    params['Marker'] = opts[:marker]
  end
  if name
    params['DBParameterGroupName'] = name
  end
  if opts[:max_records]
    params['MaxRecords'] = opts[:max_records]
  end
  
  request({
    'Action'  => 'DescribeDBParameterGroups',
    :parser   => Fog::Parsers::AWS::RDS::DescribeDBParameterGroups.new
  }.merge(params))
end

#describe_db_parameters(name, opts = {}) ⇒ Object

Describe parameters from a parameter group docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DescribeDBParameters.html

Parameters

  • DBParameterGroupName <~String> - name of parameter group to retrieve parameters for

  • Source <~String> - The parameter types to return. user | system | engine-default

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/fog/aws/requests/rds/describe_db_parameters.rb', line 16

def describe_db_parameters(name, opts={})
  params={}
  if opts[:marker]
    params['Marker'] = opts[:marker]
  end
  if opts[:source]
    params['Source'] = opts[:source]
  end
  if opts[:max_records]
    params['MaxRecords'] = opts[:max_records]
  end
  
  request({
    'Action'  => 'DescribeDBParameters',
    'DBParameterGroupName' => name,
    :parser   => Fog::Parsers::AWS::RDS::DescribeDBParameters.new
  }.merge(params))
end

#describe_db_security_groups(opts = {}) ⇒ Object

Describe all or specified db snapshots docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_DescribeDBSecurityGroups.html

Parameters

  • DBSecurityGroupName <~String> - The name of the DB Security Group to return details for.

  • Marker <~String> - An optional marker provided in the previous DescribeDBInstances request

  • MaxRecords <~Integer> - Max number of records to return (between 20 and 100)

Only one of DBInstanceIdentifier or DBSnapshotIdentifier can be specified

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



18
19
20
21
22
23
24
25
# File 'lib/fog/aws/requests/rds/describe_db_security_groups.rb', line 18

def describe_db_security_groups(opts={})
  opts = {'DBSecurityGroupName' => opts} if opts.is_a?(String)

  request({
    'Action'  => 'DescribeDBSecurityGroups',
    :parser   => Fog::Parsers::AWS::RDS::DescribeDBSecurityGroups.new
  }.merge(opts))
end

#describe_db_snapshots(opts = {}) ⇒ Object

Describe all or specified db snapshots docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DescribeDBSnapshots.html

Parameters

  • DBInstanceIdentifier <~String> - ID of instance to retrieve information for. if absent information for all instances is returned

  • DBSnapshotIdentifier <~String> - ID of snapshot to retrieve information for. if absent information for all snapshots is returned

  • Marker <~String> - An optional marker provided in the previous DescribeDBInstances request

  • MaxRecords <~Integer> - Max number of records to return (between 20 and 100)

Only one of DBInstanceIdentifier or DBSnapshotIdentifier can be specified

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fog/aws/requests/rds/describe_db_snapshots.rb', line 19

def describe_db_snapshots(opts={})
  params = {}
  params['DBInstanceIdentifier'] = opts[:identifier] if opts[:identifier]
  params['DBSnapshotIdentifier'] = opts[:snapshot_id] if opts[:snapshot_id]
  params['Marker'] = opts[:marker] if opts[:marker]
  params['MaxRecords'] = opts[:max_records] if opts[:max_records]
  request({
    'Action'  => 'DescribeDBSnapshots',
    :parser   => Fog::Parsers::AWS::RDS::DescribeDBSnapshots.new
  }.merge(params))
end

#modify_db_instance(db_name, apply_immediately, options = {}) ⇒ Object

modifies a database instance docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_ModifyDBInstance.html

Parameters

  • DBInstanceIdentifier <~String> - name of the db instance to modify

  • ApplyImmediately <~Boolean> - whether to apply the changes immediately or wait for the next maintenance window

  • AllocatedStorage <~Integer> Storage space, in GB

  • AllowMajorVersionUpgrade <~Boolean> Must be set to true if EngineVersion specifies a different major version

  • AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window

  • BackupRetentionPeriod <~Integer> 0-8 The number of days to retain automated backups.

  • DBInstanceClass <~String> The new compute and memory capacity of the DB Instanc

  • DBParameterGroupName <~String> The name of the DB Parameter Group to apply to this DB Instance

  • DBSecurityGroups <~Array> A list of DB Security Groups to authorize on this DB Instance

  • EngineVersion <~String> The version number of the database engine to upgrade to.

  • MasterUserPassword <~String> The new password for the DB Instance master user

  • MultiAZ <~Boolean> Specifies if the DB Instance is a Multi-AZ deployment

  • PreferredBackupWindow <~String> The daily time range during which automated backups are created if automated backups are enabled

  • PreferredMaintenanceWindow <~String> The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/fog/aws/requests/rds/modify_db_instance.rb', line 29

def modify_db_instance(db_name, apply_immediately, options={})
  
  if security_groups = options.delete('DBSecurityGroups')
    options.merge!(Fog::AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups]))
  end
    
  request({
    'Action'  => 'ModifyDBInstance',
    'DBInstanceIdentifier' => db_name,
    'ApplyImmediately' => apply_immediately,
    :parser   => Fog::Parsers::AWS::RDS::ModifyDBInstance.new,
  }.merge(options))
end

#modify_db_parameter_group(group_name, parameters) ⇒ Object

modifies a database parameter group docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_ModifyDBParameterGroup.html

Parameters

  • DBParameterGroupName <~String> - name of the parameter group

  • Parameters<~Array> - Array of up to 20 Hashes describing parameters to set

    • ‘ParameterName’<~String> - parameter name.

    • ‘ParameterValue’<~String> - new paremeter value

    • ‘ApplyMethod’<~String> - immediate | pending-reboot whether to set the parameter immediately or not (may require an instance restart)

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/fog/aws/requests/rds/modify_db_parameter_group.rb', line 20

def modify_db_parameter_group(group_name, parameters)
  
  parameter_names = []
  parameter_values = []
  parameter_apply_methods = []
  
  parameters.each do |parameter|
    parameter_names.push(parameter['ParameterName'])
    parameter_values.push(parameter['ParameterValue'])
    parameter_apply_methods.push(parameter['ApplyMethod'])
  end
  params = {}
  params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ParameterName', parameter_names))
  params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ParameterValue', parameter_values))
  params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ApplyMethod', parameter_apply_methods))
  
  request({
    'Action'  => 'ModifyDBParameterGroup',
    'DBParameterGroupName' => group_name,
    
    :parser   => Fog::Parsers::AWS::RDS::ModifyDbParameterGroup.new
  }.merge(params))
end

#reboot_db_instance(instance_identifier) ⇒ Object

reboots a database instance docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_RebootDBInstance.html

Parameters

  • DBInstanceIdentifier <~String> - name of the db instance to reboot

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



15
16
17
18
19
20
21
# File 'lib/fog/aws/requests/rds/reboot_db_instance.rb', line 15

def reboot_db_instance(instance_identifier)
  request({
    'Action'  => 'RebootDBInstance',
    'DBInstanceIdentifier' => instance_identifier,
    :parser   => Fog::Parsers::AWS::RDS::RebootDBInstance.new,
  })
end

#reloadObject



108
109
110
# File 'lib/fog/aws/rds.rb', line 108

def reload
  @connection.reset
end

#restore_db_instance_from_db_snapshot(snapshot_id, db_name, opts = {}) ⇒ Object

Restores a DB Instance from a DB Snapshot docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_RestoreDBInstanceFromDBSnapshot.html

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



13
14
15
16
17
18
19
20
# File 'lib/fog/aws/requests/rds/restore_db_instance_from_db_snapshot.rb', line 13

def restore_db_instance_from_db_snapshot(snapshot_id, db_name, opts={})
  request({
    'Action'  => 'RestoreDBInstanceFromDBSnapshot',
    'DBSnapshotIdentifier' => snapshot_id,
    'DBInstanceIdentifier' => db_name,
    :parser   => Fog::Parsers::AWS::RDS::RestoreDBInstanceFromDBSnapshot.new,
  }.merge(opts))
end

#restore_db_instance_to_point_in_time(source_db_name, target_db_name, opts = {}) ⇒ Object

Restores a DB Instance to a point in time docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_RestoreDBInstanceToPointInTime.html

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



13
14
15
16
17
18
19
20
# File 'lib/fog/aws/requests/rds/restore_db_instance_to_point_in_time.rb', line 13

def restore_db_instance_to_point_in_time(source_db_name, target_db_name, opts={})
  request({
    'Action'  => 'RestoreDBInstanceToPointInTime',
    'SourceDBInstanceIdentifier' => source_db_name,
    'TargetDBInstanceIdentifier' => target_db_name,
    :parser   => Fog::Parsers::AWS::RDS::RestoreDBInstanceToPointInTime.new,
  }.merge(opts))
end

#revoke_db_security_group_ingress(name, opts = {}) ⇒ Object

revokes a db security group ingress docs.amazonwebservices.com/AmazonRDS/latest/APIReference/index.html?API_RevokeDBSecurityGroupIngress.html

Parameters

  • CIDRIP <~String> - The IP range to revoke

  • DBSecurityGroupName <~String> - The name for the DB Security Group.

  • EC2SecurityGroupName <~String> - Name of the EC2 Security Group to revoke.

  • EC2SecurityGroupOwnerId <~String> - AWS Account Number of the owner of the security group specified in the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.

Returns

  • response<~Excon::Response>:

    • body<~Hash>:



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb', line 18

def revoke_db_security_group_ingress(name, opts={})
  unless opts.key?('CIDRIP') || (opts.key?('EC2SecurityGroupName') && opts.key?('EC2SecurityGroupOwnerId'))
    raise ArgumentError, 'Must specify CIDRIP, or both EC2SecurityGroupName and EC2SecurityGroupOwnerId'
  end

  request({
    'Action'  => 'RevokeDBSecurityGroupIngress',
    :parser   => Fog::Parsers::AWS::RDS::RevokeDBSecurityGroupIngress.new,
    'DBSecurityGroupName' => name
  }.merge(opts))

end