You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::RDS::Resource

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb

Actions collapse

Associations collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Resource

Returns a new instance of Resource

Parameters:

  • options ({}) (defaults to: {})

Options Hash (options):



13
14
15
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 13

def initialize(options = {})
  @client = options[:client] || Client.new(options)
end

Instance Method Details

#account_quotas(options = {}) ⇒ AccountQuota::Collection

Examples:

Request syntax with placeholder values


rds.()

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Returns:



1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1513

def (options = {})
  batches = Enumerator.new do |y|
    batch = []
    resp = @client.(options)
    resp.data..each do |a|
      batch << AccountQuota.new(
        name: a.,
        data: a,
        client: @client
      )
    end
    y.yield(batch)
  end
  AccountQuota::Collection.new(batches)
end

#certificate(id) ⇒ Certificate

Parameters:

  • id (String)

Returns:



1531
1532
1533
1534
1535
1536
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1531

def certificate(id)
  Certificate.new(
    id: id,
    client: @client
  )
end

#certificates(options = {}) ⇒ Certificate::Collection

Examples:

Request syntax with placeholder values


certificates = rds.certificates({
  certificate_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :certificate_identifier (String)

    The user-supplied certificate identifier. If this parameter is specified, information for only the identified certificate is returned. This parameter isn't case-sensitive.

    Constraints:

    • Must match an existing CertificateIdentifier.

    ^

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • :marker (String)

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

Returns:



1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1579

def certificates(options = {})
  batches = Enumerator.new do |y|
    batch = []
    resp = @client.describe_certificates(options)
    resp.data.certificates.each do |c|
      batch << Certificate.new(
        id: c.certificate_identifier,
        data: c,
        client: @client
      )
    end
    y.yield(batch)
  end
  Certificate::Collection.new(batches)
end

#clientClient

Returns:



18
19
20
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 18

def client
  @client
end

#create_db_cluster(options = {}) ⇒ DBCluster

Examples:

Request syntax with placeholder values


dbcluster = rds.create_db_cluster({
  availability_zones: ["String"],
  backup_retention_period: 1,
  character_set_name: "String",
  database_name: "String",
  db_cluster_identifier: "String", # required
  db_cluster_parameter_group_name: "String",
  vpc_security_group_ids: ["String"],
  db_subnet_group_name: "String",
  engine: "String", # required
  engine_version: "String",
  port: 1,
  master_username: "String",
  master_user_password: "String",
  option_group_name: "String",
  preferred_backup_window: "String",
  preferred_maintenance_window: "String",
  replication_source_identifier: "String",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  storage_encrypted: false,
  kms_key_id: "String",
  pre_signed_url: "String",
  enable_iam_database_authentication: false,
  source_region: "String",
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :availability_zones (Array<String>)

    A list of EC2 Availability Zones that instances in the DB cluster can be created in. For information on AWS Regions and Availability Zones, see Regions and Availability Zones.

  • :backup_retention_period (Integer)

    The number of days for which automated backups are retained. You must specify a minimum value of 1.

    Default: 1

    Constraints:

    • Must be a value from 1 to 35

    ^

  • :character_set_name (String)

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

  • :database_name (String)

    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.

  • :db_cluster_identifier (required, String)

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

    Constraints:

    • Must contain from 1 to 63 letters, numbers, or hyphens.

    • First character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

    Example: my-cluster1

  • :db_cluster_parameter_group_name (String)

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

    Constraints:

    • If supplied, must match the name of an existing DBClusterParameterGroup.

    ^

  • :vpc_security_group_ids (Array<String>)

    A list of EC2 VPC security groups to associate with this DB cluster.

  • :db_subnet_group_name (String)

    A DB subnet group to associate with this DB cluster.

    Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.

    Example: mySubnetgroup

  • :engine (required, String)

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

    Valid Values: aurora, aurora-postgresql

  • :engine_version (String)

    The version number of the database engine to use.

    Aurora

    Example: 5.6.10a

  • :port (Integer)

    The port number on which the instances in the DB cluster accept connections.

    Default: 3306

  • :master_username (String)

    The name of the master user for the DB cluster.

    Constraints:

    • Must be 1 to 16 letters or numbers.

    • First character must be a letter.

    • Cannot be a reserved word for the chosen database engine.

  • :master_user_password (String)

    The password for the master database user. This password can contain any printable ASCII character except "/", """, or "@".

    Constraints: Must contain from 8 to 41 characters.

  • :option_group_name (String)

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

    Permanent options can't be removed from an option group. The option group can't be removed from a DB cluster once it is associated with a DB cluster.

  • :preferred_backup_window (String)

    The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.

    Constraints:

    • Must be in the format hh24:mi-hh24:mi.

    • Must be in Universal Coordinated Time (UTC).

    • Must not conflict with the preferred maintenance window.

    • Must be at least 30 minutes.

  • :preferred_maintenance_window (String)

    The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

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

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS 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.

  • :replication_source_identifier (String)

    The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

  • :storage_encrypted (Boolean)

    Specifies whether the DB cluster is encrypted.

  • :kms_key_id (String)

    The AWS KMS key identifier for an encrypted DB cluster.

    The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.

    If an encryption key is not specified in KmsKeyId:

    • If ReplicationSourceIdentifier identifies an encrypted source, then Amazon RDS will use the encryption key used to encrypt the source. Otherwise, Amazon RDS will use your default encryption key.

    • If the StorageEncrypted parameter is true and ReplicationSourceIdentifier is not specified, then Amazon RDS will use your default encryption key.

    AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS Region.

    If you create a Read Replica of an encrypted DB cluster in another AWS Region, you must set KmsKeyId to a KMS key ID that is valid in the destination AWS Region. This key is used to encrypt the Read Replica in that AWS Region.

  • :pre_signed_url (String)

    A URL that contains a Signature Version 4 signed request for the CreateDBCluster action to be called in the source AWS Region where the DB cluster is replicated from. You only need to specify PreSignedUrl when you are performing cross-region replication from an encrypted DB cluster.

    The pre-signed URL must be a valid request for the CreateDBCluster API action that can be executed in the source AWS Region that contains the encrypted DB cluster to be copied.

    The pre-signed URL request must contain the following parameter values:

    • KmsKeyId - The AWS KMS key identifier for the key to use to encrypt the copy of the DB cluster in the destination AWS Region. This should refer to the same KMS key for both the CreateDBCluster action that is called in the destination AWS Region, and the action contained in the pre-signed URL.

    • DestinationRegion - The name of the AWS Region that Aurora Read Replica will be created in.

    • ReplicationSourceIdentifier - The DB cluster identifier for the encrypted DB cluster to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source AWS Region. For example, if you are copying an encrypted DB cluster from the us-west-2 AWS Region, then your ReplicationSourceIdentifier would look like Example: arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1.

    To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process.

  • :enable_iam_database_authentication (Boolean)

    True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.

    Default: false

  • :destination_region (String)
  • :source_region (String)

    The source region of the snapshot. This is only needed when the shapshot is encrypted and in a different region.

Returns:



281
282
283
284
285
286
287
288
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 281

def create_db_cluster(options = {})
  resp = @client.create_db_cluster(options)
  DBCluster.new(
    id: options[:db_cluster][:db_cluster_identifier],
    data: resp.data.db_cluster,
    client: @client
  )
end

#create_db_cluster_parameter_group(options = {}) ⇒ DBClusterParameterGroup

Examples:

Request syntax with placeholder values


dbclusterparametergroup = rds.create_db_cluster_parameter_group({
  db_cluster_parameter_group_name: "String", # required
  db_parameter_group_family: "String", # required
  description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_cluster_parameter_group_name (required, String)

    The name of the DB cluster parameter group.

    Constraints:

    • Must match the name of an existing DBClusterParameterGroup.

    ^

    This value is stored as a lowercase string.

  • :db_parameter_group_family (required, String)

    The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.

  • :description (required, String)

    The description for the DB cluster parameter group.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

Returns:



332
333
334
335
336
337
338
339
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 332

def create_db_cluster_parameter_group(options = {})
  resp = @client.create_db_cluster_parameter_group(options)
  DBClusterParameterGroup.new(
    name: resp.data.db_cluster_parameter_group.db_cluster_parameter_group_name,
    data: resp.data.db_cluster_parameter_group,
    client: @client
  )
end

#create_db_instance(options = {}) ⇒ DBInstance

Examples:

Request syntax with placeholder values


dbinstance = rds.create_db_instance({
  db_name: "String",
  db_instance_identifier: "String", # required
  allocated_storage: 1,
  db_instance_class: "String", # required
  engine: "String", # required
  master_username: "String",
  master_user_password: "String",
  db_security_groups: ["String"],
  vpc_security_group_ids: ["String"],
  availability_zone: "String",
  db_subnet_group_name: "String",
  preferred_maintenance_window: "String",
  db_parameter_group_name: "String",
  backup_retention_period: 1,
  preferred_backup_window: "String",
  port: 1,
  multi_az: false,
  engine_version: "String",
  auto_minor_version_upgrade: false,
  license_model: "String",
  iops: 1,
  option_group_name: "String",
  character_set_name: "String",
  publicly_accessible: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  db_cluster_identifier: "String",
  storage_type: "String",
  tde_credential_arn: "String",
  tde_credential_password: "String",
  storage_encrypted: false,
  kms_key_id: "String",
  domain: "String",
  copy_tags_to_snapshot: false,
  monitoring_interval: 1,
  monitoring_role_arn: "String",
  domain_iam_role_name: "String",
  promotion_tier: 1,
  timezone: "String",
  enable_iam_database_authentication: false,
  enable_performance_insights: false,
  performance_insights_kms_key_id: "String",
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_name (String)

    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:

    • Must contain 1 to 64 letters or numbers.

    • Cannot be a word reserved by the specified database engine

    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:

    • Must contain 1 to 64 letters or numbers.

    • Cannot be a word reserved by the specified database engine

    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:

    • Must contain 1 to 63 letters, numbers, or underscores.

    • Must begin with a letter or an underscore. Subsequent characters can be letters, underscores, or digits (0-9).

    • Cannot be a word reserved by the specified database engine

    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:

    • Cannot be longer than 8 characters

    ^

    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:

    • Must contain 1 to 64 letters or numbers.

    • Cannot be a word reserved by the specified database engine

  • :db_instance_identifier (required, String)

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

    Constraints:

    • Must contain from 1 to 63 letters, numbers, or hyphens.

    • First character must be a letter.

    • Cannot end with a hyphen or contain two consecutive hyphens.

    Example: mydbinstance

  • :allocated_storage (Integer)

    The amount of storage (in gigabytes) to be initially allocated for the DB instance.

    Type: Integer

    Amazon Aurora

    Not applicable. Aurora cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in an Aurora cluster volume.

    MySQL

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2): Must be an integer from 5 to

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 6144.

    • Magnetic storage (standard): Must be an integer from 5 to 3072.

    MariaDB

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2): Must be an integer from 5 to

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 6144.

    • Magnetic storage (standard): Must be an integer from 5 to 3072.

    PostgreSQL

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2): Must be an integer from 5 to

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 6144.

    • Magnetic storage (standard): Must be an integer from 5 to 3072.

    Oracle

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2): Must be an integer from 10 to

    • Provisioned IOPS storage (io1): Must be an integer from 100 to 6144.

    • Magnetic storage (standard): Must be an integer from 10 to 3072.

    SQL Server

    Constraints to the amount of storage for each storage type are the following:

    • General Purpose (SSD) storage (gp2):

      • Enterprise and Standard editions: Must be an integer from 200 to

      • Web and Express editions: Must be an integer from 20 to 16384.

    • Provisioned IOPS storage (io1):

      • Enterprise and Standard editions: Must be an integer from 200 to

      • Web and Express editions: Must be an integer from 100 to 16384.

    • Magnetic storage (standard):

      • Enterprise and Standard editions: Must be an integer from 200 to

      • Web and Express editions: Must be an integer from 20 to 1024.

  • :db_instance_class (required, String)

    The compute and memory capacity of the DB instance, for example, db.m4.large. Not all DB instance classes are available in all AWS Regions, or for all database engines. For the full list of DB instance classes, and availability for your engine, see DB Instance Class in the Amazon RDS User Guide.

  • :engine (required, String)

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

    Not every database engine is available for every AWS Region.

    Valid Values:

    • aurora

    • aurora-postgresql

    • mariadb

    • mysql

    • oracle-ee

    • oracle-se2

    • oracle-se1

    • oracle-se

    • postgres

    • sqlserver-ee

    • sqlserver-se

    • sqlserver-ex

    • sqlserver-web

  • :master_username (String)

    The name for the master user.

    Amazon Aurora

    Not applicable. The name for the master user is managed by the DB cluster. For more information, see CreateDBCluster.

    MariaDB

    Constraints:

    • Required for MariaDB.

    • Must be 1 to 16 letters or numbers.

    • Cannot be a reserved word for the chosen database engine.

    Microsoft SQL Server

    Constraints:

    • Required for SQL Server.

    • Must be 1 to 128 letters or numbers.

    • The first character must be a letter.

    • Cannot be a reserved word for the chosen database engine.

    MySQL

    Constraints:

    • Required for MySQL.

    • Must be 1 to 16 letters or numbers.

    • First character must be a letter.

    • Cannot be a reserved word for the chosen database engine.

    Oracle

    Constraints:

    • Required for Oracle.

    • Must be 1 to 30 letters or numbers.

    • First character must be a letter.

    • Cannot be a reserved word for the chosen database engine.

    PostgreSQL

    Constraints:

    • Required for PostgreSQL.

    • Must be 1 to 63 letters or numbers.

    • First character must be a letter.

    • Cannot be a reserved word for the chosen database engine.

  • :master_user_password (String)

    The password for the master user. The password can include any printable ASCII character except "/", """, or "@".

    Amazon Aurora

    Not applicable. The password for the master user is managed by the DB cluster. For more information, see CreateDBCluster.

    MariaDB

    Constraints: Must contain from 8 to 41 characters.

    Microsoft SQL Server

    Constraints: Must contain from 8 to 128 characters.

    MySQL

    Constraints: Must contain from 8 to 41 characters.

    Oracle

    Constraints: Must contain from 8 to 30 characters.

    PostgreSQL

    Constraints: Must contain from 8 to 128 characters.

  • :db_security_groups (Array<String>)

    A list of DB security groups to associate with this DB instance.

    Default: The default DB security group for the database engine.

  • :vpc_security_group_ids (Array<String>)

    A list of EC2 VPC security groups to associate with this DB instance.

    Amazon Aurora

    Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. For more information, see CreateDBCluster.

    Default: The default EC2 VPC security group for the DB subnet group's VPC.

  • :availability_zone (String)

    The EC2 Availability Zone that the DB instance is created in. For information on AWS Regions and Availability Zones, see Regions and Availability Zones.

    Default: A random, system-chosen Availability Zone in the endpoint's AWS Region.

    Example: us-east-1d

    Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter is set to true. The specified Availability Zone must be in the same AWS Region as the current endpoint.

  • :db_subnet_group_name (String)

    A DB subnet group to associate with this DB instance.

    If there is no DB subnet group, then it is a non-VPC DB instance.

  • :preferred_maintenance_window (String)

    The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). For more information, see Amazon RDS Maintenance Window.

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

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

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

    Constraints: Minimum 30-minute window.

  • :db_parameter_group_name (String)

    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 is used.

    Constraints:

    • Must be 1 to 255 letters, numbers, or hyphens.

    • First character must be a letter

    • Cannot end with a hyphen or contain two consecutive hyphens

  • :backup_retention_period (Integer)

    The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.

    Amazon Aurora

    Not applicable. The retention period for automated backups is managed by the DB cluster. For more information, see CreateDBCluster.

    Default: 1

    Constraints:

    • Must be a value from 0 to 35

    • Cannot be set to 0 if the DB instance is a source to Read Replicas

  • :preferred_backup_window (String)

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

    Amazon Aurora

    Not applicable. The daily time range for creating automated backups is managed by the DB cluster. For more information, see CreateDBCluster.

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see Adjusting the Preferred DB Instance Maintenance Window.

    Constraints:

    • Must be in the format hh24:mi-hh24:mi.

    • Must be in Universal Coordinated Time (UTC).

    • Must not conflict with the preferred maintenance window.

    • Must be at least 30 minutes.

  • :port (Integer)

    The port number on which the database accepts connections.

    MySQL

    Default: 3306

    Valid Values: 1150-65535

    Type: Integer

    MariaDB

    Default: 3306

    Valid Values: 1150-65535

    Type: Integer

    PostgreSQL

    Default: 5432

    Valid Values: 1150-65535

    Type: Integer

    Oracle

    Default: 1521

    Valid Values: 1150-65535

    SQL Server

    Default: 1433

    Valid Values: 1150-65535 except for 1434, 3389, 47001, 49152, and 49152 through 49156.

    Amazon Aurora

    Default: 3306

    Valid Values: 1150-65535

    Type: Integer

  • :multi_az (Boolean)

    Specifies if the DB instance is a Multi-AZ deployment. You can't set the AvailabilityZone parameter if the MultiAZ parameter is set to true.

  • :engine_version (String)

    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

    Not applicable. The version number of the database engine to be used by the DB instance is managed by the DB cluster. For more information, see CreateDBCluster.

    MariaDB

    • 10.1.23 (supported in all AWS Regions)

    • 10.1.19 (supported in all AWS Regions)

    • 10.1.14 (supported in all AWS Regions except us-east-2)

    • 10.0.31 (supported in all AWS Regions)

    • 10.0.28 (supported in all AWS Regions)

    • 10.0.24 (supported in all AWS Regions)

    • 10.0.17 (supported in all AWS Regions except us-east-2, ca-central-1, eu-west-2)

    Microsoft SQL Server 2016

    • 13.00.4422.0.v1 (supported for all editions, and all AWS Regions)

    • 13.00.2164.0.v1 (supported for all editions, and all AWS Regions)

    Microsoft SQL Server 2014

    • 12.00.5546.0.v1 (supported for all editions, and all AWS Regions)

    • 12.00.5000.0.v1 (supported for all editions, and all AWS Regions)

    • 12.00.4422.0.v1 (supported for all editions except Enterprise Edition, and all AWS Regions except ca-central-1 and eu-west-2)

    Microsoft SQL Server 2012

    • 11.00.6594.0.v1 (supported for all editions, and all AWS Regions)

    • 11.00.6020.0.v1 (supported for all editions, and all AWS Regions)

    • 11.00.5058.0.v1 (supported for all editions, and all AWS Regions except us-east-2, ca-central-1, and eu-west-2)

    • 11.00.2100.60.v1 (supported for all editions, and all AWS Regions except us-east-2, ca-central-1, and eu-west-2)

    Microsoft SQL Server 2008 R2

    • 10.50.6529.0.v1 (supported for all editions, and all AWS Regions except us-east-2, ca-central-1, and eu-west-2)

    • 10.50.6000.34.v1 (supported for all editions, and all AWS Regions except us-east-2, ca-central-1, and eu-west-2)

    • 10.50.2789.0.v1 (supported for all editions, and all AWS Regions except us-east-2, ca-central-1, and eu-west-2)

    MySQL

    • 5.7.19 (supported in all AWS regions)

    • 5.7.17 (supported in all AWS regions)

    • 5.7.16 (supported in all AWS regions)

    • 5.6.37 (supported in all AWS Regions)

    • 5.6.35 (supported in all AWS Regions)

    • 5.6.34 (supported in all AWS Regions)

    • 5.6.29 (supported in all AWS Regions)

    • 5.6.27 (supported in all AWS Regions except us-east-2, ca-central-1, eu-west-2)

    • 5.5.57 (supported in all AWS Regions)

    • 5.5.54 (supported in all AWS Regions)

    • 5.5.53 (supported in all AWS Regions)

    • 5.5.46 (supported in all AWS Regions)

    Oracle 12c

    • 12.1.0.2.v9 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)

    • 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)

    • 12.1.0.2.v6 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)

    • 12.1.0.2.v5 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)

    • 12.1.0.2.v4 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)

    • 12.1.0.2.v3 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)

    • 12.1.0.2.v2 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)

    • 12.1.0.2.v1 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)

    Oracle 11g

    • 11.2.0.4.v13 (supported for EE, SE1, and SE, in all AWS regions)

    • 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)

    • 11.2.0.4.v9 (supported for EE, SE1, and SE, in all AWS regions)

    • 11.2.0.4.v8 (supported for EE, SE1, and SE, in all AWS regions)

    • 11.2.0.4.v7 (supported for EE, SE1, and SE, in all AWS regions)

    • 11.2.0.4.v6 (supported for EE, SE1, and SE, in all AWS regions)

    • 11.2.0.4.v5 (supported for EE, SE1, and SE, in all AWS regions)

    • 11.2.0.4.v4 (supported for EE, SE1, and SE, in all AWS regions)

    • 11.2.0.4.v3 (supported for EE, SE1, and SE, in all AWS regions)

    • 11.2.0.4.v1 (supported for EE, SE1, and SE, in all AWS regions)

    PostgreSQL

    • Version 9.6.x: 9.6.5 | 9.6.3 | 9.6.2 | 9.6.1

    • Version 9.5.x: 9.5.9 | 9.5.7 | 9.5.6 | 9.5.4 | 9.5.2

    • Version 9.4.x: 9.4.14 | 9.4.12 | 9.4.11 | 9.4.9 | 9.4.7

    • Version 9.3.x: 9.3.19 | 9.3.17 | 9.3.16 | 9.3.14 | 9.3.12

  • :auto_minor_version_upgrade (Boolean)

    Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.

    Default: true

  • :license_model (String)

    License model information for this DB instance.

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

  • :iops (Integer)

    The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance. For information about valid Iops values, see see Amazon RDS Provisioned IOPS Storage to Improve Performance.

    Constraints: Must be a multiple between 3 and 10 of the storage amount for the DB instance. Must also be an integer multiple of 1000. For example, if the size of your DB instance is 500 GB, then your Iops value can be 2000, 3000, 4000, or 5000.

  • :option_group_name (String)

    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, can't be removed from an option group, and that option group can't be removed from a DB instance once it is associated with a DB instance

  • :character_set_name (String)

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

    Amazon Aurora

    Not applicable. The character set is managed by the DB cluster. For more information, see CreateDBCluster.

  • :publicly_accessible (Boolean)

    Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.

    Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.

    • Default VPC: true

    • VPC: false

    If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance is publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance is private.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

  • :db_cluster_identifier (String)

    The identifier of the DB cluster that the instance will belong to.

    For information on creating a DB cluster, see CreateDBCluster.

    Type: String

  • :storage_type (String)

    Specifies the storage type to be associated with the DB instance.

    Valid values: standard | gp2 | io1

    If you specify io1, you must also include a value for the Iops parameter.

    Default: io1 if the Iops parameter is specified, otherwise standard

  • :tde_credential_arn (String)

    The ARN from the key store with which to associate the instance for TDE encryption.

  • :tde_credential_password (String)

    The password for the given ARN from the key store in order to access the device.

  • :storage_encrypted (Boolean)

    Specifies whether the DB instance is encrypted.

    Amazon Aurora

    Not applicable. The encryption for DB instances is managed by the DB cluster. For more information, see CreateDBCluster.

    Default: false

  • :kms_key_id (String)

    The AWS KMS key identifier for an encrypted DB instance.

    The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB instance with the same AWS account that owns the KMS encryption key used to encrypt the new DB instance, then you can use the KMS key alias instead of the ARN for the KM encryption key.

    Amazon Aurora

    Not applicable. The KMS key identifier is managed by the DB cluster. For more information, see CreateDBCluster.

    If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS Region.

  • :domain (String)

    Specify the Active Directory Domain to create the instance in.

  • :copy_tags_to_snapshot (Boolean)

    True to copy all tags from the DB instance to snapshots of the DB instance, and otherwise false. The default is false.

  • :monitoring_interval (Integer)

    The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.

    If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.

    Valid Values: 0, 1, 5, 10, 15, 30, 60

  • :monitoring_role_arn (String)

    The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. For information on creating a monitoring role, go to Setting Up and Enabling Enhanced Monitoring.

    If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.

  • :domain_iam_role_name (String)

    Specify the name of the IAM role to be used when making API calls to the Directory Service.

  • :promotion_tier (Integer)

    A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see Fault Tolerance for an Aurora DB Cluster.

    Default: 1

    Valid Values: 0 - 15

  • :timezone (String)

    The time zone of the DB instance. The time zone parameter is currently supported only by Microsoft SQL Server.

  • :enable_iam_database_authentication (Boolean)

    True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.

    You can enable IAM database authentication for the following database engines:

    Amazon Aurora

    Not applicable. Mapping AWS IAM accounts to database accounts is managed by the DB cluster. For more information, see CreateDBCluster.

    MySQL

    • For MySQL 5.6, minor version 5.6.34 or higher

    • For MySQL 5.7, minor version 5.7.16 or higher

    Default: false

  • :enable_performance_insights (Boolean)

    True to enable Performance Insights for the DB instance, and otherwise false.

  • :performance_insights_kms_key_id (String)

    The AWS KMS key identifier for encryption of Performance Insights data. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.

Returns:



1219
1220
1221
1222
1223
1224
1225
1226
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1219

def create_db_instance(options = {})
  resp = @client.create_db_instance(options)
  DBInstance.new(
    id: resp.data.db_instance.db_instance_identifier,
    data: resp.data.db_instance,
    client: @client
  )
end

#create_db_parameter_group(options = {}) ⇒ DBParameterGroup

Examples:

Request syntax with placeholder values


dbparametergroup = rds.create_db_parameter_group({
  db_parameter_group_name: "String", # required
  db_parameter_group_family: "String", # required
  description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_parameter_group_name (required, String)

    The name of the DB parameter group.

    Constraints:

    • Must be 1 to 255 letters, numbers, or hyphens.

    • First character must be a letter

    • Cannot end with a hyphen or contain two consecutive hyphens

    This value is stored as a lowercase string.

  • :db_parameter_group_family (required, String)

    The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.

  • :description (required, String)

    The description for the DB parameter group.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

Returns:



1271
1272
1273
1274
1275
1276
1277
1278
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1271

def create_db_parameter_group(options = {})
  resp = @client.create_db_parameter_group(options)
  DBParameterGroup.new(
    name: resp.data.db_parameter_group.db_parameter_group_name,
    data: resp.data.db_parameter_group,
    client: @client
  )
end

#create_db_security_group(options = {}) ⇒ DBSecurityGroup

Examples:

Request syntax with placeholder values


dbsecuritygroup = rds.create_db_security_group({
  db_security_group_name: "String", # required
  db_security_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_security_group_name (required, String)

    The name for the DB security group. This value is stored as a lowercase string.

    Constraints:

    • Must be 1 to 255 letters, numbers, or hyphens.

    • First character must be a letter

    • Cannot end with a hyphen or contain two consecutive hyphens

    • Must not be "Default"

    Example: mysecuritygroup

  • :db_security_group_description (required, String)

    The description for the DB security group.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

Returns:



1318
1319
1320
1321
1322
1323
1324
1325
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1318

def create_db_security_group(options = {})
  resp = @client.create_db_security_group(options)
  DBSecurityGroup.new(
    name: resp.data.db_security_group.db_security_group_name,
    data: resp.data.db_security_group,
    client: @client
  )
end

#create_db_subnet_group(options = {}) ⇒ DBSubnetGroup

Examples:

Request syntax with placeholder values


dbsubnetgroup = rds.create_db_subnet_group({
  db_subnet_group_name: "String", # required
  db_subnet_group_description: "String", # required
  subnet_ids: ["String"], # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_subnet_group_name (required, String)

    The name for the DB subnet group. This value is stored as a lowercase string.

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

    Example: mySubnetgroup

  • :db_subnet_group_description (required, String)

    The description for the DB subnet group.

  • :subnet_ids (required, Array<String>)

    The EC2 Subnet IDs for the DB subnet group.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

Returns:



1361
1362
1363
1364
1365
1366
1367
1368
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1361

def create_db_subnet_group(options = {})
  resp = @client.create_db_subnet_group(options)
  DBSubnetGroup.new(
    name: resp.data.db_subnet_group.db_subnet_group_name,
    data: resp.data.db_subnet_group,
    client: @client
  )
end

#create_event_subscription(options = {}) ⇒ EventSubscription

Examples:

Request syntax with placeholder values


eventsubscription = rds.create_event_subscription({
  subscription_name: "String", # required
  sns_topic_arn: "String", # required
  source_type: "String",
  event_categories: ["String"],
  source_ids: ["String"],
  enabled: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :subscription_name (required, String)

    The name of the subscription.

    Constraints: The name must be less than 255 characters.

  • :sns_topic_arn (required, String)

    The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

  • :source_type (String)

    The type of source that is 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.

    Valid values: db-instance | db-cluster | db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot

  • :event_categories (Array<String>)

    A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType in the Events topic in the Amazon RDS User Guide or by using the DescribeEventCategories action.

  • :source_ids (Array<String>)

    The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.

    Constraints:

    • If SourceIds are supplied, SourceType must also be provided.

    • If the source type is a DB instance, then a DBInstanceIdentifier must be supplied.

    • If the source type is a DB security group, a DBSecurityGroupName must be supplied.

    • If the source type is a DB parameter group, a DBParameterGroupName must be supplied.

    • If the source type is a DB snapshot, a DBSnapshotIdentifier must be supplied.

  • :enabled (Boolean)

    A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

Returns:



1445
1446
1447
1448
1449
1450
1451
1452
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1445

def create_event_subscription(options = {})
  resp = @client.create_event_subscription(options)
  EventSubscription.new(
    name: resp.data.event_subscription.cust_subscription_id,
    data: resp.data.event_subscription,
    client: @client
  )
end

#create_option_group(options = {}) ⇒ OptionGroup

Examples:

Request syntax with placeholder values


optiongroup = rds.create_option_group({
  option_group_name: "String", # required
  engine_name: "String", # required
  major_engine_version: "String", # required
  option_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :option_group_name (required, String)

    Specifies the name of the option group to be created.

    Constraints:

    • Must be 1 to 255 letters, numbers, or hyphens

    • First character must be a letter

    • Cannot end with a hyphen or contain two consecutive hyphens

    Example: myoptiongroup

  • :engine_name (required, String)

    Specifies the name of the engine that this option group should be associated with.

  • :major_engine_version (required, String)

    Specifies the major version of the engine that this option group should be associated with.

  • :option_group_description (required, String)

    The description of the option group.

  • :tags (Array<Types::Tag>)

    A list of tags. For more information, see Tagging Amazon RDS Resources.

Returns:



1497
1498
1499
1500
1501
1502
1503
1504
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1497

def create_option_group(options = {})
  resp = @client.create_option_group(options)
  OptionGroup.new(
    name: resp.data.option_group.option_group_name,
    data: resp.data.option_group,
    client: @client
  )
end

#db_cluster(id) ⇒ DBCluster

Parameters:

  • id (String)

Returns:



1597
1598
1599
1600
1601
1602
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1597

def db_cluster(id)
  DBCluster.new(
    id: id,
    client: @client
  )
end

#db_cluster_parameter_group(name) ⇒ DBClusterParameterGroup

Parameters:

  • name (String)

Returns:



1606
1607
1608
1609
1610
1611
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1606

def db_cluster_parameter_group(name)
  DBClusterParameterGroup.new(
    name: name,
    client: @client
  )
end

#db_cluster_parameter_groups(options = {}) ⇒ DBClusterParameterGroup::Collection

Examples:

Request syntax with placeholder values


db_cluster_parameter_groups = rds.db_cluster_parameter_groups({
  db_cluster_parameter_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_cluster_parameter_group_name (String)

    The name of a specific DB cluster parameter group to return details for.

    Constraints:

    • If supplied, must match the name of an existing DBClusterParameterGroup.

    ^

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :max_records (Integer)

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • :marker (String)

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

Returns:



1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1654

def db_cluster_parameter_groups(options = {})
  batches = Enumerator.new do |y|
    batch = []
    resp = @client.describe_db_cluster_parameter_groups(options)
    resp.data.db_cluster_parameter_groups.each do |d|
      batch << DBClusterParameterGroup.new(
        name: d.db_cluster_parameter_group_name,
        data: d,
        client: @client
      )
    end
    y.yield(batch)
  end
  DBClusterParameterGroup::Collection.new(batches)
end

#db_clusters(options = {}) ⇒ DBCluster::Collection

Examples:

Request syntax with placeholder values


db_clusters = rds.db_clusters({
  db_cluster_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_cluster_identifier (String)

    The user-supplied DB cluster identifier. If this parameter is specified, information from only the specific DB cluster is returned. This parameter isn't case-sensitive.

    Constraints:

    • If supplied, must match an existing DBClusterIdentifier.

    ^

  • :filters (Array<Types::Filter>)

    A filter that specifies one or more DB clusters to describe.

    Supported filters:

    • db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include information about the DB clusters identified by these ARNs.

    ^

  • :max_records (Integer)

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • :marker (String)

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

Returns:



1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1718

def db_clusters(options = {})
  batches = Enumerator.new do |y|
    batch = []
    resp = @client.describe_db_clusters(options)
    resp.data.db_clusters.each do |d|
      batch << DBCluster.new(
        id: d.db_cluster_identifier,
        data: d,
        client: @client
      )
    end
    y.yield(batch)
  end
  DBCluster::Collection.new(batches)
end

#db_engine(name) ⇒ DBEngine

Parameters:

  • name (String)

Returns:



1736
1737
1738
1739
1740
1741
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1736

def db_engine(name)
  DBEngine.new(
    name: name,
    client: @client
  )
end

#db_engine_version(engine_name, version) ⇒ DBEngineVersion

Parameters:

  • engine_name (String)
  • version (String)

Returns:



1746
1747
1748
1749
1750
1751
1752
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1746

def db_engine_version(engine_name, version)
  DBEngineVersion.new(
    engine_name: engine_name,
    version: version,
    client: @client
  )
end

#db_engine_versions(options = {}) ⇒ DBEngineVersion::Collection

Examples:

Request syntax with placeholder values


db_engine_versions = rds.db_engine_versions({
  engine: "String",
  engine_version: "String",
  db_parameter_group_family: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  default_only: false,
  list_supported_character_sets: false,
  list_supported_timezones: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :engine (String)

    The database engine to return.

  • :engine_version (String)

    The database engine version to return.

    Example: 5.1.49

  • :db_parameter_group_family (String)

    The name of a specific DB parameter group family to return details for.

    Constraints:

    • If supplied, must match an existing DBParameterGroupFamily.

    ^

  • :filters (Array<Types::Filter>)

    Not currently supported.

  • :default_only (Boolean)

    Indicates that only the default version of the specified engine or engine and major version combination is returned.

  • :list_supported_character_sets (Boolean)

    If this parameter is specified and the requested engine supports the CharacterSetName parameter for CreateDBInstance, the response includes a list of supported character sets for each engine version.

  • :list_supported_timezones (Boolean)

    If this parameter is specified and the requested engine supports the TimeZone parameter for CreateDBInstance, the response includes a list of supported time zones for each engine version.

Returns:



1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1800

def db_engine_versions(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_db_engine_versions(options)
    resp.each_page do |page|
      batch = []
      page.data.db_engine_versions.each do |d|
        batch << DBEngineVersion.new(
          engine_name: d.engine,
          version: d.engine_version,
          data: d,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  DBEngineVersion::Collection.new(batches)
end

#db_instance(id) ⇒ DBInstance

Parameters:

  • id (String)

Returns:



1821
1822
1823
1824
1825
1826
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1821

def db_instance(id)
  DBInstance.new(
    id: id,
    client: @client
  )
end

#db_instances(options = {}) ⇒ DBInstance::Collection

Examples:

Request syntax with placeholder values


db_instances = rds.db_instances({
  db_instance_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_instance_identifier (String)

    The user-supplied instance identifier. If this parameter is specified, information from only the specific DB instance is returned. This parameter isn't case-sensitive.

    Constraints:

    • If supplied, must match the identifier of an existing DBInstance.

    ^

  • :filters (Array<Types::Filter>)

    A filter that specifies one or more DB instances to describe.

    Supported filters:

    • db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include information about the DB instances associated with the DB clusters identified by these ARNs.

    • db-instance-id - Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs). The results list will only include information about the DB instances identified by these ARNs.

Returns:



1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1864

def db_instances(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_db_instances(options)
    resp.each_page do |page|
      batch = []
      page.data.db_instances.each do |d|
        batch << DBInstance.new(
          id: d.db_instance_identifier,
          data: d,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  DBInstance::Collection.new(batches)
end

#db_parameter_group(name) ⇒ DBParameterGroup

Parameters:

  • name (String)

Returns:



1884
1885
1886
1887
1888
1889
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1884

def db_parameter_group(name)
  DBParameterGroup.new(
    name: name,
    client: @client
  )
end

#db_parameter_group_family(name) ⇒ DBParameterGroupFamily

Parameters:

  • name (String)

Returns:



1893
1894
1895
1896
1897
1898
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1893

def db_parameter_group_family(name)
  DBParameterGroupFamily.new(
    name: name,
    client: @client
  )
end

#db_parameter_groups(options = {}) ⇒ DBParameterGroup::Collection

Examples:

Request syntax with placeholder values


db_parameter_groups = rds.db_parameter_groups({
  db_parameter_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_parameter_group_name (String)

    The name of a specific DB parameter group to return details for.

    Constraints:

    • If supplied, must match the name of an existing DBClusterParameterGroup.

    ^

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1924

def db_parameter_groups(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_db_parameter_groups(options)
    resp.each_page do |page|
      batch = []
      page.data.db_parameter_groups.each do |d|
        batch << DBParameterGroup.new(
          name: d.db_parameter_group_name,
          data: d,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  DBParameterGroup::Collection.new(batches)
end

#db_security_group(name) ⇒ DBSecurityGroup

Parameters:

  • name (String)

Returns:



1944
1945
1946
1947
1948
1949
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1944

def db_security_group(name)
  DBSecurityGroup.new(
    name: name,
    client: @client
  )
end

#db_security_groups(options = {}) ⇒ DBSecurityGroup::Collection

Examples:

Request syntax with placeholder values


db_security_groups = rds.db_security_groups({
  db_security_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_security_group_name (String)

    The name of the DB security group to return details for.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 1968

def db_security_groups(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_db_security_groups(options)
    resp.each_page do |page|
      batch = []
      page.data.db_security_groups.each do |d|
        batch << DBSecurityGroup.new(
          name: d.db_security_group_name,
          data: d,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  DBSecurityGroup::Collection.new(batches)
end

#db_snapshots(options = {}) ⇒ DBSnapshot::Collection

Examples:

Request syntax with placeholder values


db_snapshots = rds.db_snapshots({
  db_instance_identifier: "String",
  db_snapshot_identifier: "String",
  snapshot_type: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  include_shared: false,
  include_public: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_instance_identifier (String)

    The ID of the DB instance to retrieve the list of DB snapshots for. This parameter can't be used in conjunction with DBSnapshotIdentifier. This parameter is not case-sensitive.

    Constraints:

    • If supplied, must match the identifier of an existing DBInstance.

    ^

  • :db_snapshot_identifier (String)

    A specific DB snapshot identifier to describe. This parameter can't be used in conjunction with DBInstanceIdentifier. This value is stored as a lowercase string.

    Constraints:

    • If supplied, must match the identifier of an existing DBSnapshot.

    • If this identifier is for an automated snapshot, the SnapshotType parameter must also be specified.

  • :snapshot_type (String)

    The type of snapshots to be returned. You can specify one of the following values:

    • automated - Return all DB snapshots that have been automatically taken by Amazon RDS for my AWS account.

    • manual - Return all DB snapshots that have been taken by my AWS account.

    • shared - Return all manual DB snapshots that have been shared to my AWS account.

    • public - Return all DB snapshots that have been marked as public.

    If you don't specify a SnapshotType value, then both automated and manual snapshots are returned. Shared and public DB snapshots are not included in the returned results by default. You can include shared snapshots with these results by setting the IncludeShared parameter to true. You can include public snapshots with these results by setting the IncludePublic parameter to true.

    The IncludeShared and IncludePublic parameters don't apply for SnapshotType values of manual or automated. The IncludePublic parameter doesn't apply when SnapshotType is set to shared. The IncludeShared parameter doesn't apply when SnapshotType is set to public.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :include_shared (Boolean)

    True to include shared manual DB snapshots from other AWS accounts that this AWS account has been given permission to copy or restore, and otherwise false. The default is false.

    You can give an AWS account permission to restore a manual DB snapshot from another AWS account by using the ModifyDBSnapshotAttribute API action.

  • :include_public (Boolean)

    True to include manual DB snapshots that are public and can be copied or restored by any AWS account, and otherwise false. The default is false.

    You can share a manual DB snapshot as public by using the ModifyDBSnapshotAttribute API.

Returns:



2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2068

def db_snapshots(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_db_snapshots(options)
    resp.each_page do |page|
      batch = []
      page.data.db_snapshots.each do |d|
        batch << DBSnapshot.new(
          instance_id: d.db_instance_identifier,
          snapshot_id: d.db_snapshot_identifier,
          data: d,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  DBSnapshot::Collection.new(batches)
end

#db_subnet_group(name) ⇒ DBSubnetGroup

Parameters:

  • name (String)

Returns:



2089
2090
2091
2092
2093
2094
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2089

def db_subnet_group(name)
  DBSubnetGroup.new(
    name: name,
    client: @client
  )
end

#db_subnet_groups(options = {}) ⇒ DBSubnetGroup::Collection

Examples:

Request syntax with placeholder values


db_subnet_groups = rds.db_subnet_groups({
  db_subnet_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :db_subnet_group_name (String)

    The name of the DB subnet group to return details for.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2113

def db_subnet_groups(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_db_subnet_groups(options)
    resp.each_page do |page|
      batch = []
      page.data.db_subnet_groups.each do |d|
        batch << DBSubnetGroup.new(
          name: d.db_subnet_group_name,
          data: d,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  DBSubnetGroup::Collection.new(batches)
end

#event_category_map(source_type) ⇒ EventCategoryMap

Parameters:

  • source_type (String)

Returns:



2133
2134
2135
2136
2137
2138
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2133

def event_category_map(source_type)
  EventCategoryMap.new(
    source_type: source_type,
    client: @client
  )
end

#event_category_maps(options = {}) ⇒ EventCategoryMap::Collection

Examples:

Request syntax with placeholder values


event_category_maps = rds.event_category_maps({
  source_type: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :source_type (String)

    The type of source that is generating the events.

    Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2160

def event_category_maps(options = {})
  batches = Enumerator.new do |y|
    batch = []
    resp = @client.describe_event_categories(options)
    resp.data.event_categories_map_list.each do |e|
      batch << EventCategoryMap.new(
        source_type: e.source_type,
        data: e,
        client: @client
      )
    end
    y.yield(batch)
  end
  EventCategoryMap::Collection.new(batches)
end

#event_subscription(name) ⇒ EventSubscription

Parameters:

  • name (String)

Returns:



2178
2179
2180
2181
2182
2183
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2178

def event_subscription(name)
  EventSubscription.new(
    name: name,
    client: @client
  )
end

#event_subscriptions(options = {}) ⇒ EventSubscription::Collection

Examples:

Request syntax with placeholder values


event_subscriptions = rds.event_subscriptions({
  subscription_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :subscription_name (String)

    The name of the RDS event notification subscription you want to describe.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2203

def event_subscriptions(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_event_subscriptions(options)
    resp.each_page do |page|
      batch = []
      page.data.event_subscriptions_list.each do |e|
        batch << EventSubscription.new(
          name: e.cust_subscription_id,
          data: e,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  EventSubscription::Collection.new(batches)
end

#events(options = {}) ⇒ Event::Collection

Examples:

Request syntax with placeholder values


events = rds.events({
  source_identifier: "String",
  source_type: "db-instance", # accepts db-instance, db-parameter-group, db-security-group, db-snapshot, db-cluster, db-cluster-snapshot
  start_time: Time.now,
  end_time: Time.now,
  duration: 1,
  event_categories: ["String"],
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :source_identifier (String)

    The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.

    Constraints:

    • If SourceIdentifier is supplied, SourceType must also be provided.

    • If the source type is DBInstance, then a DBInstanceIdentifier must be supplied.

    • If the source type is DBSecurityGroup, a DBSecurityGroupName must be supplied.

    • If the source type is DBParameterGroup, a DBParameterGroupName must be supplied.

    • If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied.

    • Cannot end with a hyphen or contain two consecutive hyphens.

  • :source_type (String)

    The event source to retrieve events for. If no value is specified, all events are returned.

  • :start_time (Time, DateTime, Date, Integer, String)

    The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.

    Example: 2009-07-08T18:00Z

  • :end_time (Time, DateTime, Date, Integer, String)

    The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.

    Example: 2009-07-08T18:00Z

  • :duration (Integer)

    The number of minutes to retrieve events for.

    Default: 60

  • :event_categories (Array<String>)

    A list of event categories that trigger notifications for a event notification subscription.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2292

def events(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_events(options)
    resp.each_page do |page|
      batch = []
      page.data.events.each do |e|
        batch << Event.new(
          source_id: e.source_identifier,
          date: e.date,
          data: e,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  Event::Collection.new(batches)
end

#option_group(name) ⇒ OptionGroup

Parameters:

  • name (String)

Returns:



2313
2314
2315
2316
2317
2318
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2313

def option_group(name)
  OptionGroup.new(
    name: name,
    client: @client
  )
end

#option_groups(options = {}) ⇒ OptionGroup::Collection

Examples:

Request syntax with placeholder values


option_groups = rds.option_groups({
  option_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  engine_name: "String",
  major_engine_version: "String",
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :option_group_name (String)

    The name of the option group to describe. Cannot be supplied together with EngineName or MajorEngineVersion.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

  • :engine_name (String)

    Filters the list of option groups to only include groups associated with a specific database engine.

  • :major_engine_version (String)

    Filters the list of option groups to only include groups associated with a specific database engine version. If specified, then EngineName must also be specified.

Returns:



2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2347

def option_groups(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_option_groups(options)
    resp.each_page do |page|
      batch = []
      page.data.option_groups_list.each do |o|
        batch << OptionGroup.new(
          name: o.option_group_name,
          data: o,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  OptionGroup::Collection.new(batches)
end

#pending_maintenance_action(target_arn, name) ⇒ PendingMaintenanceAction

Parameters:

  • target_arn (String)
  • name (String)

Returns:



2368
2369
2370
2371
2372
2373
2374
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2368

def pending_maintenance_action(target_arn, name)
  PendingMaintenanceAction.new(
    target_arn: target_arn,
    name: name,
    client: @client
  )
end

#reserved_db_instance(id) ⇒ ReservedDBInstance

Parameters:

  • id (String)

Returns:



2378
2379
2380
2381
2382
2383
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2378

def reserved_db_instance(id)
  ReservedDBInstance.new(
    id: id,
    client: @client
  )
end

#reserved_db_instances(options = {}) ⇒ ReservedDBInstance::Collection

Examples:

Request syntax with placeholder values


reserved_db_instances = rds.reserved_db_instances({
  reserved_db_instance_id: "String",
  reserved_db_instances_offering_id: "String",
  db_instance_class: "String",
  duration: "String",
  product_description: "String",
  offering_type: "String",
  multi_az: false,
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :reserved_db_instance_id (String)

    The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.

  • :reserved_db_instances_offering_id (String)

    The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.

  • :db_instance_class (String)

    The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.

  • :duration (String)

    The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.

    Valid Values: 1 | 3 | 31536000 | 94608000

  • :product_description (String)

    The product description filter value. Specify this parameter to show only those reservations matching the specified product description.

  • :offering_type (String)

    The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.

    Valid Values: "Partial Upfront" | "All Upfront" | "No Upfront"

  • :multi_az (Boolean)

    The Multi-AZ filter value. Specify this parameter to show only those reservations matching the specified Multi-AZ parameter.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2433

def reserved_db_instances(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_reserved_db_instances(options)
    resp.each_page do |page|
      batch = []
      page.data.reserved_db_instances.each do |r|
        batch << ReservedDBInstance.new(
          id: r.reserved_db_instance_id,
          data: r,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  ReservedDBInstance::Collection.new(batches)
end

#reserved_db_instances_offering(id) ⇒ ReservedDBInstancesOffering

Parameters:

  • id (String)

Returns:



2453
2454
2455
2456
2457
2458
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2453

def reserved_db_instances_offering(id)
  ReservedDBInstancesOffering.new(
    id: id,
    client: @client
  )
end

#reserved_db_instances_offerings(options = {}) ⇒ ReservedDBInstancesOffering::Collection

Examples:

Request syntax with placeholder values


reserved_db_instances_offerings = rds.reserved_db_instances_offerings({
  reserved_db_instances_offering_id: "String",
  db_instance_class: "String",
  duration: "String",
  product_description: "String",
  offering_type: "String",
  multi_az: false,
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :reserved_db_instances_offering_id (String)

    The offering identifier filter value. Specify this parameter to show only the available offering that matches the specified reservation identifier.

    Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706

  • :db_instance_class (String)

    The DB instance class filter value. Specify this parameter to show only the available offerings matching the specified DB instance class.

  • :duration (String)

    Duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.

    Valid Values: 1 | 3 | 31536000 | 94608000

  • :product_description (String)

    Product description filter value. Specify this parameter to show only the available offerings matching the specified product description.

  • :offering_type (String)

    The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.

    Valid Values: "Partial Upfront" | "All Upfront" | "No Upfront"

  • :multi_az (Boolean)

    The Multi-AZ filter value. Specify this parameter to show only the available offerings matching the specified Multi-AZ parameter.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2505

def reserved_db_instances_offerings(options = {})
  batches = Enumerator.new do |y|
    resp = @client.describe_reserved_db_instances_offerings(options)
    resp.each_page do |page|
      batch = []
      page.data.reserved_db_instances_offerings.each do |r|
        batch << ReservedDBInstancesOffering.new(
          id: r.reserved_db_instances_offering_id,
          data: r,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  ReservedDBInstancesOffering::Collection.new(batches)
end

#resource_with_pending_maintenance_actions(arn) ⇒ ResourcePendingMaintenanceActionList

Parameters:

  • arn (String)

Returns:



2525
2526
2527
2528
2529
2530
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2525

def resource_with_pending_maintenance_actions(arn)
  ResourcePendingMaintenanceActionList.new(
    arn: arn,
    client: @client
  )
end

#resources_with_pending_maintenance_actions(options = {}) ⇒ ResourcePendingMaintenanceActionList::Collection

Examples:

Request syntax with placeholder values


resources_with_pending_maintenance_actions = rds.resources_with_pending_maintenance_actions({
  resource_identifier: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  marker: "String",
  max_records: 1,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :resource_identifier (String)

    The ARN of a resource to return pending maintenance actions for.

  • :filters (Array<Types::Filter>)

    A filter that specifies one or more resources to return pending maintenance actions for.

    Supported filters:

    • db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include pending maintenance actions for the DB clusters identified by these ARNs.

    • db-instance-id - Accepts DB instance identifiers and DB instance ARNs. The results list will only include pending maintenance actions for the DB instances identified by these ARNs.

  • :marker (String)

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

  • :max_records (Integer)

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

    Default: 100

    Constraints: Minimum 20, maximum 100.

Returns:



2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/resource.rb', line 2577

def resources_with_pending_maintenance_actions(options = {})
  batches = Enumerator.new do |y|
    batch = []
    resp = @client.describe_pending_maintenance_actions(options)
    resp.data.pending_maintenance_actions.each do |p|
      batch << ResourcePendingMaintenanceActionList.new(
        arn: p.resource_identifier,
        data: p,
        client: @client
      )
    end
    y.yield(batch)
  end
  ResourcePendingMaintenanceActionList::Collection.new(batches)
end