Class VpcV2Attributes.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.alpha.VpcV2Attributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<VpcV2Attributes>
- Enclosing interface:
VpcV2Attributes
@Stability(Experimental)
public static final class VpcV2Attributes.Builder
extends Object
implements software.amazon.jsii.Builder<VpcV2Attributes>
A builder for
VpcV2Attributes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.ownerAccountId
(String ownerAccountId) Sets the value ofVpcV2Attributes.getOwnerAccountId()
Sets the value ofVpcV2Attributes.getRegion()
secondaryCidrBlocks
(List<? extends VPCCidrBlockattributes> secondaryCidrBlocks) Sets the value ofVpcV2Attributes.getSecondaryCidrBlocks()
subnets
(List<? extends SubnetV2Attributes> subnets) Sets the value ofVpcV2Attributes.getSubnets()
vpcCidrBlock
(String vpcCidrBlock) Sets the value ofVpcV2Attributes.getVpcCidrBlock()
Sets the value ofVpcV2Attributes.getVpcId()
vpnGatewayId
(String vpnGatewayId) Sets the value ofVpcV2Attributes.getVpnGatewayId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpcCidrBlock
Sets the value ofVpcV2Attributes.getVpcCidrBlock()
- Parameters:
vpcCidrBlock
- Primary VPC CIDR Block of the imported VPC Can only be IPv4. This parameter is required.- Returns:
this
-
vpcId
Sets the value ofVpcV2Attributes.getVpcId()
- Parameters:
vpcId
- The VPC ID Refers to physical Id of the resource. This parameter is required.- Returns:
this
-
ownerAccountId
Sets the value ofVpcV2Attributes.getOwnerAccountId()
- Parameters:
ownerAccountId
- The ID of the AWS account that owns the imported VPC required in case of cross account VPC as given value will be used to set field account for imported VPC, which then later can be used for establishing VPC peering connection.- Returns:
this
-
region
Sets the value ofVpcV2Attributes.getRegion()
- Parameters:
region
- Region in which imported VPC is hosted required in case of cross region VPC as given value will be used to set field region for imported VPC, which then later can be used for establishing VPC peering connection.- Returns:
this
-
secondaryCidrBlocks
@Stability(Experimental) public VpcV2Attributes.Builder secondaryCidrBlocks(List<? extends VPCCidrBlockattributes> secondaryCidrBlocks) Sets the value ofVpcV2Attributes.getSecondaryCidrBlocks()
- Parameters:
secondaryCidrBlocks
- Import Secondary CIDR blocks associated with VPC.- Returns:
this
-
subnets
@Stability(Experimental) public VpcV2Attributes.Builder subnets(List<? extends SubnetV2Attributes> subnets) Sets the value ofVpcV2Attributes.getSubnets()
- Parameters:
subnets
- Subnets associated with imported VPC.- Returns:
this
-
vpnGatewayId
Sets the value ofVpcV2Attributes.getVpnGatewayId()
- Parameters:
vpnGatewayId
- A VPN Gateway is attached to the VPC.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<VpcV2Attributes>
- Returns:
- a new instance of
VpcV2Attributes
- Throws:
NullPointerException
- if any required attribute was not provided
-