Skip to content
v2.273.0

IVpc Interface ​

Properties ​

availabilityZonesstring[]availability_zonestyping.List[str]availabilityZonesList<String>AvailabilityZonesstring[]AvailabilityZones*[]*stringrequired#
AZs for this VPC.
The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

internetConnectivityEstablishedIDependableinternet_connectivity_establishedIDependableinternetConnectivityEstablishedIDependableInternetConnectivityEstablishedIDependableInternetConnectivityEstablishedIDependablerequired#
Dependable that can be depended upon to force internet connectivity established on the VPC.
isolatedSubnetsISubnet[]isolated_subnetstyping.List[ISubnet]isolatedSubnetsList<ISubnet>IsolatedSubnetsISubnet[]IsolatedSubnets*[]ISubnetrequired#
List of isolated subnets in this VPC.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
privateSubnetsISubnet[]private_subnetstyping.List[ISubnet]privateSubnetsList<ISubnet>PrivateSubnetsISubnet[]PrivateSubnets*[]ISubnetrequired#
List of private subnets in this VPC.
publicSubnetsISubnet[]public_subnetstyping.List[ISubnet]publicSubnetsList<ISubnet>PublicSubnetsISubnet[]PublicSubnets*[]ISubnetrequired#
List of public subnets in this VPC.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.
vpcArnstringvpc_arnstrvpcArnStringVpcArnstringVpcArn*stringrequired#
ARN for this VPC.
vpcCidrBlockstringvpc_cidr_blockstrvpcCidrBlockStringVpcCidrBlockstringVpcCidrBlock*stringrequired#
CIDR range for this VPC.
vpcIdstringvpc_idstrvpcIdStringVpcIdstringVpcId*stringrequired#
Identifier for this VPC.
A reference to a VPC resource.
vpnGatewayIdstringvpn_gateway_idstrvpnGatewayIdStringVpnGatewayIdstringVpnGatewayId*string#
Identifier for the VPN gateway.

Methods ​

addClientVpnEndpoint(id: string, options: ClientVpnEndpointOptions): ClientVpnEndpointdef add_client_vpn_endpoint(self, id: str, options: ClientVpnEndpointOptions) -> ClientVpnEndpointpublic ClientVpnEndpoint addClientVpnEndpoint(String id, ClientVpnEndpointOptions options)public ClientVpnEndpoint AddClientVpnEndpoint(string id, ClientVpnEndpointOptions options)func AddClientVpnEndpoint(Id *string, Options ClientVpnEndpointOptions) ClientVpnEndpoint#
Adds a new client VPN endpoint to this VPC.
addFlowLog(id: string, options?: FlowLogOptions): FlowLogdef add_flow_log(self, id: str, options: typing.Optional[FlowLogOptions] = None) -> FlowLogpublic FlowLog addFlowLog(String id, FlowLogOptions options)public FlowLog AddFlowLog(string id, FlowLogOptions? options = null)func AddFlowLog(Id *string, Options FlowLogOptions) FlowLog#
Adds a new Flow Log to this VPC.
addGatewayEndpoint(id: string, options: GatewayVpcEndpointOptions): GatewayVpcEndpointdef add_gateway_endpoint(self, id: str, options: GatewayVpcEndpointOptions) -> GatewayVpcEndpointpublic GatewayVpcEndpoint addGatewayEndpoint(String id, GatewayVpcEndpointOptions options)public GatewayVpcEndpoint AddGatewayEndpoint(string id, GatewayVpcEndpointOptions options)func AddGatewayEndpoint(Id *string, Options GatewayVpcEndpointOptions) GatewayVpcEndpoint#
Adds a new gateway endpoint to this VPC.
addInterfaceEndpoint(id: string, options: InterfaceVpcEndpointOptions): InterfaceVpcEndpointdef add_interface_endpoint(self, id: str, options: InterfaceVpcEndpointOptions) -> InterfaceVpcEndpointpublic InterfaceVpcEndpoint addInterfaceEndpoint(String id, InterfaceVpcEndpointOptions options)public InterfaceVpcEndpoint AddInterfaceEndpoint(string id, InterfaceVpcEndpointOptions options)func AddInterfaceEndpoint(Id *string, Options InterfaceVpcEndpointOptions) InterfaceVpcEndpoint#
Adds a new interface endpoint to this VPC.
addVpnConnection(id: string, options: VpnConnectionOptions): VpnConnectiondef add_vpn_connection(self, id: str, options: VpnConnectionOptions) -> VpnConnectionpublic VpnConnection addVpnConnection(String id, VpnConnectionOptions options)public VpnConnection AddVpnConnection(string id, VpnConnectionOptions options)func AddVpnConnection(Id *string, Options VpnConnectionOptions) VpnConnection#
Adds a new VPN connection to this VPC.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

enableVpnGateway(options: EnableVpnGatewayOptions): voiddef enable_vpn_gateway(self, options: EnableVpnGatewayOptions) -> Nonepublic void enableVpnGateway(EnableVpnGatewayOptions options)public void EnableVpnGateway(EnableVpnGatewayOptions options)func EnableVpnGateway(Options EnableVpnGatewayOptions)#
Adds a VPN Gateway to this VPC.
selectSubnets(selection?: SubnetSelection): SelectedSubnetsdef select_subnets(self, selection: typing.Optional[SubnetSelection] = None) -> SelectedSubnetspublic SelectedSubnets selectSubnets(SubnetSelection selection)public SelectedSubnets SelectSubnets(SubnetSelection? selection = null)func SelectSubnets(Selection SubnetSelection) SelectedSubnets#
Return information on the subnets appropriate for the given selection strategy.

Requires that at least one subnet is matched, throws a descriptive error message otherwise.

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining