CfnDBSecurityGroupPropsMixin

class aws_cdk.mixins_preview.aws_rds.mixins.CfnDBSecurityGroupPropsMixin(props, *, strategy=None)

Bases: Mixin

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbsecuritygroup.html

CloudformationResource:

AWS::RDS::DBSecurityGroup

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_rds import mixins as rds_mixins

cfn_dBSecurity_group_props_mixin = rds_mixins.CfnDBSecurityGroupPropsMixin(rds_mixins.CfnDBSecurityGroupMixinProps(
    db_security_group_ingress=[rds_mixins.CfnDBSecurityGroupPropsMixin.IngressProperty(
        cidrip="cidrip",
        ec2_security_group_id="ec2SecurityGroupId",
        ec2_security_group_name="ec2SecurityGroupName",
        ec2_security_group_owner_id="ec2SecurityGroupOwnerId"
    )],
    ec2_vpc_id="ec2VpcId",
    group_description="groupDescription",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::RDS::DBSecurityGroup.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['dbSecurityGroupIngress', 'ec2VpcId', 'groupDescription', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

IngressProperty

class CfnDBSecurityGroupPropsMixin.IngressProperty(*, cidrip=None, ec2_security_group_id=None, ec2_security_group_name=None, ec2_security_group_owner_id=None)

Bases: object

The Ingress property type specifies an individual ingress rule within an AWS::RDS::DBSecurityGroup resource.

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 .

Parameters:
  • cidrip (Optional[str]) – The IP range to authorize.

  • ec2_security_group_id (Optional[str]) – 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.

  • ec2_security_group_name (Optional[str]) – 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.

  • ec2_security_group_owner_id (Optional[str]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbsecuritygroup-ingress.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_rds import mixins as rds_mixins

ingress_property = rds_mixins.CfnDBSecurityGroupPropsMixin.IngressProperty(
    cidrip="cidrip",
    ec2_security_group_id="ec2SecurityGroupId",
    ec2_security_group_name="ec2SecurityGroupName",
    ec2_security_group_owner_id="ec2SecurityGroupOwnerId"
)

Attributes

cidrip

The IP range to authorize.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbsecuritygroup-ingress.html#cfn-rds-dbsecuritygroup-ingress-cidrip

ec2_security_group_id

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbsecuritygroup-ingress.html#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupid

ec2_security_group_name

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbsecuritygroup-ingress.html#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupname

ec2_security_group_owner_id

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbsecuritygroup-ingress.html#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupownerid