class Fog::AWS::RDS::Real
Attributes
Public Class Methods
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. For instance, 'eu-west-1', 'us-east-1' and etc.
-
Returns¶ ↑
# File lib/fog/aws/rds.rb, line 213 def initialize(options={}) @use_iam_profile = options[:use_iam_profile] @instrumentor = options[:instrumentor] @instrumentor_name = options[:instrumentor_name] || 'fog.aws.rds' @connection_options = options[:connection_options] || {} @region = options[:region] || 'us-east-1' @host = options[:host] || "rds.#{@region}.amazonaws.com" @path = options[:path] || '/' @persistent = options[:persistent] || false @port = options[:port] || 443 @scheme = options[:scheme] || 'https' @connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options) @version = options[:version] || '2014-10-31' setup_credentials(options) end
Public Instance Methods
Copy a db snapshot
Parameters
¶ ↑
-
source_db_snapshot_identifier<~String> - Id of db snapshot
-
target_db_snapshot_identifier<~String> - Desired Id of the db snapshot copy
-
'copy_tags'<~Boolean> - true to copy all tags from the source DB snapshot to the target DB snapshot; otherwise false.
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/copy_db_snapshot.rb, line 19 def copy_db_snapshot(source_db_snapshot_identifier, target_db_snapshot_identifier, copy_tags = false) request( 'Action' => 'CopyDBSnapshot', 'SourceDBSnapshotIdentifier' => source_db_snapshot_identifier, 'TargetDBSnapshotIdentifier' => target_db_snapshot_identifier, 'CopyTags' => copy_tags, :parser => Fog::Parsers::AWS::RDS::CopyDBSnapshot.new ) end
Create a db cluster
@see docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html
Parameters
====¶ ↑
-
AvailabilityZones<~Array> - A list of EC2 Availability Zones that instances in the DB cluster can be created in
-
BackupRetentionPeriod<~String> - The number of days for which automated backups are retained
-
CharacterSetName<~String> - A value that indicates that the DB cluster should be associated with the specified CharacterSet
-
DatabaseName<~String> - 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 -
DBClusterIdentifier<~String> - The DB cluster identifier. This parameter is stored as a lowercase string
-
DBClusterParameterGroupName<~String> - The name of the DB cluster parameter group to associate with this DB cluster
-
DBSubnetGroupName<~String> - A DB subnet group to associate with this DB cluster
-
Engine<~String> - The name of the database engine to be used for this DB cluster
-
EngineVersion<~String> - The version number of the database engine to use
-
KmsKeyId<~String> - The
KMS
key identifier for an encrypted DB cluster -
MasterUsername<~String> - The name of the master user for the client DB cluster
-
MasterUserPassword<~String> - The password for the master database user
-
OptionGroupName<~String> - A value that indicates that the DB cluster should be associated with the specified option group
-
Port<~Integer> - The port number on which the instances in the DB cluster accept connections
-
PreferredBackupWindow<~String> - The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter
-
PreferredMaintenanceWindow<~String> - The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC)
-
StorageEncrypted<~Boolean> - Specifies whether the DB cluster is encrypted
-
Tags<~Array> - A list of tags
-
VpcSecurityGroups<~Array> - A list of EC2 VPC security groups to associate with this DB cluster
Returns ====¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/create_db_cluster.rb, line 36 def create_db_cluster(cluster_name, options={}) if security_groups = options.delete('VpcSecurityGroups') options.merge!(Fog::AWS.indexed_param('VpcSecurityGroupIds.member.%d', [*security_groups])) end request({ 'Action' => 'CreateDBCluster', 'DBClusterIdentifier' => cluster_name, :parser => Fog::Parsers::AWS::RDS::CreateDBCluster.new, }.merge(options)) end
create a snapshot of a db cluster docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBClusterSnapshot.html
Parameters
====¶ ↑
-
DBClusterIdentifier<~String> - The identifier of the DB cluster to create a snapshot for
-
DBClusterSnapshotIdentifier<~String> - The identifier of the DB cluster snapshot
-
Tags<~Array> - The tags to be assigned to the DB cluster snapshot
Returns ====¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/create_db_cluster_snapshot.rb, line 19 def create_db_cluster_snapshot(identifier, name) request( 'Action' => 'CreateDBClusterSnapshot', 'DBClusterIdentifier' => identifier, 'DBClusterSnapshotIdentifier' => name, :parser => Fog::Parsers::AWS::RDS::CreateDBClusterSnapshot.new ) end
Create a db instance
@param DBInstanceIdentifier [String] name of the db instance to modify @param AllocatedStorage [Integer] Storage
space, in GB @param AutoMinorVersionUpgrade [Boolean] Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window @param AvailabilityZone [String] The availability zone to create the instance in @param BackupRetentionPeriod [Integer] 0-8 The number of days to retain automated backups. @param DBInstanceClass [String] The new compute and memory capacity of the DB Instance @param DBName [String] The name of the database to create when the DB Instance is created @param DBParameterGroupName [String] The name of the DB Parameter
Group to apply to this DB Instance @param DBSecurityGroups [Array] A list of DB Security Groups to authorize on this DB Instance @param Engine [String] The name of the database engine to be used for this instance. @param EngineVersion [String] The version number of the database engine to use. @param Iops [Integer] IOPS rate @param MasterUsername [String] The db master user @param MasterUserPassword [String] The new password for the DB Instance master user @param MultiAZ [Boolean] Specifies if the DB Instance is a Multi-AZ deployment @param Port [Integer] The port number on which the database accepts connections. @param PreferredBackupWindow [String] The daily time range during which automated backups are created if automated backups are enabled @param PreferredMaintenanceWindow [String] The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage @param DBSubnetGroupName [String] The name, if any, of the VPC subnet for this RDS
instance @param PubliclyAccessible [Boolean] Whether an RDS
instance inside of the VPC subnet should have a public-facing endpoint @param VpcSecurityGroups [Array] A list of VPC Security Groups to authorize on this DB instance @param StorageType [string] Specifies storage type to be associated with the DB Instance. Valid values: standard | gp2 | io1
@return [Excon::Response]:
* body [Hash]:
@see docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html
# File lib/fog/aws/requests/rds/create_db_instance.rb, line 36 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 if vpc_security_groups = options.delete('VpcSecurityGroups') options.merge!(Fog::AWS.indexed_param('VpcSecurityGroupIds.member.%d', [*vpc_security_groups])) end request({ 'Action' => 'CreateDBInstance', 'DBInstanceIdentifier' => db_name, :parser => Fog::Parsers::AWS::RDS::CreateDBInstance.new, }.merge(options)) end
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>:
-
# File lib/fog/aws/requests/rds/create_db_instance_read_replica.rb, line 19 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 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>:
-
# File lib/fog/aws/requests/rds/create_db_parameter_group.rb, line 17 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
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>:
-
# File lib/fog/aws/requests/rds/create_db_security_group.rb, line 15 def create_db_security_group(name, description = name) request({ 'Action' => 'CreateDBSecurityGroup', 'DBSecurityGroupName' => name, 'DBSecurityGroupDescription' => description, :parser => Fog::Parsers::AWS::RDS::CreateDBSecurityGroup.new }) end
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>:
-
# File lib/fog/aws/requests/rds/create_db_snapshot.rb, line 15 def create_db_snapshot(identifier, name) request({ 'Action' => 'CreateDBSnapshot', 'DBInstanceIdentifier' => identifier, 'DBSnapshotIdentifier' => name, :parser => Fog::Parsers::AWS::RDS::CreateDBSnapshot.new }) end
Creates a db subnet group docs.amazonwebservices.com/AmazonRDS/2012-01-15/APIReference/API_CreateDBSubnetGroup.html
Parameters
¶ ↑
-
DBSubnetGroupName <~String> - The name for the DB Subnet Group. This value is stored as a lowercase string. Must contain no more than 255 alphanumeric characters or hyphens. Must not be “Default”.
-
SubnetIds <~Array> - The EC2 Subnet IDs for the DB Subnet Group.
-
DBSubnetGroupDescription <~String> - The description for the DB Subnet Group
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/create_db_subnet_group.rb, line 16 def create_db_subnet_group(name, subnet_ids, description = name) params = { 'Action' => 'CreateDBSubnetGroup', 'DBSubnetGroupName' => name, 'DBSubnetGroupDescription' => description, :parser => Fog::Parsers::AWS::RDS::CreateDBSubnetGroup.new } params.merge!(Fog::AWS.indexed_param("SubnetIds.member", Array(subnet_ids))) request(params) end
Subscribes a db instance to an SNS
queue
@see docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateEventSubscription.html
Parameters
¶ ↑
-
Enabled <~Boolean> - set to true to activate the subscription, set to false to create the subscription but not active it
-
EventCategories <~Array> - A list of event categories for a SourceType that you want to subscribe to
-
SnsTopicArn <~String> - The Amazon Resource Name of the
SNS
topic created for event notification -
SourceIds <~Array> - The list of identifiers of the event sources for which events will be returned
-
SourceType <~String> - The type of source that will be generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value is not specified, all events are returned
-
SubscriptionName <~String> - The name of the subscription
-
Tags <~Array> - A list of tags
# File lib/fog/aws/requests/rds/create_event_subscription.rb, line 18 def create_event_subscription(options={}) if event_categories = options.delete("EventCategories") options.merge!(Fog::AWS.indexed_param('EventCategories.member.%d', [*event_categories])) end if source_ids = options.delete("SourceIds") options.merge!(Fog::AWS.indexed_param('SourceIds.member.%d', [*source_ids])) end if tags = options.delete("tags") options.merge!(Fog::AWS.indexed_param('Tags.member.%d', [*tags])) end request({ "Action" => "CreateEventSubscription", :parser => Fog::Parsers::AWS::RDS::CreateEventSubscription.new, }.merge(options)) end
delete a database cluster
@see docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBCluster.html
Parameters
====¶ ↑
-
DBClusterIdentifier <~String> - The DB cluster identifier for the DB cluster to be deleted
-
FinalDBSnapshotIdentifier <~String> - The DB cluster snapshot identifier of the new DB cluster snapshot created when SkipFinalSnapshot is set to false
-
SkipFinalSnapshot <~Boolean> - Determines whether a final DB cluster snapshot is created before the DB cluster is deleted
Returns ====¶ ↑
-
response<~Excon::Response>
-
body<~Hash>
-
# File lib/fog/aws/requests/rds/delete_db_cluster.rb, line 20 def delete_db_cluster(identifier, snapshot_identifier, skip_snapshot = false) params = {} params["FinalDBSnapshotIdentifier"] = snapshot_identifier if snapshot_identifier request({ 'Action' => 'DeleteDBCluster', 'DBClusterIdentifier' => identifier, 'SkipFinalSnapshot' => skip_snapshot, }.merge(params)) end
delete a db cluster snapshot docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBClusterSnapshot.html
Parameters
====¶ ↑
-
DBClusterSnapshotIdentifier<~String> - The identifier of the DB cluster snapshot to delete
Returns ====¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/delete_db_cluster_snapshot.rb, line 17 def delete_db_cluster_snapshot(name) request( 'Action' => 'DeleteDBClusterSnapshot', 'DBClusterSnapshotIdentifier' => name, :parser => Fog::Parsers::AWS::RDS::DeleteDBClusterSnapshot.new ) end
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>:
-
# File lib/fog/aws/requests/rds/delete_db_instance.rb, line 17 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 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>:
-
# File lib/fog/aws/requests/rds/delete_db_parameter_group.rb, line 14 def delete_db_parameter_group(group_name) request({ 'Action' => 'DeleteDBParameterGroup', 'DBParameterGroupName' => group_name, :parser => Fog::Parsers::AWS::RDS::DeleteDbParameterGroup.new }) end
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>:
-
# File lib/fog/aws/requests/rds/delete_db_security_group.rb, line 14 def delete_db_security_group(name) request({ 'Action' => 'DeleteDBSecurityGroup', 'DBSecurityGroupName' => name, :parser => Fog::Parsers::AWS::RDS::DeleteDBSecurityGroup.new }) end
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>:
-
# File lib/fog/aws/requests/rds/delete_db_snapshot.rb, line 14 def delete_db_snapshot(name) request({ 'Action' => 'DeleteDBSnapshot', 'DBSnapshotIdentifier' => name, :parser => Fog::Parsers::AWS::RDS::DeleteDBSnapshot.new }) end
Deletes a db subnet group docs.aws.amazon.com/AmazonRDS/2013-09-09/APIReference/API_DeleteDBSubnetGroup.html
Parameters
¶ ↑
-
DBSubnetGroupName <~String> - The name for the DB Subnet 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>:
-
# File lib/fog/aws/requests/rds/delete_db_subnet_group.rb, line 14 def delete_db_subnet_group(name) params = { 'Action' => 'DeleteDBSubnetGroup', 'DBSubnetGroupName' => name, :parser => Fog::Parsers::AWS::RDS::DeleteDBSubnetGroup.new } request(params) end
deletes an event subscription docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteEventSubscription.html
Parameters
¶ ↑
-
SubscriptionName <~String> - The name of the subscription to delete
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>
-
# File lib/fog/aws/requests/rds/delete_event_subscription.rb, line 15 def delete_event_subscription(name) request({ 'Action' => 'DeleteEventSubscription', 'SubscriptionName' => name, :parser => Fog::Parsers::AWS::RDS::DeleteEventSubscription.new }) end
Describe all or specified db cluster snapshots docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBClusterSnapshots.html
Parameters
====¶ ↑
-
DBClusterIdentifier<~String> - A DB cluster identifier to retrieve the list of DB cluster snapshots for
-
DBClusterSnapshotIdentifier<~String> - A specific DB cluster snapshot identifier to describe
-
SnapshotType<~String> - The type of DB cluster snapshots that will be returned. Values can be automated or manual
Returns ====¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/describe_db_cluster_snapshots.rb, line 19 def describe_db_cluster_snapshots(opts={}) params = {} params['SnapshotType'] = opts[:type] if opts[:type] params['DBClusterIdentifier'] = opts[:identifier] if opts[:identifier] params['DBClusterSnapshotIdentifier'] = 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' => 'DescribeDBClusterSnapshots', :parser => Fog::Parsers::AWS::RDS::DescribeDBClusterSnapshots.new }.merge(params)) end
Describe all or specified db clusters docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBClusters.html
Parameters
====¶ ↑
-
DBClusterIdentifier<~String> - The user-supplied DB cluster identifier
Returns ====¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/describe_db_clusters.rb, line 16 def describe_db_clusters(identifier=nil, opts={}) params = {} params['DBClusterIdentifier'] = identifier if identifier params['Marker'] = opts[:marker] if opts[:marker] params['MaxRecords'] = opts[:max_records] if opts[:max_records] request({ 'Action' => 'DescribeDBClusters', :parser => Fog::Parsers::AWS::RDS::DescribeDBClusters.new }.merge(params)) end
# File lib/fog/aws/requests/rds/describe_db_engine_versions.rb, line 7 def describe_db_engine_versions(opts={}) params = {} params['DBParameterGroupFamily'] = opts[:db_parameter_group_family] if opts[:db_parameter_group_family] params['DefaultOnly'] = opts[:default_only] if opts[:default_only] params['Engine'] = opts[:engine] if opts[:engine] params['EngineVersion'] = opts[:engine_version] if opts[:engine_version] params['Marker'] = opts[:marker] if opts[:marker] params['MaxRecords'] = opts[:max_records] if opts[:max_records] request({ 'Action' => 'DescribeDBEngineVersions', :parser => Fog::Parsers::AWS::RDS::DescribeDBEngineVersions.new }.merge(params)) end
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>:
-
# File lib/fog/aws/requests/rds/describe_db_instances.rb, line 14 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 log files for a DB instance docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DescribeDBLogFiles.html
Parameters
¶ ↑
-
DBInstanceIdentifier <~String> - ID of instance to retrieve information for. Required.
-
Options <~Hash> - Hash of options. Optional. The following keys are used:
-
:file_last_written <~Long> - Filter available log files for those written after this time. Optional.
-
:file_size <~Long> - Filters the available log files for files larger than the specified size. Optional.
-
:filename_contains <~String> - Filters the available log files for log file names that contain the specified string. Optional.
-
:marker <~String> - The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords. Optional.
-
:max_records <~Integer> - The maximum number of records to include in the response. If more records exist, a pagination token is included in the response. Optional.
-
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/describe_db_log_files.rb, line 20 def describe_db_log_files(rds_id=nil, opts={}) params = {} params['DBInstanceIdentifier'] = rds_id if rds_id params['Marker'] = opts[:marker] if opts[:marker] params['MaxRecords'] = opts[:max_records] if opts[:max_records] params['FilenameContains'] = opts[:filename_contains] if opts[:filename_contains] params['FileSize'] = opts[:file_size] if opts[:file_size] params['FileLastWritten'] = opts[:file_last_written] if opts[:file_last_written] request({ 'Action' => 'DescribeDBLogFiles', :parser => Fog::Parsers::AWS::RDS::DescribeDBLogFiles.new(rds_id) }.merge(params)) end
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>:
-
# File lib/fog/aws/requests/rds/describe_db_parameter_groups.rb, line 15 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 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>:
-
# File lib/fog/aws/requests/rds/describe_db_parameters.rb, line 15 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 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>:
-
# File lib/fog/aws/requests/rds/describe_db_reserved_instances.rb, line 14 def describe_db_reserved_instances(identifier=nil, opts={}) params = {} params['ReservedDBInstanceId'] = identifier if identifier if opts[:marker] params['Marker'] = opts[:marker] end if opts[:max_records] params['MaxRecords'] = opts[:max_records] end request({ 'Action' => 'DescribeReservedDBInstances', :parser => Fog::Parsers::AWS::RDS::DescribeDBReservedInstances.new }.merge(params)) end
Describe all or specified db security groups 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>:
-
# File lib/fog/aws/requests/rds/describe_db_security_groups.rb, line 17 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 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
-
SnapshotType <~String> - type of snapshot to retrive (automated|manual)
-
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>:
-
# File lib/fog/aws/requests/rds/describe_db_snapshots.rb, line 19 def describe_db_snapshots(opts={}) params = {} params['SnapshotType'] = opts[:type] if opts[:type] 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
This API returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the list will contain only the descriptions of the specified DBSubnetGroup docs.amazonwebservices.com/AmazonRDS/2012-01-15/APIReference/API_DescribeDBSubnetGroups.html
Parameters
¶ ↑
-
DBSubnetGroupName <~String> - The name of a specific database subnet group to return details for.
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/describe_db_subnet_groups.rb, line 15 def describe_db_subnet_groups(name = nil, opts = {}) params = {} if opts[:marker] params['Marker'] = opts[:marker] end if name params['DBSubnetGroupName'] = name end if opts[:max_records] params['MaxRecords'] = opts[:max_records] end request({ 'Action' => 'DescribeDBSubnetGroups', :parser => Fog::Parsers::AWS::RDS::DescribeDBSubnetGroups.new }.merge(params)) end
Returns the default engine and system parameter information for the specified database engine docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEngineDefaultParameters.html
Parameters
====¶ ↑
-
DBParameterGroupFamily<~String> - The name of the DB parameter group family
Returns ====¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/describe_engine_default_parameters.rb, line 17 def describe_engine_default_parameters(family, opts={}) request({ 'Action' => 'DescribeEngineDefaultParameters', 'DBParameterGroupFamily' => family, :parser => Fog::Parsers::AWS::RDS::DescribeEngineDefaultParameters.new, }.merge(opts)) end
Describe all or specified event notifications docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEventSubscriptions.html
Parameters
¶ ↑
-
Marker <~String> - An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions request
-
MaxRecords <~String> - The maximum number of records to include in the response (20-100)
-
SubscriptionName <~String> - The name of the
RDS
event notification subscription you want to describe
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>
-
# File lib/fog/aws/requests/rds/describe_event_subscriptions.rb, line 16 def describe_event_subscriptions(options={}) if options[:max_records] params['MaxRecords'] = options[:max_records] end request({ 'Action' => 'DescribeEventSubscriptions', :parser => Fog::Parsers::AWS::RDS::DescribeEventSubscriptions.new }.merge(options)) end
Returns a list of service events
For more information see: docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DescribeEvents.html
Parameters
(optional)¶ ↑
-
options <~Hash> (optional):
-
:start_time <~DateTime> - starting time for event records
-
:end_time <~DateTime> - ending time for event records
-
:duration <~Integer> - The number of minutes to retrieve events for
Default = 60 Mins
-
:marker <~String> - marker provided in the previous request
-
:max_records <~Integer> - the maximum number of records to include
Default = 100 Constraints: min = 20, maximum 100
-
:source_identifier <~String> - identifier of the event source
-
:source_type <~DateTime> - event type, one of:
(db-instance | db-parameter-group | db-security-group | db-snapshot)
Returns¶ ↑
-
response <~Excon::Response>:
-
body <~Hash>
-
# File lib/fog/aws/requests/rds/describe_events.rb, line 28 def describe_events(options = {}) request( 'Action' => 'DescribeEvents', 'StartTime' => options[:start_time], 'EndTime' => options[:end_time], 'Duration' => options[:duration], 'Marker' => options[:marker], 'MaxRecords' => options[:max_records], 'SourceIdentifier' => options[:source_identifier], 'SourceType' => options[:source_type], :parser => Fog::Parsers::AWS::RDS::EventListParser.new ) end
Describe all or specified orderable db instances options docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeOrderableDBInstanceOptions.html
Parameters
¶ ↑
-
Engine <~String> - The name of the engine to retrieve DB Instance options for. Required.
-
Options <~Hash> - Hash of options. Optional. The following keys are used:
-
:db_instance_class <~String> - Filter available offerings matching the specified DB Instance class. Optional.
-
:engine_version <~String> - Filters available offerings matching the specified engine version. Optional.
-
:license_model <~String> - Filters available offerings matching the specified license model. Optional.
-
:marker <~String> - The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords. Optional.
-
:max_records <~Integer> - The maximum number of records to include in the response. If more records exist, a pagination token is included in the response. Optional.
-
:vpc <~Boolean> - Filter to show only the available VPC or non-VPC offerings. Optional.
-
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/describe_orderable_db_instance_options.rb, line 21 def describe_orderable_db_instance_options(engine=nil, opts={}) params = {} params['Engine'] = engine if engine params['DBInstanceClass'] = opts[:db_instance_class] if opts[:db_instance_class] params['EngineVersion'] = opts[:engine_version] if opts[:engine_version] params['LicenseModel'] = opts[:license_model] if opts[:license_model] params['Marker'] = opts[:marker] if opts[:marker] params['MaxRecords'] = opts[:max_records] if opts[:max_records] params['Vpc'] = opts[:vpc] if opts[:vpc] request({ 'Action' => 'DescribeOrderableDBInstanceOptions', :parser => Fog::Parsers::AWS::RDS::DescribeOrderableDBInstanceOptions.new }.merge(params)) end
Retrieve a portion of a log file of a db instance docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DownloadDBLogFilePortion.html
Parameters
¶ ↑
-
DBInstanceIdentifier <~String> - ID of instance to retrieve information for. Required.
-
LogFileName <~String> - The name of the log file to be downloaded. Required.
-
Options <~Hash> - Hash of options. Optional. The following keys are used:
-
:marker <~String> - The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords. Optional.
-
:max_records <~Integer> - The maximum number of records to include in the response. If more records exist, a pagination token is included in the response. Optional.
-
:number_of_lines <~Integer> - The number of lines to download. Optional.
-
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/download_db_logfile_portion.rb, line 19 def download_db_logfile_portion(identifier=nil, filename=nil, opts={}) params = {} params['DBInstanceIdentifier'] = identifier if identifier params['LogFileName'] = filename if filename params['Marker'] = opts[:marker] if opts[:marker] params['MaxRecords'] = opts[:max_records] if opts[:max_records] params['NumberOfLines'] = opts[:number_of_lines] if opts[:number_of_lines] request({ 'Action' => 'DownloadDBLogFilePortion', :parser => Fog::Parsers::AWS::RDS::DownloadDBLogFilePortion.new }.merge(params)) end
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.
-
Iops <~Integer> IOPS rate
-
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
-
VpcSecurityGroups <~Array> A list of VPC Security Group IDs to authorize on this DB instance
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/modify_db_instance.rb, line 30 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 if vpc_security_groups = options.delete('VpcSecurityGroups') options.merge!(Fog::AWS.indexed_param('VpcSecurityGroupIds.member.%d', [*vpc_security_groups])) end request({ 'Action' => 'ModifyDBInstance', 'DBInstanceIdentifier' => db_name, 'ApplyImmediately' => apply_immediately, :parser => Fog::Parsers::AWS::RDS::ModifyDBInstance.new }.merge(options)) end
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>:
-
# File lib/fog/aws/requests/rds/modify_db_parameter_group.rb, line 19 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
Modify db snapshot attributes
Parameters
¶ ↑
-
db_snapshot_identifier<~String> - Id of snapshot to modify
-
attributes<~Hash>:
-
'Add.MemberId'<~Array> - One or more account ids to grant rds create permission to
-
'Remove.MemberId'<~Array> - One or more account ids to revoke rds create permission from
-
# File lib/fog/aws/requests/rds/modify_db_snapshot_attribute.rb, line 17 def modify_db_snapshot_attribute(db_snapshot_identifier, attributes) params = {} params.merge!(Fog::AWS.indexed_param('ValuesToAdd.member.%d', attributes['Add.MemberId'] || [])) params.merge!(Fog::AWS.indexed_param('ValuesToRemove.member.%d', attributes['Remove.MemberId'] || [])) request({ 'Action' => 'ModifyDBSnapshotAttribute', 'DBSnapshotIdentifier' => db_snapshot_identifier, :idempotent => true, 'AttributeName' => "restore", :parser => Fog::Parsers::AWS::RDS::ModifyDbSnapshotAttribute.new }.merge!(params)) end
Creates a db subnet group docs.aws.amazon.com/AmazonRDS/2012-01-15/APIReference/API_ModifyDBSubnetGroup.html
Parameters
¶ ↑
-
DBSubnetGroupName <~String> - The name for the DB Subnet Group. This value is stored as a lowercase string. Must contain no more than 255 alphanumeric characters or hyphens. Must not be “Default”.
-
SubnetIds <~Array> - The EC2 Subnet IDs for the DB Subnet Group.
-
DBSubnetGroupDescription <~String> - The description for the DB Subnet Group
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/modify_db_subnet_group.rb, line 16 def modify_db_subnet_group(name, subnet_ids, description = nil) params = { 'Action' => 'ModifyDBSubnetGroup', 'DBSubnetGroupName' => name, 'DBSubnetGroupDescription' => description, :parser => Fog::Parsers::AWS::RDS::ModifyDBSubnetGroup.new } params.merge!(Fog::AWS.indexed_param("SubnetIds.member", Array(subnet_ids))) request(params) end
# File lib/fog/aws/rds.rb, line 231 def owner_id @owner_id ||= security_groups.get('default').owner_id end
promote a read replica to a writable RDS
instance docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_PromoteReadReplica.html
Parameters
¶ ↑
-
DBInstanceIdentifier <~String> - The DB Instance identifier for the DB Instance to be deleted.
-
BackupRetentionPeriod <~Integer> - The number of days to retain automated backups. Range: 0-8.
Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
-
PreferredBackupWindow <~String> - The daily time range during which automated backups are created if
automated backups are enabled, using the BackupRetentionPeriod parameter. Default: A 30-minute window selected at random from an 8-hour block of time per region.
See the Amazon RDS
User Guide for the time blocks for each region from which the default backup windows are assigned.
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/promote_read_replica.rb, line 23 def promote_read_replica(identifier, backup_retention_period = nil, preferred_backup_window = nil) params = {} params['BackupRetentionPeriod'] = backup_retention_period if backup_retention_period params['PreferredBackupWindow'] = preferred_backup_window if preferred_backup_window request({ 'Action' => 'PromoteReadReplica', 'DBInstanceIdentifier' => identifier, :parser => Fog::Parsers::AWS::RDS::PromoteReadReplica.new }.merge(params)) end
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>:
-
# File lib/fog/aws/requests/rds/reboot_db_instance.rb, line 14 def reboot_db_instance(instance_identifier) request({ 'Action' => 'RebootDBInstance', 'DBInstanceIdentifier' => instance_identifier, :parser => Fog::Parsers::AWS::RDS::RebootDBInstance.new, }) end
# File lib/fog/aws/rds.rb, line 235 def reload @connection.reset end
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>:
-
# File lib/fog/aws/requests/rds/restore_db_instance_from_db_snapshot.rb, line 12 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
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>:
-
# File lib/fog/aws/requests/rds/restore_db_instance_to_point_in_time.rb, line 12 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
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. TheAWS
Access Key ID is not an acceptable value.
Returns¶ ↑
-
response<~Excon::Response>:
-
body<~Hash>:
-
# File lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb, line 17 def revoke_db_security_group_ingress(name, opts={}) unless opts.key?('CIDRIP') || ((opts.key?('EC2SecurityGroupName') || opts.key?('EC2SecurityGroupId')) && opts.key?('EC2SecurityGroupOwnerId')) raise ArgumentError, 'Must specify CIDRIP, or one of EC2SecurityGroupName or EC2SecurityGroupId, and EC2SecurityGroupOwnerId' end request({ 'Action' => 'RevokeDBSecurityGroupIngress', :parser => Fog::Parsers::AWS::RDS::RevokeDBSecurityGroupIngress.new, 'DBSecurityGroupName' => name }.merge(opts)) end
Private Instance Methods
# File lib/fog/aws/rds.rb, line 279 def _request(body, headers, idempotent, parser) @connection.request({ :body => body, :expects => 200, :headers => headers, :idempotent => idempotent, :method => 'POST', :parser => parser }) rescue Excon::Errors::HTTPStatusError => error match = Fog::AWS::Errors.match_error(error) if match.empty? case error.message when 'Not Found' raise Fog::AWS::RDS::NotFound.slurp(error, 'RDS Instance not found') else raise end else raise case match[:code] when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound', 'SubscriptionNotFound', 'DBClusterNotFoundFault' Fog::AWS::RDS::NotFound.slurp(error, match[:message]) when 'DBParameterGroupAlreadyExists' Fog::AWS::RDS::IdentifierTaken.slurp(error, match[:message]) when 'AuthorizationAlreadyExists' Fog::AWS::RDS::AuthorizationAlreadyExists.slurp(error, match[:message]) else Fog::AWS::RDS::Error.slurp(error, "#{match[:code]} => #{match[:message]}") end end end
# File lib/fog/aws/rds.rb, line 250 def request(params) refresh_credentials_if_expired idempotent = params.delete(:idempotent) parser = params.delete(:parser) body, headers = Fog::AWS.signed_params_v4( params, {'Content-Type' => 'application/x-www-form-urlencoded' }, { :aws_session_token => @aws_session_token, :signer => @signer, :host => @host, :path => @path, :port => @port, :version => @version, :method => 'POST' } ) if @instrumentor @instrumentor.instrument("#{@instrumentor_name}.request", params) do _request(body, headers, idempotent, parser) end else _request(body, headers, idempotent, parser) end end
# File lib/fog/aws/rds.rb, line 241 def setup_credentials(options) @aws_access_key_id = options[:aws_access_key_id] @aws_secret_access_key = options[:aws_secret_access_key] @aws_session_token = options[:aws_session_token] @aws_credentials_expire_at = options[:aws_credentials_expire_at] @signer = Fog::AWS::SignatureV4.new( @aws_access_key_id, @aws_secret_access_key,@region,'rds') end