Class CfnDBSecurityGroupIngress

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.055Z") @Stability(Stable) public class CfnDBSecurityGroupIngress extends CfnResource implements IInspectable
A CloudFormation AWS::RDS::DBSecurityGroupIngress.

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnDBSecurityGroupIngressProps props)
      Create a new AWS::RDS::DBSecurityGroupIngress.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.
    • 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.

      For VPC DB security groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.

    • setEc2SecurityGroupId

      @Stability(Stable) public void setEc2SecurityGroupId(@Nullable String value)
      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.

    • getEc2SecurityGroupName

      @Stability(Stable) @Nullable public String getEc2SecurityGroupName()
      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.

    • setEc2SecurityGroupName

      @Stability(Stable) public void setEc2SecurityGroupName(@Nullable String value)
      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.

    • getEc2SecurityGroupOwnerId

      @Stability(Stable) @Nullable public String getEc2SecurityGroupOwnerId()
      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.

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

      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.