VpcConfig

class aws_cdk.aws_msk_alpha.VpcConfig(*, vpc, security_groups=None, vpc_subnets=None)

Bases: object

(experimental) The configuration of the Amazon VPCs for the cluster.

Parameters:
  • vpc (IVpc) – (experimental) Defines the virtual networking environment for this cluster. Must have at least 2 subnets in two different AZs.

  • security_groups (Optional[Sequence[ISecurityGroup]]) – (experimental) The security groups associated with the cluster. You can specify up to 5 security groups. Default: - create new security group

  • vpc_subnets (Union[SubnetSelection, Dict[str, Any], None]) – (experimental) The subnets associated with the cluster. Default: - the Vpc default strategy if not specified.

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_msk_alpha as msk_alpha
from aws_cdk import aws_ec2 as ec2

# security_group: ec2.SecurityGroup
# subnet: ec2.Subnet
# subnet_filter: ec2.SubnetFilter
# vpc: ec2.Vpc

vpc_config = msk_alpha.VpcConfig(
    vpc=vpc,

    # the properties below are optional
    security_groups=[security_group],
    vpc_subnets=ec2.SubnetSelection(
        availability_zones=["availabilityZones"],
        one_per_az=False,
        subnet_filters=[subnet_filter],
        subnet_group_name="subnetGroupName",
        subnets=[subnet],
        subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
    )
)

Attributes

security_groups

(experimental) The security groups associated with the cluster.

You can specify up to 5 security groups.

Default:
  • create new security group

Stability:

experimental

vpc

(experimental) Defines the virtual networking environment for this cluster.

Must have at least 2 subnets in two different AZs.

Stability:

experimental

vpc_subnets

(experimental) The subnets associated with the cluster.

Default:
  • the Vpc default strategy if not specified.

Stability:

experimental