Class CfnDBSecurityGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.rds.CfnDBSecurityGroup
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IDBSecurityGroupRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:43.747Z")
@Stability(Stable)
public class CfnDBSecurityGroup
extends CfnResource
implements IInspectable, IDBSecurityGroupRef, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDBSecurityGroup.static interfaceTheIngressproperty type specifies an individual ingress rule within anAWS::RDS::DBSecurityGroupresource.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.rds.IDBSecurityGroupRef
IDBSecurityGroupRef.Jsii$Default, IDBSecurityGroupRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDBSecurityGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDBSecurityGroup(software.amazon.jsii.JsiiObjectRef objRef) CfnDBSecurityGroup(software.constructs.Construct scope, String id, CfnDBSecurityGroupProps props) Create a newAWS::RDS::DBSecurityGroup. -
Method Summary
Modifier and TypeMethodDescriptionIngress rules to be applied to the DB security group.A reference to a DBSecurityGroup resource.The identifier of an Amazon virtual private cloud (VPC).Provides the description of the DB security group.getTags()Tag Manager which manages the tags for this resource.Metadata assigned to an Amazon RDS resource consisting of a key-value pair.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnDBSecurityGroup.renderProperties(Map<String, Object> props) voidsetDbSecurityGroupIngress(List<Object> value) Ingress rules to be applied to the DB security group.voidIngress rules to be applied to the DB security group.voidsetEc2VpcId(String value) The identifier of an Amazon virtual private cloud (VPC).voidsetGroupDescription(String value) Provides the description of the DB security group.voidsetTagsRaw(List<CfnTag> value) Metadata assigned to an Amazon RDS resource consisting of a key-value pair.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::RDS::DBSecurityGroup.- 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
-
isCfnDBSecurityGroup
Checks whether the given object is a CfnDBSecurityGroup.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDbSecurityGroupRef
A reference to a DBSecurityGroup resource.- Specified by:
getDbSecurityGroupRefin interfaceIDBSecurityGroupRef
-
getTags
Tag Manager which manages the tags for this resource. -
getDbSecurityGroupIngress
Ingress rules to be applied to the DB security group.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnDBSecurityGroup.IngressProperty> -
setDbSecurityGroupIngress
Ingress rules to be applied to the DB security group. -
setDbSecurityGroupIngress
Ingress rules to be applied to the DB security group. -
getGroupDescription
Provides the description of the DB security group. -
setGroupDescription
Provides the description of the DB security group. -
getEc2VpcId
The identifier of an Amazon virtual private cloud (VPC). -
setEc2VpcId
The identifier of an Amazon virtual private cloud (VPC). -
getTagsRaw
Metadata assigned to an Amazon RDS resource consisting of a key-value pair. -
setTagsRaw
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
-