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

Class: Aws::RDS::DBSecurityGroup

Inherits:
Aws::Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Aws::Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Aws::Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Aws::Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(name, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(name, options = {}) ⇒ Object

    Parameters:

    • name (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :name (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#db_security_group_arnString (readonly)

The Amazon Resource Name (ARN) for the DB security group.

Returns:

  • (String)

    The Amazon Resource Name (ARN) for the DB security group.

#db_security_group_descriptionString (readonly)

Provides the description of the DB security group.

Returns:

  • (String)

    Provides the description of the DB security group.

#db_security_group_nameString (readonly)

Specifies the name of the DB security group.

Returns:

  • (String)

    Specifies the name of the DB security group.

#ec2_security_groupsArray<Types::EC2SecurityGroup> (readonly)

Contains a list of EC2SecurityGroup elements.

Returns:

#ip_rangesArray<Types::IPRange> (readonly)

Contains a list of IPRange elements.

Returns:

#nameString (readonly)

Returns:

  • (String)

#owner_idString (readonly)

Provides the AWS ID of the owner of a specific DB security group.

Returns:

  • (String)

    Provides the AWS ID of the owner of a specific DB security group.

#vpc_idString (readonly)

Provides the VpcId of the DB security group.

Returns:

  • (String)

    Provides the VpcId of the DB security group.

Instance Method Details

#authorize_ingress(options = {}) ⇒ DBSecurityGroup

Examples:

Request syntax example with placeholder values


dbsecuritygroup.authorize_ingress({
  cidrip: "String",
  ec2_security_group_name: "String",
  ec2_security_group_id: "String",
  ec2_security_group_owner_id: "String",
})

Basic usage

dbsecuritygroup = dbsecuritygroup.authorize_ingress(options)
dbsecuritygroup.name
#=> "dbsecuritygroup-name"

Options Hash (options):

  • :cidrip (String)

    The IP range to authorize.

  • :ec2_security_group_name (String)

    Name of the EC2 security group to authorize. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.

  • :ec2_security_group_id (String)

    Id of the EC2 security group to authorize. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.

  • :ec2_security_group_owner_id (String)

    AWS account number of the owner of the EC2 security group specified in the EC2SecurityGroupName parameter. The AWS access key ID isn\'t an acceptable value. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.

Returns:

See Also:

#create(options = {}) ⇒ DBSecurityGroup

Examples:

Request syntax example with placeholder values


dbsecuritygroup.create({
  db_security_group_description: "String", # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Basic usage

dbsecuritygroup = dbsecuritygroup.create(options)
dbsecuritygroup.name
#=> "dbsecuritygroup-name"

Options Hash (options):

  • :db_security_group_description (required, String)

    The description for the DB security group.

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

    Tags to assign to the DB security group.

Returns:

See Also:

#deleteStruct

Deletes a DB security group.

The specified DB security group must not be associated with any DB instances.

Examples:

Request syntax example with placeholder values


dbsecuritygroup.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#events(options = {}) ⇒ Collection<Event>

Returns a Collection of Event resources. No API requests are made until you call an enumerable method on the collection. Client#describe_events will be called multiple times until every Event has been yielded.

Examples:

Request syntax example with placeholder values


dbsecuritygroup.events({
  start_time: Time.now,
  end_time: Time.now,
  duration: 1,
  event_categories: ["String"],
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
  max_records: 1,
  marker: "String",
})

Enumerating Event resources.

dbsecuritygroup.events.each do |event|
  # yields each event
end

Enumerating Event resources with a limit.

dbsecuritygroup.events.limit(10).each do |event|
  # yields at most 10 events
end

Options Hash (options):

  • :start_time (Time)

    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)

    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 isn\'t 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 you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • :marker (String)

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

Returns:

See Also:

#revoke_ingress(options = {}) ⇒ DBSecurityGroup

Examples:

Request syntax example with placeholder values


dbsecuritygroup.revoke_ingress({
  cidrip: "String",
  ec2_security_group_name: "String",
  ec2_security_group_id: "String",
  ec2_security_group_owner_id: "String",
})

Basic usage

dbsecuritygroup = dbsecuritygroup.revoke_ingress(options)
dbsecuritygroup.name
#=> "dbsecuritygroup-name"

Options Hash (options):

  • :cidrip (String)

    The IP range to revoke access from. Must be a valid CIDR range. If CIDRIP is specified, EC2SecurityGroupName, EC2SecurityGroupId and EC2SecurityGroupOwnerId can\'t be provided.

  • :ec2_security_group_name (String)

    The name of the EC2 security group to revoke access from. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.

  • :ec2_security_group_id (String)

    The id of the EC2 security group to revoke access from. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.

  • :ec2_security_group_owner_id (String)

    The AWS account number of the owner of the EC2 security group specified in the EC2SecurityGroupName parameter. The AWS access key ID isn\'t an acceptable value. For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.

Returns:

See Also:

#subscribe_to(options = {}) ⇒ EventSubscription

Examples:

Request syntax example with placeholder values


dbsecuritygroup.subscribe_to({
  subscription_name: "String", # required
})

Basic usage

eventsubscription = dbsecuritygroup.subscribe_to(options)
eventsubscription.name
#=> "eventsubscription-name"

Options Hash (options):

  • :subscription_name (required, String)

    The name of the RDS event notification subscription you want to add a source identifier to.

Returns:

See Also:

#unsubscribe_from(options = {}) ⇒ EventSubscription

Examples:

Request syntax example with placeholder values


dbsecuritygroup.unsubscribe_from({
  subscription_name: "String", # required
})

Basic usage

eventsubscription = dbsecuritygroup.unsubscribe_from(options)
eventsubscription.name
#=> "eventsubscription-name"

Options Hash (options):

  • :subscription_name (required, String)

    The name of the RDS event notification subscription you want to remove a source identifier from.

Returns:

See Also: