Class CfnDBSecurityGroupIngress

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:08.481Z") @Stability(Stable) public class CfnDBSecurityGroupIngress extends CfnResource implements IInspectable
The AWS::RDS::DBSecurityGroupIngress resource enables ingress to a DB security group using one of two forms of authorization.

First, you can add EC2 or VPC security groups to the DB security group if the application using the database is running on EC2 or VPC instances. Second, IP ranges are available if the application accessing your database is running on the Internet.

This type supports updates. For more information about updating stacks, see AWS CloudFormation Stacks Updates .

For details about the settings for DB security group ingress, see AuthorizeDBSecurityGroupIngress .

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 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.rds.*;
 CfnDBSecurityGroupIngress cfnDBSecurityGroupIngress = CfnDBSecurityGroupIngress.Builder.create(this, "MyCfnDBSecurityGroupIngress")
         .dbSecurityGroupName("dbSecurityGroupName")
         // the properties below are optional
         .cidrip("cidrip")
         .ec2SecurityGroupId("ec2SecurityGroupId")
         .ec2SecurityGroupName("ec2SecurityGroupName")
         .ec2SecurityGroupOwnerId("ec2SecurityGroupOwnerId")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnDBSecurityGroupIngress

      protected CfnDBSecurityGroupIngress(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDBSecurityGroupIngress

      protected CfnDBSecurityGroupIngress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDBSecurityGroupIngress

      @Stability(Stable) public CfnDBSecurityGroupIngress(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDBSecurityGroupIngressProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getDbSecurityGroupName

      @Stability(Stable) @NotNull public String getDbSecurityGroupName()
      The name of the DB security group to add authorization to.
    • setDbSecurityGroupName

      @Stability(Stable) public void setDbSecurityGroupName(@NotNull String value)
      The name of the DB security group to add authorization to.
    • getCidrip

      @Stability(Stable) @Nullable public String getCidrip()
      The IP range to authorize.
    • setCidrip

      @Stability(Stable) public void setCidrip(@Nullable String value)
      The IP range to authorize.
    • getEc2SecurityGroupId

      @Stability(Stable) @Nullable public String getEc2SecurityGroupId()
      Id of the EC2 security group to authorize.
    • setEc2SecurityGroupId

      @Stability(Stable) public void setEc2SecurityGroupId(@Nullable String value)
      Id of the EC2 security group to authorize.
    • getEc2SecurityGroupName

      @Stability(Stable) @Nullable public String getEc2SecurityGroupName()
      Name of the EC2 security group to authorize.
    • setEc2SecurityGroupName

      @Stability(Stable) public void setEc2SecurityGroupName(@Nullable String value)
      Name of the EC2 security group to authorize.
    • getEc2SecurityGroupOwnerId

      @Stability(Stable) @Nullable public String getEc2SecurityGroupOwnerId()
      AWS account number of the owner of the EC2 security group specified in the EC2SecurityGroupName parameter.
    • setEc2SecurityGroupOwnerId

      @Stability(Stable) public void setEc2SecurityGroupOwnerId(@Nullable String value)
      AWS account number of the owner of the EC2 security group specified in the EC2SecurityGroupName parameter.