Class: AWSCDK::RDS::CfnDBSecurityGroup::IngressProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rds/cfn_db_security_group.rb

Overview

The Ingress property type specifies an individual ingress rule within an AWS::RDS::DBSecurityGroup resource.

EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide , the blog EC2-Classic Networking is Retiring – Here’s How to Prepare , and Moving a DB instance not in a VPC into a VPC in the Amazon RDS User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cidrip: nil, ec2_security_group_id: nil, ec2_security_group_name: nil, ec2_security_group_owner_id: nil) ⇒ IngressProperty

Returns a new instance of IngressProperty.

Parameters:

  • cidrip (String, nil) (defaults to: nil)

    The IP range to authorize.

  • ec2_security_group_id (String, nil) (defaults to: nil)

    Id of the EC2 security group to authorize.

  • ec2_security_group_name (String, nil) (defaults to: nil)

    Name of the EC2 security group to authorize.

  • ec2_security_group_owner_id (String, nil) (defaults to: nil)

    AWS account number of the owner of the EC2 security group specified in the EC2SecurityGroupName parameter.



554
555
556
557
558
559
560
561
562
563
# File 'rds/cfn_db_security_group.rb', line 554

def initialize(cidrip: nil, ec2_security_group_id: nil, ec2_security_group_name: nil, ec2_security_group_owner_id: nil)
  @cidrip = cidrip
  Jsii::Type.check_type(@cidrip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidrip") unless @cidrip.nil?
  @ec2_security_group_id = ec2_security_group_id
  Jsii::Type.check_type(@ec2_security_group_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ec2SecurityGroupId") unless @ec2_security_group_id.nil?
  @ec2_security_group_name = ec2_security_group_name
  Jsii::Type.check_type(@ec2_security_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ec2SecurityGroupName") unless @ec2_security_group_name.nil?
  @ec2_security_group_owner_id = ec2_security_group_owner_id
  Jsii::Type.check_type(@ec2_security_group_owner_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ec2SecurityGroupOwnerId") unless @ec2_security_group_owner_id.nil?
end

Instance Attribute Details

#cidripString? (readonly)

The IP range to authorize.



569
570
571
# File 'rds/cfn_db_security_group.rb', line 569

def cidrip
  @cidrip
end

#ec2_security_group_idString? (readonly)

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.



576
577
578
# File 'rds/cfn_db_security_group.rb', line 576

def ec2_security_group_id
  @ec2_security_group_id
end

#ec2_security_group_nameString? (readonly)

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.



583
584
585
# File 'rds/cfn_db_security_group.rb', line 583

def ec2_security_group_name
  @ec2_security_group_name
end

#ec2_security_group_owner_idString? (readonly)

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.



590
591
592
# File 'rds/cfn_db_security_group.rb', line 590

def ec2_security_group_owner_id
  @ec2_security_group_owner_id
end

Class Method Details

.jsii_propertiesObject



592
593
594
595
596
597
598
599
# File 'rds/cfn_db_security_group.rb', line 592

def self.jsii_properties
  {
    :cidrip => "cidrip",
    :ec2_security_group_id => "ec2SecurityGroupId",
    :ec2_security_group_name => "ec2SecurityGroupName",
    :ec2_security_group_owner_id => "ec2SecurityGroupOwnerId",
  }
end

Instance Method Details

#to_jsiiObject



601
602
603
604
605
606
607
608
609
610
# File 'rds/cfn_db_security_group.rb', line 601

def to_jsii
  result = {}
  result.merge!({
    "cidrip" => @cidrip,
    "ec2SecurityGroupId" => @ec2_security_group_id,
    "ec2SecurityGroupName" => @ec2_security_group_name,
    "ec2SecurityGroupOwnerId" => @ec2_security_group_owner_id,
  })
  result.compact
end