VpcContextQuery
- class aws_cdk.cloud_assembly_schema.VpcContextQuery(*, account, filter, region, lookup_role_arn=None, return_asymmetric_subnets=None, return_vpn_gateways=None, subnet_group_name_tag=None)
Bases:
object
Query input for looking up a VPC.
- Parameters:
account (
str
) – Query account.filter (
Mapping
[str
,str
]) – Filters to apply to the VPC. Filter parameters are the same as passed to DescribeVpcs.region (
str
) – Query region.lookup_role_arn (
Optional
[str
]) – The ARN of the role that should be used to look up the missing values. Default: - Nonereturn_asymmetric_subnets (
Optional
[bool
]) – Whether to populate the subnetGroups field of theVpcContextResponse
, which contains potentially asymmetric subnet groups. Default: falsereturn_vpn_gateways (
Optional
[bool
]) – Whether to populate thevpnGatewayId
field of theVpcContextResponse
, which contains the VPN Gateway ID, if one exists. You can explicitly disable this in order to avoid the lookup if you know the VPC does not have a VPN Gatway attached. Default: truesubnet_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’
- 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.cloud_assembly_schema as cloud_assembly_schema vpc_context_query = cloud_assembly_schema.VpcContextQuery( account="account", filter={ "filter_key": "filter" }, region="region", # the properties below are optional lookup_role_arn="lookupRoleArn", return_asymmetric_subnets=False, return_vpn_gateways=False, subnet_group_name_tag="subnetGroupNameTag" )
Attributes
- account
Query account.
- filter
Filters to apply to the VPC.
Filter parameters are the same as passed to DescribeVpcs.
- lookup_role_arn
The ARN of the role that should be used to look up the missing values.
- Default:
None
- region
Query region.
- return_asymmetric_subnets
Whether to populate the subnetGroups field of the
VpcContextResponse
, which contains potentially asymmetric subnet groups.- Default:
false
- return_vpn_gateways
Whether to populate the
vpnGatewayId
field of theVpcContextResponse
, which contains the VPN Gateway ID, if one exists.You can explicitly disable this in order to avoid the lookup if you know the VPC does not have a VPN Gatway attached.
- Default:
true
- subnet_group_name_tag
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’