VpcLookupOptions

class aws_cdk.aws_ec2.VpcLookupOptions(*, is_default=None, subnet_group_name_tag=None, tags=None, vpc_id=None, vpc_name=None)

Bases: object

__init__(*, is_default=None, subnet_group_name_tag=None, tags=None, vpc_id=None, vpc_name=None)

Properties for looking up an existing VPC.

The combination of properties must specify filter down to exactly one non-default VPC, otherwise an error is raised.

Parameters
  • is_default (Optional[bool]) – Whether to match the default VPC. Default: Don’t care whether we return the default VPC

  • subnet_group_name_tag (Optional[str]) – Optional tag for subnet group name. If not provided, we’ll look at the aws-cdk:subnet-name tag. If the subnet does not have the specified tag, we’ll use its type as the name. Default: aws-cdk:subnet-name

  • tags (Optional[Mapping[str, str]]) – Tags on the VPC. The VPC must have all of these tags Default: Don’t filter on tags

  • vpc_id (Optional[str]) – The ID of the VPC. If given, will import exactly this VPC. Default: Don’t filter on vpcId

  • vpc_name (Optional[str]) – The name of the VPC. If given, will import the VPC with this name. Default: Don’t filter on vpcName

Attributes

is_default

Whether to match the default VPC.

default :default: Don’t care whether we return the default VPC

Return type

Optional[bool]

subnet_group_name_tag

subnet-name tag. If the subnet does not have the specified tag, we’ll use its type as the name.

default :default: aws-cdk:subnet-name

Type

Optional tag for subnet group name. If not provided, we’ll look at the aws-cdk

Return type

Optional[str]

tags

Tags on the VPC.

The VPC must have all of these tags

default :default: Don’t filter on tags

Return type

Optional[Mapping[str, str]]

vpc_id

The ID of the VPC.

If given, will import exactly this VPC.

default :default: Don’t filter on vpcId

Return type

Optional[str]

vpc_name

The name of the VPC.

If given, will import the VPC with this name.

default :default: Don’t filter on vpcName

Return type

Optional[str]