ConnectionNetwork
- class aws_cdk.aws_glue_alpha.ConnectionNetwork(*args: Any, **kwargs)
Bases:
object(experimental) VPC network placement for a Glue
Connection.A Glue connection targets a single subnet. Choose the placement with one of the mutually-exclusive factories — an explicit subnet, or a VPC to select one from — so a subnet paired with a VPC, or a subnet selection without a VPC, cannot be expressed.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# security_group: ec2.SecurityGroup # vpc: ec2.Vpc glue.Connection(self, "MyConnection", type=glue.ConnectionType.NETWORK, security_groups=[security_group], # vpcSubnets is optional - defaults to private subnets network=glue.ConnectionNetwork.vpc(vpc, subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS) )
Static Methods
- classmethod subnet(subnet)
(experimental) Pin the connection to a specific subnet.
- Parameters:
subnet (
ISubnet) – the subnet the connection targets.- Stability:
experimental
- Return type:
- classmethod vpc(vpc, *, availability_zones=None, one_per_az=None, subnet_filters=None, subnet_group_name=None, subnets=None, subnet_type=None)
(experimental) Select the connection’s subnet from a VPC.
Since a Glue connection targets a single subnet, the first subnet of the selection is used.
- Parameters:
vpc (
IVpc) – the VPC to select a subnet from.availability_zones (
Optional[Sequence[str]]) – Select subnets only in the given AZs. Default: no filtering on AZs is doneone_per_az (
Optional[bool]) – If true, return at most one subnet per AZ. Default: falsesubnet_filters (
Optional[Sequence[SubnetFilter]]) – List of provided subnet filters. Default: - nonesubnet_group_name (
Optional[str]) – Select the subnet group with the given name. Select the subnet group with the given name. This only needs to be used if you have multiple subnet groups of the same type and you need to distinguish between them. Otherwise, prefersubnetType. This field does not select individual subnets, it selects all subnets that share the given subnet group name. This is the name supplied insubnetConfiguration. At most one ofsubnetTypeandsubnetGroupNamecan be supplied. Default: - Selection by type instead of by namesubnets (
Optional[Sequence[ISubnet]]) – Explicitly select individual subnets. Use this if you don’t want to automatically use all subnets in a group, but have a need to control selection down to individual subnets. Cannot be specified together withsubnetTypeorsubnetGroupName. Default: - Use all subnets in a selected group (all private subnets by default)subnet_type (
Optional[SubnetType]) – Select all subnets of the given type. At most one ofsubnetTypeandsubnetGroupNamecan be supplied. Default: SubnetType.PRIVATE_WITH_EGRESS (or ISOLATED or PUBLIC if there are no PRIVATE_WITH_EGRESS subnets)
- Default:
vpcSubnets - private subnets
- Stability:
experimental
- Return type: