@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.509Z") @Stability(value=Stable) public interface VpcAttributes extends software.amazon.jsii.JsiiSerializable
Example:
ISecurityGroup sg = SecurityGroup.fromSecurityGroupId(this, "FsxSecurityGroup", "{SECURITY-GROUP-ID}");
IFileSystem fs = LustreFileSystem.fromLustreFileSystemAttributes(this, "FsxLustreFileSystem", FileSystemAttributes.builder()
.dnsName("{FILE-SYSTEM-DNS-NAME}")
.fileSystemId("{FILE-SYSTEM-ID}")
.securityGroup(sg)
.build());
IVpc vpc = Vpc.fromVpcAttributes(this, "Vpc", VpcAttributes.builder()
.availabilityZones(List.of("us-west-2a", "us-west-2b"))
.publicSubnetIds(List.of("{US-WEST-2A-SUBNET-ID}", "{US-WEST-2B-SUBNET-ID}"))
.vpcId("{VPC-ID}")
.build());
Instance inst = Instance.Builder.create(this, "inst")
.instanceType(InstanceType.of(InstanceClass.T2, InstanceSize.LARGE))
.machineImage(AmazonLinuxImage.Builder.create()
.generation(AmazonLinuxGeneration.AMAZON_LINUX_2)
.build())
.vpc(vpc)
.vpcSubnets(SubnetSelection.builder()
.subnetType(SubnetType.PUBLIC)
.build())
.build();
fs.connections.allowDefaultPortFrom(inst);
| Modifier and Type | Interface and Description |
|---|---|
static class |
VpcAttributes.Builder
A builder for
VpcAttributes |
static class |
VpcAttributes.Jsii$Proxy
An implementation for
VpcAttributes |
| Modifier and Type | Method and Description |
|---|---|
static VpcAttributes.Builder |
builder() |
List<String> |
getAvailabilityZones()
List of availability zones for the subnets in this VPC.
|
default List<String> |
getIsolatedSubnetIds()
List of isolated subnet IDs.
|
default List<String> |
getIsolatedSubnetNames()
List of names for the isolated subnets.
|
default List<String> |
getIsolatedSubnetRouteTableIds()
List of IDs of routing tables for the isolated subnets.
|
default List<String> |
getPrivateSubnetIds()
List of private subnet IDs.
|
default List<String> |
getPrivateSubnetNames()
List of names for the private subnets.
|
default List<String> |
getPrivateSubnetRouteTableIds()
List of IDs of routing tables for the private subnets.
|
default List<String> |
getPublicSubnetIds()
List of public subnet IDs.
|
default List<String> |
getPublicSubnetNames()
List of names for the public subnets.
|
default List<String> |
getPublicSubnetRouteTableIds()
List of IDs of routing tables for the public subnets.
|
default String |
getRegion()
The region the VPC is in.
|
default String |
getVpcCidrBlock()
VPC's CIDR range.
|
String |
getVpcId()
VPC's identifier.
|
default String |
getVpnGatewayId()
VPN gateway's identifier.
|
@Stability(value=Stable) @NotNull List<String> getAvailabilityZones()
@Stability(value=Stable) @NotNull String getVpcId()
@Stability(value=Stable) @Nullable default List<String> getIsolatedSubnetIds()
Must be undefined or match the availability zones in length and order.
@Stability(value=Stable) @Nullable default List<String> getIsolatedSubnetNames()
Must be undefined or have a name for every isolated subnet group.
@Stability(value=Stable) @Nullable default List<String> getIsolatedSubnetRouteTableIds()
Must be undefined or have a name for every isolated subnet group.
@Stability(value=Stable) @Nullable default List<String> getPrivateSubnetIds()
Must be undefined or match the availability zones in length and order.
@Stability(value=Stable) @Nullable default List<String> getPrivateSubnetNames()
Must be undefined or have a name for every private subnet group.
@Stability(value=Stable) @Nullable default List<String> getPrivateSubnetRouteTableIds()
Must be undefined or have a name for every private subnet group.
@Stability(value=Stable) @Nullable default List<String> getPublicSubnetIds()
Must be undefined or match the availability zones in length and order.
@Stability(value=Stable) @Nullable default List<String> getPublicSubnetNames()
Must be undefined or have a name for every public subnet group.
@Stability(value=Stable) @Nullable default List<String> getPublicSubnetRouteTableIds()
Must be undefined or have a name for every public subnet group.
@Stability(value=Stable) @Nullable default String getRegion()
Default: - The region of the stack where the VPC belongs to
@Stability(value=Stable) @Nullable default String getVpcCidrBlock()
Default: - Retrieving the CIDR from the VPC will fail
@Stability(value=Stable) @Nullable default String getVpnGatewayId()
@Stability(value=Stable) static VpcAttributes.Builder builder()
VpcAttributes.Builder of VpcAttributesCopyright © 2022. All rights reserved.