@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:51.158Z") 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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnDBSecurityGroupIngress.Builder
A fluent builder for
CfnDBSecurityGroupIngress . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDBSecurityGroupIngress(Construct scope,
java.lang.String id,
CfnDBSecurityGroupIngressProps props)
Create a new `AWS::RDS::DBSecurityGroupIngress`.
|
protected |
CfnDBSecurityGroupIngress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDBSecurityGroupIngress(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCidrip()
The IP range to authorize.
|
java.lang.String |
getDbSecurityGroupName()
The name of the DB security group to add authorization to.
|
java.lang.String |
getEc2SecurityGroupId()
Id of the EC2 security group to authorize.
|
java.lang.String |
getEc2SecurityGroupName()
Name of the EC2 security group to authorize.
|
java.lang.String |
getEc2SecurityGroupOwnerId()
AWS account number of the owner of the EC2 security group specified in the `EC2SecurityGroupName` parameter.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCidrip(java.lang.String value)
The IP range to authorize.
|
void |
setDbSecurityGroupName(java.lang.String value)
The name of the DB security group to add authorization to.
|
void |
setEc2SecurityGroupId(java.lang.String value)
Id of the EC2 security group to authorize.
|
void |
setEc2SecurityGroupName(java.lang.String value)
Name of the EC2 security group to authorize.
|
void |
setEc2SecurityGroupOwnerId(java.lang.String value)
AWS account number of the owner of the EC2 security group specified in the `EC2SecurityGroupName` parameter.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDBSecurityGroupIngress(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDBSecurityGroupIngress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDBSecurityGroupIngress(Construct scope, java.lang.String id, CfnDBSecurityGroupIngressProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getDbSecurityGroupName()
public void setDbSecurityGroupName(java.lang.String value)
public java.lang.String getCidrip()
public void setCidrip(java.lang.String value)
public java.lang.String getEc2SecurityGroupId()
For VPC DB security groups, EC2SecurityGroupId
must be provided. Otherwise, EC2SecurityGroupOwnerId
and either EC2SecurityGroupName
or EC2SecurityGroupId
must be provided.
public void setEc2SecurityGroupId(java.lang.String value)
For VPC DB security groups, EC2SecurityGroupId
must be provided. Otherwise, EC2SecurityGroupOwnerId
and either EC2SecurityGroupName
or EC2SecurityGroupId
must be provided.
public java.lang.String getEc2SecurityGroupName()
For VPC DB security groups, EC2SecurityGroupId
must be provided. Otherwise, EC2SecurityGroupOwnerId
and either EC2SecurityGroupName
or EC2SecurityGroupId
must be provided.
public void setEc2SecurityGroupName(java.lang.String value)
For VPC DB security groups, EC2SecurityGroupId
must be provided. Otherwise, EC2SecurityGroupOwnerId
and either EC2SecurityGroupName
or EC2SecurityGroupId
must be provided.
public java.lang.String getEc2SecurityGroupOwnerId()
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.
public void setEc2SecurityGroupOwnerId(java.lang.String value)
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.