Class CfnDBSecurityGroup

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:23.337Z") @Stability(Stable) public class CfnDBSecurityGroup extends CfnResource implements IInspectable, ITaggable
The AWS::RDS::DBSecurityGroup resource creates or updates an Amazon RDS DB security group.

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.*;
 CfnDBSecurityGroup cfnDBSecurityGroup = CfnDBSecurityGroup.Builder.create(this, "MyCfnDBSecurityGroup")
         .dbSecurityGroupIngress(List.of(IngressProperty.builder()
                 .cidrip("cidrip")
                 .ec2SecurityGroupId("ec2SecurityGroupId")
                 .ec2SecurityGroupName("ec2SecurityGroupName")
                 .ec2SecurityGroupOwnerId("ec2SecurityGroupOwnerId")
                 .build()))
         .groupDescription("groupDescription")
         // the properties below are optional
         .ec2VpcId("ec2VpcId")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnDBSecurityGroup

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

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

      @Stability(Stable) public CfnDBSecurityGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDBSecurityGroupProps 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
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDbSecurityGroupIngress

      @Stability(Stable) @NotNull public Object getDbSecurityGroupIngress()
      Ingress rules to be applied to the DB security group.
    • setDbSecurityGroupIngress

      @Stability(Stable) public void setDbSecurityGroupIngress(@NotNull IResolvable value)
      Ingress rules to be applied to the DB security group.
    • setDbSecurityGroupIngress

      @Stability(Stable) public void setDbSecurityGroupIngress(@NotNull List<Object> value)
      Ingress rules to be applied to the DB security group.
    • getGroupDescription

      @Stability(Stable) @NotNull public String getGroupDescription()
      Provides the description of the DB security group.
    • setGroupDescription

      @Stability(Stable) public void setGroupDescription(@NotNull String value)
      Provides the description of the DB security group.
    • getEc2VpcId

      @Stability(Stable) @Nullable public String getEc2VpcId()
      The identifier of an Amazon VPC.

      This property indicates the VPC that this DB security group belongs to.

    • setEc2VpcId

      @Stability(Stable) public void setEc2VpcId(@Nullable String value)
      The identifier of an Amazon VPC.

      This property indicates the VPC that this DB security group belongs to.

    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An optional array of key-value pairs to apply to this DB security group.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An optional array of key-value pairs to apply to this DB security group.