UNPKG

@aws-cdk/aws-ec2

Version:

The CDK Construct Library for AWS::EC2

1 lines 3.2 MB
{"version":"2","toolVersion":"1.84.0","snippets":{"315735d1693d812dfd0333750428ccd9306d9e3c0bc5f43a44847d625a5fb101":{"translations":{"python":{"source":"import aws_cdk.aws_ec2 as ec2","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.EC2;","version":"1"},"java":{"source":"import software.amazon.awscdk.services.ec2.*;","version":"1"},"go":{"source":"import ec2 \"github.com/aws-samples/dummy/awscdkawsec2\"","version":"1"},"$":{"source":"import * as ec2 from '@aws-cdk/aws-ec2';","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":22}},"didCompile":true,"fqnsReferenced":[],"fullSource":"import * as ec2 from '@aws-cdk/aws-ec2';","syntaxKindCounter":{"10":1,"75":1,"254":1,"255":1,"256":1,"290":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"f6559e6055f2a6ad38e9b138059bf914edc588ce7042134135cc0ae54d41a123":{"translations":{"python":{"source":"vpc = ec2.Vpc(self, \"VPC\")","version":"2"},"csharp":{"source":"var vpc = new Vpc(this, \"VPC\");","version":"1"},"java":{"source":"Vpc vpc = new Vpc(this, \"VPC\");","version":"1"},"go":{"source":"vpc := ec2.NewVpc(this, jsii.String(\"VPC\"))","version":"1"},"$":{"source":"const vpc = new ec2.Vpc(this, 'VPC');","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":32}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.Vpc","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst vpc = new ec2.Vpc(this, 'VPC');\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"10":1,"75":3,"104":1,"194":1,"197":1,"225":1,"242":1,"243":1},"fqnsFingerprint":"c18b98e5d041d723d55d18d7a381309999936005bb4660a528b922e4423564e2"},"a561e1410ca2ccc326e02f1c8f0ecb51290ccba10109c414f224b6829ce0700b":{"translations":{"python":{"source":"# vpc: ec2.Vpc\n\n\nec2.InterfaceVpcEndpoint(self, \"VPC Endpoint\",\n vpc=vpc,\n service=ec2.InterfaceVpcEndpointService(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\", 443),\n subnets=ec2.SubnetSelection(\n subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,\n availability_zones=[\"us-east-1a\", \"us-east-1c\"]\n )\n)","version":"2"},"csharp":{"source":"Vpc vpc;\n\n\nnew InterfaceVpcEndpoint(this, \"VPC Endpoint\", new InterfaceVpcEndpointProps {\n Vpc = vpc,\n Service = new InterfaceVpcEndpointService(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\", 443),\n Subnets = new SubnetSelection {\n SubnetType = SubnetType.PRIVATE_ISOLATED,\n AvailabilityZones = new [] { \"us-east-1a\", \"us-east-1c\" }\n }\n});","version":"1"},"java":{"source":"Vpc vpc;\n\n\nInterfaceVpcEndpoint.Builder.create(this, \"VPC Endpoint\")\n .vpc(vpc)\n .service(new InterfaceVpcEndpointService(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\", 443))\n .subnets(SubnetSelection.builder()\n .subnetType(SubnetType.PRIVATE_ISOLATED)\n .availabilityZones(List.of(\"us-east-1a\", \"us-east-1c\"))\n .build())\n .build();","version":"1"},"go":{"source":"var vpc vpc\n\n\nec2.NewInterfaceVpcEndpoint(this, jsii.String(\"VPC Endpoint\"), &InterfaceVpcEndpointProps{\n\tVpc: Vpc,\n\tService: ec2.NewInterfaceVpcEndpointService(jsii.String(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\"), jsii.Number(443)),\n\tSubnets: &SubnetSelection{\n\t\tSubnetType: ec2.SubnetType_PRIVATE_ISOLATED,\n\t\tAvailabilityZones: []*string{\n\t\t\tjsii.String(\"us-east-1a\"),\n\t\t\tjsii.String(\"us-east-1c\"),\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"declare const vpc: ec2.Vpc;\n\nnew ec2.InterfaceVpcEndpoint(this, 'VPC Endpoint', {\n vpc,\n service: new ec2.InterfaceVpcEndpointService('com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc', 443),\n subnets: {\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n availabilityZones: ['us-east-1a', 'us-east-1c']\n }\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":131}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.IInterfaceVpcEndpointService","@aws-cdk/aws-ec2.IVpc","@aws-cdk/aws-ec2.InterfaceVpcEndpoint","@aws-cdk/aws-ec2.InterfaceVpcEndpointProps","@aws-cdk/aws-ec2.InterfaceVpcEndpointService","@aws-cdk/aws-ec2.SubnetSelection","@aws-cdk/aws-ec2.SubnetType","@aws-cdk/aws-ec2.SubnetType#PRIVATE_ISOLATED","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const vpc: ec2.Vpc;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nnew ec2.InterfaceVpcEndpoint(this, 'VPC Endpoint', {\n vpc,\n service: new ec2.InterfaceVpcEndpointService('com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc', 443),\n subnets: {\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n availabilityZones: ['us-east-1a', 'us-east-1c']\n }\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":1,"10":4,"75":15,"104":1,"130":1,"153":1,"169":1,"192":1,"193":2,"194":4,"197":2,"225":1,"226":1,"242":1,"243":1,"281":4,"282":1,"290":1},"fqnsFingerprint":"24e65f99681b71dddaa93a5617bed9274cd72b45938725d4e1d4f9e7f882770a"},"588a14e5d7502891374f9804f5274fe0b80352b5ef5926b7b542c2c629e18ab8":{"translations":{"python":{"source":"# vpc: ec2.Vpc\n# subnet1: ec2.Subnet\n# subnet2: ec2.Subnet\n\n\nec2.InterfaceVpcEndpoint(self, \"VPC Endpoint\",\n vpc=vpc,\n service=ec2.InterfaceVpcEndpointService(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\", 443),\n subnets=ec2.SubnetSelection(\n subnets=[subnet1, subnet2]\n )\n)","version":"2"},"csharp":{"source":"Vpc vpc;\nSubnet subnet1;\nSubnet subnet2;\n\n\nnew InterfaceVpcEndpoint(this, \"VPC Endpoint\", new InterfaceVpcEndpointProps {\n Vpc = vpc,\n Service = new InterfaceVpcEndpointService(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\", 443),\n Subnets = new SubnetSelection {\n Subnets = new [] { subnet1, subnet2 }\n }\n});","version":"1"},"java":{"source":"Vpc vpc;\nSubnet subnet1;\nSubnet subnet2;\n\n\nInterfaceVpcEndpoint.Builder.create(this, \"VPC Endpoint\")\n .vpc(vpc)\n .service(new InterfaceVpcEndpointService(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\", 443))\n .subnets(SubnetSelection.builder()\n .subnets(List.of(subnet1, subnet2))\n .build())\n .build();","version":"1"},"go":{"source":"var vpc vpc\nvar subnet1 subnet\nvar subnet2 subnet\n\n\nec2.NewInterfaceVpcEndpoint(this, jsii.String(\"VPC Endpoint\"), &InterfaceVpcEndpointProps{\n\tVpc: Vpc,\n\tService: ec2.NewInterfaceVpcEndpointService(jsii.String(\"com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc\"), jsii.Number(443)),\n\tSubnets: &SubnetSelection{\n\t\tSubnets: []iSubnet{\n\t\t\tsubnet1,\n\t\t\tsubnet2,\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"declare const vpc: ec2.Vpc;\ndeclare const subnet1: ec2.Subnet;\ndeclare const subnet2: ec2.Subnet;\n\nnew ec2.InterfaceVpcEndpoint(this, 'VPC Endpoint', {\n vpc,\n service: new ec2.InterfaceVpcEndpointService('com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc', 443),\n subnets: {\n subnets: [subnet1, subnet2]\n }\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":146}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.IInterfaceVpcEndpointService","@aws-cdk/aws-ec2.IVpc","@aws-cdk/aws-ec2.InterfaceVpcEndpoint","@aws-cdk/aws-ec2.InterfaceVpcEndpointProps","@aws-cdk/aws-ec2.InterfaceVpcEndpointService","@aws-cdk/aws-ec2.SubnetSelection","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const vpc: ec2.Vpc;\ndeclare const subnet1: ec2.Subnet;\ndeclare const subnet2: ec2.Subnet;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nnew ec2.InterfaceVpcEndpoint(this, 'VPC Endpoint', {\n vpc,\n service: new ec2.InterfaceVpcEndpointService('com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc', 443),\n subnets: {\n subnets: [subnet1, subnet2]\n }\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":1,"10":2,"75":19,"104":1,"130":3,"153":3,"169":3,"192":1,"193":2,"194":2,"197":2,"225":3,"226":1,"242":3,"243":3,"281":3,"282":1,"290":1},"fqnsFingerprint":"12ef9519b32eda34e892406625aef521a7f5a82bb3f3b56d6dfc75158cd39ea4"},"7212379b5f48f5edb962458ad8e4680f15d069c65b40f290c5c5ec98dd8a931a":{"translations":{"python":{"source":"# Configure the `natGatewayProvider` when defining a Vpc\nnat_gateway_provider = ec2.NatProvider.instance(\n instance_type=ec2.InstanceType(\"t3.small\")\n)\n\nvpc = ec2.Vpc(self, \"MyVpc\",\n nat_gateway_provider=nat_gateway_provider,\n\n # The 'natGateways' parameter now controls the number of NAT instances\n nat_gateways=2\n)","version":"2"},"csharp":{"source":"// Configure the `natGatewayProvider` when defining a Vpc\nvar natGatewayProvider = NatProvider.Instance(new NatInstanceProps {\n InstanceType = new InstanceType(\"t3.small\")\n});\n\nvar vpc = new Vpc(this, \"MyVpc\", new VpcProps {\n NatGatewayProvider = natGatewayProvider,\n\n // The 'natGateways' parameter now controls the number of NAT instances\n NatGateways = 2\n});","version":"1"},"java":{"source":"// Configure the `natGatewayProvider` when defining a Vpc\nNatInstanceProvider natGatewayProvider = NatProvider.instance(NatInstanceProps.builder()\n .instanceType(new InstanceType(\"t3.small\"))\n .build());\n\nVpc vpc = Vpc.Builder.create(this, \"MyVpc\")\n .natGatewayProvider(natGatewayProvider)\n\n // The 'natGateways' parameter now controls the number of NAT instances\n .natGateways(2)\n .build();","version":"1"},"go":{"source":"// Configure the `natGatewayProvider` when defining a Vpc\nnatGatewayProvider := ec2.NatProvider_Instance(&NatInstanceProps{\n\tInstanceType: ec2.NewInstanceType(jsii.String(\"t3.small\")),\n})\n\nvpc := ec2.NewVpc(this, jsii.String(\"MyVpc\"), &VpcProps{\n\tNatGatewayProvider: NatGatewayProvider,\n\n\t// The 'natGateways' parameter now controls the number of NAT instances\n\tNatGateways: jsii.Number(2),\n})","version":"1"},"$":{"source":" // Configure the `natGatewayProvider` when defining a Vpc\n const natGatewayProvider = ec2.NatProvider.instance({\n instanceType: new ec2.InstanceType('t3.small'),\n });\n\n const vpc = new ec2.Vpc(this, 'MyVpc', {\n natGatewayProvider,\n\n // The 'natGateways' parameter now controls the number of NAT instances\n natGateways: 2,\n });","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":198}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.InstanceType","@aws-cdk/aws-ec2.NatInstanceProps","@aws-cdk/aws-ec2.NatInstanceProvider","@aws-cdk/aws-ec2.NatProvider","@aws-cdk/aws-ec2.NatProvider#instance","@aws-cdk/aws-ec2.Vpc","@aws-cdk/aws-ec2.VpcProps","@aws-cdk/core.Environment","constructs.Construct"],"fullSource":"/// !cdk-integ pragma:enable-lookups\nimport * as cdk from '@aws-cdk/core';\nimport * as ec2 from '../lib';\n\nclass NatInstanceStack extends cdk.Stack {\n constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {\n super(scope, id, props);\n\n /// !show\n // Configure the `natGatewayProvider` when defining a Vpc\n const natGatewayProvider = ec2.NatProvider.instance({\n instanceType: new ec2.InstanceType('t3.small'),\n });\n\n const vpc = new ec2.Vpc(this, 'MyVpc', {\n natGatewayProvider,\n\n // The 'natGateways' parameter now controls the number of NAT instances\n natGateways: 2,\n });\n /// !hide\n\n Array.isArray(vpc);\n Array.isArray(natGatewayProvider.configuredGateways);\n }\n}\n\nconst app = new cdk.App();\nnew NatInstanceStack(app, 'aws-cdk-vpc-nat-instances', {\n env: {\n account: process.env.CDK_INTEG_ACCOUNT || process.env.CDK_DEFAULT_ACCOUNT,\n region: process.env.CDK_INTEG_REGION || process.env.CDK_DEFAULT_REGION,\n },\n});\napp.synth();\n","syntaxKindCounter":{"8":1,"10":2,"75":12,"104":1,"193":2,"194":4,"196":1,"197":2,"225":2,"242":2,"243":2,"281":2,"282":1},"fqnsFingerprint":"64b25b3401b19b5476d5b5dfc1c6ed731691c5d52a7b1dcbc38082a9f9be5f4b"},"dc158d4dfaf7d25ca9ba0ba4cd9fe158874354e95a9073363e9d926badfb58d9":{"translations":{"python":{"source":"# instance_type: ec2.InstanceType\n\n\nprovider = ec2.NatProvider.instance(\n instance_type=instance_type,\n default_allowed_traffic=ec2.NatTrafficDirection.OUTBOUND_ONLY\n)\nec2.Vpc(self, \"TheVPC\",\n nat_gateway_provider=provider\n)\nprovider.connections.allow_from(ec2.Peer.ipv4(\"1.2.3.4/8\"), ec2.Port.tcp(80))","version":"2"},"csharp":{"source":"InstanceType instanceType;\n\n\nvar provider = NatProvider.Instance(new NatInstanceProps {\n InstanceType = instanceType,\n DefaultAllowedTraffic = NatTrafficDirection.OUTBOUND_ONLY\n});\nnew Vpc(this, \"TheVPC\", new VpcProps {\n NatGatewayProvider = provider\n});\nprovider.Connections.AllowFrom(Peer.Ipv4(\"1.2.3.4/8\"), Port.Tcp(80));","version":"1"},"java":{"source":"InstanceType instanceType;\n\n\nNatInstanceProvider provider = NatProvider.instance(NatInstanceProps.builder()\n .instanceType(instanceType)\n .defaultAllowedTraffic(NatTrafficDirection.OUTBOUND_ONLY)\n .build());\nVpc.Builder.create(this, \"TheVPC\")\n .natGatewayProvider(provider)\n .build();\nprovider.connections.allowFrom(Peer.ipv4(\"1.2.3.4/8\"), Port.tcp(80));","version":"1"},"go":{"source":"var instanceType instanceType\n\n\nprovider := ec2.NatProvider_Instance(&NatInstanceProps{\n\tInstanceType: InstanceType,\n\tDefaultAllowedTraffic: ec2.NatTrafficDirection_OUTBOUND_ONLY,\n})\nec2.NewVpc(this, jsii.String(\"TheVPC\"), &VpcProps{\n\tNatGatewayProvider: provider,\n})\nprovider.connections.AllowFrom(ec2.Peer_Ipv4(jsii.String(\"1.2.3.4/8\")), ec2.Port_Tcp(jsii.Number(80)))","version":"1"},"$":{"source":"declare const instanceType: ec2.InstanceType;\n\nconst provider = ec2.NatProvider.instance({\n instanceType,\n defaultAllowedTraffic: ec2.NatTrafficDirection.OUTBOUND_ONLY,\n});\nnew ec2.Vpc(this, 'TheVPC', {\n natGatewayProvider: provider,\n});\nprovider.connections.allowFrom(ec2.Peer.ipv4('1.2.3.4/8'), ec2.Port.tcp(80));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":222}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.Connections#allowFrom","@aws-cdk/aws-ec2.IConnectable","@aws-cdk/aws-ec2.InstanceType","@aws-cdk/aws-ec2.NatInstanceProps","@aws-cdk/aws-ec2.NatInstanceProvider","@aws-cdk/aws-ec2.NatProvider","@aws-cdk/aws-ec2.NatProvider#instance","@aws-cdk/aws-ec2.NatTrafficDirection","@aws-cdk/aws-ec2.NatTrafficDirection#OUTBOUND_ONLY","@aws-cdk/aws-ec2.Peer","@aws-cdk/aws-ec2.Peer#ipv4","@aws-cdk/aws-ec2.Port","@aws-cdk/aws-ec2.Port#tcp","@aws-cdk/aws-ec2.Vpc","@aws-cdk/aws-ec2.VpcProps","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const instanceType: ec2.InstanceType;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst provider = ec2.NatProvider.instance({\n instanceType,\n defaultAllowedTraffic: ec2.NatTrafficDirection.OUTBOUND_ONLY,\n});\nnew ec2.Vpc(this, 'TheVPC', {\n natGatewayProvider: provider,\n});\nprovider.connections.allowFrom(ec2.Peer.ipv4('1.2.3.4/8'), ec2.Port.tcp(80));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":1,"10":2,"75":25,"104":1,"130":1,"153":1,"169":1,"193":2,"194":11,"196":4,"197":1,"225":2,"226":2,"242":2,"243":2,"281":2,"282":1,"290":1},"fqnsFingerprint":"bf7ec87878643d8100358b9f7526bde900f442eaf33504501a296e9cf2367b23"},"d134a2f1a7cb94dec56e7cdfb3f7604719a956858b152ad5278e555ecd52d38a":{"translations":{"python":{"source":"vpc = ec2.Vpc(self, \"TheVPC\",\n # 'cidr' configures the IP range and size of the entire VPC.\n # The IP space will be divided over the configured subnets.\n cidr=\"10.0.0.0/21\",\n\n # 'maxAzs' configures the maximum number of availability zones to use\n max_azs=3,\n\n # 'subnetConfiguration' specifies the \"subnet groups\" to create.\n # Every subnet group will have a subnet for each AZ, so this\n # configuration will create `3 groups × 3 AZs = 9` subnets.\n subnet_configuration=[ec2.SubnetConfiguration(\n # 'subnetType' controls Internet access, as described above.\n subnet_type=ec2.SubnetType.PUBLIC,\n\n # 'name' is used to name this particular subnet group. You will have to\n # use the name for subnet selection if you have more than one subnet\n # group of the same type.\n name=\"Ingress\",\n\n # 'cidrMask' specifies the IP addresses in the range of of individual\n # subnets in the group. Each of the subnets in this group will contain\n # `2^(32 address bits - 24 subnet bits) - 2 reserved addresses = 254`\n # usable IP addresses.\n #\n # If 'cidrMask' is left out the available address space is evenly\n # divided across the remaining subnet groups.\n cidr_mask=24\n ), ec2.SubnetConfiguration(\n cidr_mask=24,\n name=\"Application\",\n subnet_type=ec2.SubnetType.PRIVATE_WITH_NAT\n ), ec2.SubnetConfiguration(\n cidr_mask=28,\n name=\"Database\",\n subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,\n\n # 'reserved' can be used to reserve IP address space. No resources will\n # be created for this subnet, but the IP range will be kept available for\n # future creation of this subnet, or even for future subdivision.\n reserved=True\n )\n ]\n)","version":"2"},"csharp":{"source":"var vpc = new Vpc(this, \"TheVPC\", new VpcProps {\n // 'cidr' configures the IP range and size of the entire VPC.\n // The IP space will be divided over the configured subnets.\n Cidr = \"10.0.0.0/21\",\n\n // 'maxAzs' configures the maximum number of availability zones to use\n MaxAzs = 3,\n\n // 'subnetConfiguration' specifies the \"subnet groups\" to create.\n // Every subnet group will have a subnet for each AZ, so this\n // configuration will create `3 groups × 3 AZs = 9` subnets.\n SubnetConfiguration = new [] { new SubnetConfiguration {\n // 'subnetType' controls Internet access, as described above.\n SubnetType = SubnetType.PUBLIC,\n\n // 'name' is used to name this particular subnet group. You will have to\n // use the name for subnet selection if you have more than one subnet\n // group of the same type.\n Name = \"Ingress\",\n\n // 'cidrMask' specifies the IP addresses in the range of of individual\n // subnets in the group. Each of the subnets in this group will contain\n // `2^(32 address bits - 24 subnet bits) - 2 reserved addresses = 254`\n // usable IP addresses.\n //\n // If 'cidrMask' is left out the available address space is evenly\n // divided across the remaining subnet groups.\n CidrMask = 24\n }, new SubnetConfiguration {\n CidrMask = 24,\n Name = \"Application\",\n SubnetType = SubnetType.PRIVATE_WITH_NAT\n }, new SubnetConfiguration {\n CidrMask = 28,\n Name = \"Database\",\n SubnetType = SubnetType.PRIVATE_ISOLATED,\n\n // 'reserved' can be used to reserve IP address space. No resources will\n // be created for this subnet, but the IP range will be kept available for\n // future creation of this subnet, or even for future subdivision.\n Reserved = true\n } }\n});","version":"1"},"java":{"source":"Vpc vpc = Vpc.Builder.create(this, \"TheVPC\")\n // 'cidr' configures the IP range and size of the entire VPC.\n // The IP space will be divided over the configured subnets.\n .cidr(\"10.0.0.0/21\")\n\n // 'maxAzs' configures the maximum number of availability zones to use\n .maxAzs(3)\n\n // 'subnetConfiguration' specifies the \"subnet groups\" to create.\n // Every subnet group will have a subnet for each AZ, so this\n // configuration will create `3 groups × 3 AZs = 9` subnets.\n .subnetConfiguration(List.of(SubnetConfiguration.builder()\n // 'subnetType' controls Internet access, as described above.\n .subnetType(SubnetType.PUBLIC)\n\n // 'name' is used to name this particular subnet group. You will have to\n // use the name for subnet selection if you have more than one subnet\n // group of the same type.\n .name(\"Ingress\")\n\n // 'cidrMask' specifies the IP addresses in the range of of individual\n // subnets in the group. Each of the subnets in this group will contain\n // `2^(32 address bits - 24 subnet bits) - 2 reserved addresses = 254`\n // usable IP addresses.\n //\n // If 'cidrMask' is left out the available address space is evenly\n // divided across the remaining subnet groups.\n .cidrMask(24)\n .build(), SubnetConfiguration.builder()\n .cidrMask(24)\n .name(\"Application\")\n .subnetType(SubnetType.PRIVATE_WITH_NAT)\n .build(), SubnetConfiguration.builder()\n .cidrMask(28)\n .name(\"Database\")\n .subnetType(SubnetType.PRIVATE_ISOLATED)\n\n // 'reserved' can be used to reserve IP address space. No resources will\n // be created for this subnet, but the IP range will be kept available for\n // future creation of this subnet, or even for future subdivision.\n .reserved(true)\n .build()))\n .build();","version":"1"},"go":{"source":"vpc := ec2.NewVpc(this, jsii.String(\"TheVPC\"), &VpcProps{\n\t// 'cidr' configures the IP range and size of the entire VPC.\n\t// The IP space will be divided over the configured subnets.\n\tCidr: jsii.String(\"10.0.0.0/21\"),\n\n\t// 'maxAzs' configures the maximum number of availability zones to use\n\tMaxAzs: jsii.Number(3),\n\n\t// 'subnetConfiguration' specifies the \"subnet groups\" to create.\n\t// Every subnet group will have a subnet for each AZ, so this\n\t// configuration will create `3 groups × 3 AZs = 9` subnets.\n\tSubnetConfiguration: []subnetConfiguration{\n\t\t&subnetConfiguration{\n\t\t\t// 'subnetType' controls Internet access, as described above.\n\t\t\tSubnetType: ec2.SubnetType_PUBLIC,\n\n\t\t\t// 'name' is used to name this particular subnet group. You will have to\n\t\t\t// use the name for subnet selection if you have more than one subnet\n\t\t\t// group of the same type.\n\t\t\tName: jsii.String(\"Ingress\"),\n\n\t\t\t// 'cidrMask' specifies the IP addresses in the range of of individual\n\t\t\t// subnets in the group. Each of the subnets in this group will contain\n\t\t\t// `2^(32 address bits - 24 subnet bits) - 2 reserved addresses = 254`\n\t\t\t// usable IP addresses.\n\t\t\t//\n\t\t\t// If 'cidrMask' is left out the available address space is evenly\n\t\t\t// divided across the remaining subnet groups.\n\t\t\tCidrMask: jsii.Number(24),\n\t\t},\n\t\t&subnetConfiguration{\n\t\t\tCidrMask: jsii.Number(24),\n\t\t\tName: jsii.String(\"Application\"),\n\t\t\tSubnetType: ec2.SubnetType_PRIVATE_WITH_NAT,\n\t\t},\n\t\t&subnetConfiguration{\n\t\t\tCidrMask: jsii.Number(28),\n\t\t\tName: jsii.String(\"Database\"),\n\t\t\tSubnetType: ec2.SubnetType_PRIVATE_ISOLATED,\n\n\t\t\t// 'reserved' can be used to reserve IP address space. No resources will\n\t\t\t// be created for this subnet, but the IP range will be kept available for\n\t\t\t// future creation of this subnet, or even for future subdivision.\n\t\t\tReserved: jsii.Boolean(true),\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"const vpc = new ec2.Vpc(this, 'TheVPC', {\n // 'cidr' configures the IP range and size of the entire VPC.\n // The IP space will be divided over the configured subnets.\n cidr: '10.0.0.0/21',\n\n // 'maxAzs' configures the maximum number of availability zones to use\n maxAzs: 3,\n\n // 'subnetConfiguration' specifies the \"subnet groups\" to create.\n // Every subnet group will have a subnet for each AZ, so this\n // configuration will create `3 groups × 3 AZs = 9` subnets.\n subnetConfiguration: [\n {\n // 'subnetType' controls Internet access, as described above.\n subnetType: ec2.SubnetType.PUBLIC,\n\n // 'name' is used to name this particular subnet group. You will have to\n // use the name for subnet selection if you have more than one subnet\n // group of the same type.\n name: 'Ingress',\n\n // 'cidrMask' specifies the IP addresses in the range of of individual\n // subnets in the group. Each of the subnets in this group will contain\n // `2^(32 address bits - 24 subnet bits) - 2 reserved addresses = 254`\n // usable IP addresses.\n //\n // If 'cidrMask' is left out the available address space is evenly\n // divided across the remaining subnet groups.\n cidrMask: 24,\n },\n {\n cidrMask: 24,\n name: 'Application',\n subnetType: ec2.SubnetType.PRIVATE_WITH_NAT,\n },\n {\n cidrMask: 28,\n name: 'Database',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n\n // 'reserved' can be used to reserve IP address space. No resources will\n // be created for this subnet, but the IP range will be kept available for\n // future creation of this subnet, or even for future subdivision.\n reserved: true\n }\n ],\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":243}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.SubnetType","@aws-cdk/aws-ec2.SubnetType#PRIVATE_ISOLATED","@aws-cdk/aws-ec2.SubnetType#PRIVATE_WITH_NAT","@aws-cdk/aws-ec2.SubnetType#PUBLIC","@aws-cdk/aws-ec2.Vpc","@aws-cdk/aws-ec2.VpcProps","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst vpc = new ec2.Vpc(this, 'TheVPC', {\n // 'cidr' configures the IP range and size of the entire VPC.\n // The IP space will be divided over the configured subnets.\n cidr: '10.0.0.0/21',\n\n // 'maxAzs' configures the maximum number of availability zones to use\n maxAzs: 3,\n\n // 'subnetConfiguration' specifies the \"subnet groups\" to create.\n // Every subnet group will have a subnet for each AZ, so this\n // configuration will create `3 groups × 3 AZs = 9` subnets.\n subnetConfiguration: [\n {\n // 'subnetType' controls Internet access, as described above.\n subnetType: ec2.SubnetType.PUBLIC,\n\n // 'name' is used to name this particular subnet group. You will have to\n // use the name for subnet selection if you have more than one subnet\n // group of the same type.\n name: 'Ingress',\n\n // 'cidrMask' specifies the IP addresses in the range of of individual\n // subnets in the group. Each of the subnets in this group will contain\n // `2^(32 address bits - 24 subnet bits) - 2 reserved addresses = 254`\n // usable IP addresses.\n //\n // If 'cidrMask' is left out the available address space is evenly\n // divided across the remaining subnet groups.\n cidrMask: 24,\n },\n {\n cidrMask: 24,\n name: 'Application',\n subnetType: ec2.SubnetType.PRIVATE_WITH_NAT,\n },\n {\n cidrMask: 28,\n name: 'Database',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n\n // 'reserved' can be used to reserve IP address space. No resources will\n // be created for this subnet, but the IP range will be kept available for\n // future creation of this subnet, or even for future subdivision.\n reserved: true\n }\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":4,"10":5,"75":25,"104":1,"106":1,"192":1,"193":4,"194":7,"197":1,"225":1,"242":1,"243":1,"281":13},"fqnsFingerprint":"8c0c75f0b8d1aebf94435cf01a71492f924c623e44230d8e9b0839fe065bd6fc"},"1f9ed901a4afb53e26001663021a3b25218f6e2e6d5e6938bc3c5141449eb1f4":{"translations":{"python":{"source":"# vpc: ec2.Vpc\n\n\nigw_id = vpc.internet_gateway_id","version":"2"},"csharp":{"source":"Vpc vpc;\n\n\nvar igwId = vpc.InternetGatewayId;","version":"1"},"java":{"source":"Vpc vpc;\n\n\nString igwId = vpc.getInternetGatewayId();","version":"1"},"go":{"source":"var vpc vpc\n\n\nigwId := vpc.InternetGatewayId","version":"1"},"$":{"source":"declare const vpc: ec2.Vpc;\n\nconst igwId = vpc.internetGatewayId;","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":315}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.Vpc#internetGatewayId"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const vpc: ec2.Vpc;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst igwId = vpc.internetGatewayId;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"75":6,"130":1,"153":1,"169":1,"194":1,"225":2,"242":2,"243":2,"290":1},"fqnsFingerprint":"18691b606fdcf7817ebb941179fc4c0fd7f56c4de09d9b72bfd93881f922d93a"},"e16785171d39814d617a2a9cad84c84c97c7e04aa9820b5d8cb0a4253fbb67a4":{"translations":{"python":{"source":"vpc = ec2.Vpc(self, \"VPC\",\n subnet_configuration=[ec2.SubnetConfiguration(\n subnet_type=ec2.SubnetType.PUBLIC,\n name=\"Public\"\n ), ec2.SubnetConfiguration(\n subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,\n name=\"Isolated\"\n )]\n)\n\n(vpc.isolated_subnets[0]).add_route(\"StaticRoute\",\n router_id=vpc.internet_gateway_id,\n router_type=ec2.RouterType.GATEWAY,\n destination_cidr_block=\"8.8.8.8/32\"\n)","version":"2"},"csharp":{"source":"var vpc = new Vpc(this, \"VPC\", new VpcProps {\n SubnetConfiguration = new [] { new SubnetConfiguration {\n SubnetType = SubnetType.PUBLIC,\n Name = \"Public\"\n }, new SubnetConfiguration {\n SubnetType = SubnetType.PRIVATE_ISOLATED,\n Name = \"Isolated\"\n } }\n});\n\n((Subnet)vpc.IsolatedSubnets[0]).AddRoute(\"StaticRoute\", new AddRouteOptions {\n RouterId = vpc.InternetGatewayId,\n RouterType = RouterType.GATEWAY,\n DestinationCidrBlock = \"8.8.8.8/32\"\n});","version":"1"},"java":{"source":"Vpc vpc = Vpc.Builder.create(this, \"VPC\")\n .subnetConfiguration(List.of(SubnetConfiguration.builder()\n .subnetType(SubnetType.PUBLIC)\n .name(\"Public\")\n .build(), SubnetConfiguration.builder()\n .subnetType(SubnetType.PRIVATE_ISOLATED)\n .name(\"Isolated\")\n .build()))\n .build();\n\n((Subnet)vpc.isolatedSubnets[0]).addRoute(\"StaticRoute\", AddRouteOptions.builder()\n .routerId(vpc.getInternetGatewayId())\n .routerType(RouterType.GATEWAY)\n .destinationCidrBlock(\"8.8.8.8/32\")\n .build());","version":"1"},"go":{"source":"vpc := ec2.NewVpc(this, jsii.String(\"VPC\"), &VpcProps{\n\tSubnetConfiguration: []subnetConfiguration{\n\t\t&subnetConfiguration{\n\t\t\tSubnetType: ec2.SubnetType_PUBLIC,\n\t\t\tName: jsii.String(\"Public\"),\n\t\t},\n\t\t&subnetConfiguration{\n\t\t\tSubnetType: ec2.SubnetType_PRIVATE_ISOLATED,\n\t\t\tName: jsii.String(\"Isolated\"),\n\t\t},\n\t},\n})\n\n(vpc.IsolatedSubnets[0].(subnet)).AddRoute(jsii.String(\"StaticRoute\"), &AddRouteOptions{\n\tRouterId: vpc.InternetGatewayId,\n\tRouterType: ec2.RouterType_GATEWAY,\n\tDestinationCidrBlock: jsii.String(\"8.8.8.8/32\"),\n})","version":"1"},"$":{"source":"const vpc = new ec2.Vpc(this, \"VPC\", {\n subnetConfiguration: [{\n subnetType: ec2.SubnetType.PUBLIC,\n name: 'Public',\n },{\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n name: 'Isolated',\n }]\n});\n\n(vpc.isolatedSubnets[0] as ec2.Subnet).addRoute(\"StaticRoute\", {\n routerId: vpc.internetGatewayId!,\n routerType: ec2.RouterType.GATEWAY,\n destinationCidrBlock: \"8.8.8.8/32\",\n})","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":338}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.AddRouteOptions","@aws-cdk/aws-ec2.RouterType","@aws-cdk/aws-ec2.RouterType#GATEWAY","@aws-cdk/aws-ec2.Subnet#addRoute","@aws-cdk/aws-ec2.SubnetType","@aws-cdk/aws-ec2.SubnetType#PRIVATE_ISOLATED","@aws-cdk/aws-ec2.SubnetType#PUBLIC","@aws-cdk/aws-ec2.Vpc","@aws-cdk/aws-ec2.Vpc#internetGatewayId","@aws-cdk/aws-ec2.Vpc#isolatedSubnets","@aws-cdk/aws-ec2.VpcProps","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst vpc = new ec2.Vpc(this, \"VPC\", {\n subnetConfiguration: [{\n subnetType: ec2.SubnetType.PUBLIC,\n name: 'Public',\n },{\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n name: 'Isolated',\n }]\n});\n\n(vpc.isolatedSubnets[0] as ec2.Subnet).addRoute(\"StaticRoute\", {\n routerId: vpc.internetGatewayId!,\n routerType: ec2.RouterType.GATEWAY,\n destinationCidrBlock: \"8.8.8.8/32\",\n})\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":1,"10":5,"75":27,"104":1,"153":1,"169":1,"192":1,"193":4,"194":10,"195":1,"196":1,"197":1,"200":1,"217":1,"218":1,"225":1,"226":1,"242":1,"243":1,"281":8},"fqnsFingerprint":"393685cda20bcc39376dad9dbdea034e65854371c677771a002087e2e354757d"},"63826b5cb28afa632e732142f7830f1940ed5e72160e18ab93292a805a686c05":{"translations":{"python":{"source":"vpc = ec2.Vpc(self, \"TheVPC\",\n nat_gateways=1,\n subnet_configuration=[ec2.SubnetConfiguration(\n cidr_mask=26,\n name=\"Public\",\n subnet_type=ec2.SubnetType.PUBLIC\n ), ec2.SubnetConfiguration(\n cidr_mask=26,\n name=\"Application1\",\n subnet_type=ec2.SubnetType.PRIVATE_WITH_NAT\n ), ec2.SubnetConfiguration(\n cidr_mask=26,\n name=\"Application2\",\n subnet_type=ec2.SubnetType.PRIVATE_WITH_NAT,\n reserved=True\n ), ec2.SubnetConfiguration(\n cidr_mask=27,\n name=\"Database\",\n subnet_type=ec2.SubnetType.PRIVATE_ISOLATED\n )\n ]\n)","version":"2"},"csharp":{"source":"var vpc = new Vpc(this, \"TheVPC\", new VpcProps {\n NatGateways = 1,\n SubnetConfiguration = new [] { new SubnetConfiguration {\n CidrMask = 26,\n Name = \"Public\",\n SubnetType = SubnetType.PUBLIC\n }, new SubnetConfiguration {\n CidrMask = 26,\n Name = \"Application1\",\n SubnetType = SubnetType.PRIVATE_WITH_NAT\n }, new SubnetConfiguration {\n CidrMask = 26,\n Name = \"Application2\",\n SubnetType = SubnetType.PRIVATE_WITH_NAT,\n Reserved = true\n }, new SubnetConfiguration {\n CidrMask = 27,\n Name = \"Database\",\n SubnetType = SubnetType.PRIVATE_ISOLATED\n } }\n});","version":"1"},"java":{"source":"Vpc vpc = Vpc.Builder.create(this, \"TheVPC\")\n .natGateways(1)\n .subnetConfiguration(List.of(SubnetConfiguration.builder()\n .cidrMask(26)\n .name(\"Public\")\n .subnetType(SubnetType.PUBLIC)\n .build(), SubnetConfiguration.builder()\n .cidrMask(26)\n .name(\"Application1\")\n .subnetType(SubnetType.PRIVATE_WITH_NAT)\n .build(), SubnetConfiguration.builder()\n .cidrMask(26)\n .name(\"Application2\")\n .subnetType(SubnetType.PRIVATE_WITH_NAT)\n .reserved(true)\n .build(), SubnetConfiguration.builder()\n .cidrMask(27)\n .name(\"Database\")\n .subnetType(SubnetType.PRIVATE_ISOLATED)\n .build()))\n .build();","version":"1"},"go":{"source":"vpc := ec2.NewVpc(this, jsii.String(\"TheVPC\"), &VpcProps{\n\tNatGateways: jsii.Number(1),\n\tSubnetConfiguration: []subnetConfiguration{\n\t\t&subnetConfiguration{\n\t\t\tCidrMask: jsii.Number(26),\n\t\t\tName: jsii.String(\"Public\"),\n\t\t\tSubnetType: ec2.SubnetType_PUBLIC,\n\t\t},\n\t\t&subnetConfiguration{\n\t\t\tCidrMask: jsii.Number(26),\n\t\t\tName: jsii.String(\"Application1\"),\n\t\t\tSubnetType: ec2.SubnetType_PRIVATE_WITH_NAT,\n\t\t},\n\t\t&subnetConfiguration{\n\t\t\tCidrMask: jsii.Number(26),\n\t\t\tName: jsii.String(\"Application2\"),\n\t\t\tSubnetType: ec2.SubnetType_PRIVATE_WITH_NAT,\n\t\t\tReserved: jsii.Boolean(true),\n\t\t},\n\t\t&subnetConfiguration{\n\t\t\tCidrMask: jsii.Number(27),\n\t\t\tName: jsii.String(\"Database\"),\n\t\t\tSubnetType: ec2.SubnetType_PRIVATE_ISOLATED,\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"const vpc = new ec2.Vpc(this, 'TheVPC', {\n natGateways: 1,\n subnetConfiguration: [\n {\n cidrMask: 26,\n name: 'Public',\n subnetType: ec2.SubnetType.PUBLIC,\n },\n {\n cidrMask: 26,\n name: 'Application1',\n subnetType: ec2.SubnetType.PRIVATE_WITH_NAT,\n },\n {\n cidrMask: 26,\n name: 'Application2',\n subnetType: ec2.SubnetType.PRIVATE_WITH_NAT,\n reserved: true, // <---- This subnet group is reserved\n },\n {\n cidrMask: 27,\n name: 'Database',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n }\n ],\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":368}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.SubnetType","@aws-cdk/aws-ec2.SubnetType#PRIVATE_ISOLATED","@aws-cdk/aws-ec2.SubnetType#PRIVATE_WITH_NAT","@aws-cdk/aws-ec2.SubnetType#PUBLIC","@aws-cdk/aws-ec2.Vpc","@aws-cdk/aws-ec2.VpcProps","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Aspects, Construct, Duration, Fn, Size, Stack, StackProps } from '@aws-cdk/core';\nimport ec2 = require('@aws-cdk/aws-ec2');\nimport s3 = require('@aws-cdk/aws-s3');\nimport iam = require('@aws-cdk/aws-iam');\nimport logs = require('@aws-cdk/aws-logs');\nimport ssm = require('@aws-cdk/aws-ssm');\nimport autoscaling = require('@aws-cdk/aws-autoscaling');\nimport elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');\nimport rds = require('@aws-cdk/aws-rds');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst vpc = new ec2.Vpc(this, 'TheVPC', {\n natGateways: 1,\n subnetConfiguration: [\n {\n cidrMask: 26,\n name: 'Public',\n subnetType: ec2.SubnetType.PUBLIC,\n },\n {\n cidrMask: 26,\n name: 'Application1',\n subnetType: ec2.SubnetType.PRIVATE_WITH_NAT,\n },\n {\n cidrMask: 26,\n name: 'Application2',\n subnetType: ec2.SubnetType.PRIVATE_WITH_NAT,\n reserved: true, // <---- This subnet group is reserved\n },\n {\n cidrMask: 27,\n name: 'Database',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n }\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":5,"10":5,"75":30,"104":1,"106":1,"192":1,"193":5,"194":9,"197":1,"225":1,"242":1,"243":1,"281":15},"fqnsFingerprint":"8c0c75f0b8d1aebf94435cf01a71492f924c623e44230d8e9b0839fe065bd6fc"},"f34f16b79a4670850c77544fb996fd8754e0be8bcc57f489bea3ca7e6d9e8163":{"translations":{"python":{"source":"#\n# Stack1 creates the VPC\n#\nclass Stack1(cdk.Stack):\n\n def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):\n super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)\n\n self.vpc = ec2.Vpc(self, \"VPC\")\n\n#\n# Stack2 consumes the VPC\n#\nclass Stack2(cdk.Stack):\n def __init__(self, scope, id, *, vpc, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):\n super().__init__(scope, id, vpc=vpc, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)\n\n # Pass the VPC to a construct that needs it\n ConstructThatTakesAVpc(self, \"Construct\",\n vpc=vpc\n )\n\nstack1 = Stack1(app, \"Stack1\")\nstack2 = Stack2(app, \"Stack2\",\n vpc=stack1.vpc\n)","version":"2"},"csharp":{"source":"/**\n * Stack1 creates the VPC\n */\nclass Stack1 : Stack\n{\n public Vpc Vpc { get; }\n\n public Stack1(App scope, string id, StackProps? props=null) : base(scope, id, props)\n {\n\n Vpc = new Vpc(this, \"VPC\");\n }\n}\n\nclass Stack2Props : StackProps\n{\n public IVpc Vpc { get; set; }\n}\n\n/**\n * Stack2 consumes the VPC\n */\nclass Stack2 : Stack\n{\n public Stack2(App scope, string id, Stack2Props props) : base(scope, id, props)\n {\n\n // Pass the VPC to a construct that needs it\n // Pass the VPC to a construct that needs it\n new ConstructThatTakesAVpc(this, \"Construct\", new ConstructThatTakesAVpcProps {\n Vpc = props.Vpc\n });\n }\n}\n\nvar stack1 = new Stack1(app, \"Stack1\");\nvar stack2 = new Stack2(app, \"Stack2\", new Stack2Props {\n Vpc = stack1.Vpc\n});","version":"1"},"java":{"source":"/**\n * Stack1 creates the VPC\n */\npublic class Stack1 extends Stack {\n public final Vpc vpc;\n\n public Stack1(App scope, String id) {\n this(scope, id, null);\n }\n\n public Stack1(App scope, String id, StackProps props) {\n super(scope, id, props);\n\n this.vpc = new Vpc(this, \"VPC\");\n }\n}\n\npublic class Stack2Props extends StackProps {\n private IVpc vpc;\n public IVpc getVpc() {\n return this.vpc;\n }\n public Stack2Props vpc(IVpc vpc) {\n this.vpc = vpc;\n return this;\n }\n}\n\n/**\n * Stack2 consumes the VPC\n */\npublic class Stack2 extends Stack {\n public Stack2(App scope, String id, Stack2Props props) {\n super(scope, id, props);\n\n // Pass the VPC to a construct that needs it\n // Pass the VPC to a construct that needs it\n new ConstructThatTakesAVpc(this, \"Construct\", new ConstructThatTakesAVpcProps()\n .vpc(props.getVpc())\n );\n }\n}\n\nStack1 stack1 = new Stack1(app, \"Stack1\");\nStack2 stack2 = new Stack2(app, \"Stack2\", new Stack2Props()\n .vpc(stack1.getVpc())\n );","version":"1"},"go":{"source":"/**\n * Stack1 creates the VPC\n */\ntype stack1 struct {\n\tstack\n\tvpc vpc\n}\n\nfunc newStack1(scope app, id *string, props stackProps) *stack1 {\n\tthis := &stack1{}\n\tcdk.NewStack_Override(this, scope, id, props)\n\n\tthis.vpc = ec2.NewVpc(this, jsii.String(\"VPC\"))\n\treturn this\n}\n\ntype stack2Props struct {\n\tstackProps\n\tvpc *iVpc\n}\n\n/**\n * Stack2 consumes the VPC\n */\ntype stack2 struct {\n\tstack\n}\n\nfunc newStack2(scope app, id *string, props stack2Props) *stack2 {\n\tthis := &stack2{}\n\tcdk.NewStack_Override(this, scope, id, props)\n\n\t// Pass the VPC to a construct that needs it\n\t// Pass the VPC to a construct that needs it\n\tNewConstructThatTakesAVpc(this, jsii.String(\"Construct\"), &constructThatTakesAVpcProps{\n\t\tvpc: props.vpc,\n\t})\n\treturn this\n}\n\nstack1 := NewStack1(app, jsii.String(\"Stack1\"))\nstack2 := NewStack2(app, jsii.String(\"Stack2\"), &stack2Props{\n\tvpc: stack1.vpc,\n})","version":"1"},"$":{"source":"/**\n * Stack1 creates the VPC\n */\nclass Stack1 extends cdk.Stack {\n public readonly vpc: ec2.Vpc;\n\n constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {\n super(scope, id, props);\n\n this.vpc = new ec2.Vpc(this, 'VPC');\n }\n}\n\ninterface Stack2Props extends cdk.StackProps {\n vpc: ec2.IVpc;\n}\n\n/**\n * Stack2 consumes the VPC\n */\nclass Stack2 extends cdk.Stack {\n constructor(scope: cdk.App, id: string, props: Stack2Props) {\n super(scope, id, props);\n\n // Pass the VPC to a construct that needs it\n new ConstructThatTakesAVpc(this, 'Construct', {\n vpc: props.vpc,\n });\n }\n}\n\nconst stack1 = new Stack1(app, 'Stack1');\nconst stack2 = new Stack2(app, 'Stack2', {\n vpc: stack1.vpc,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-ec2"},"field":{"field":"markdown","line":408}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ec2.IVpc","@aws-cdk/