Class CfnVPCBlockPublicAccessExclusionProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnVPCBlockPublicAccessExclusionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnVPCBlockPublicAccessExclusionProps>
- Enclosing interface:
CfnVPCBlockPublicAccessExclusionProps
@Stability(Stable)
public static final class CfnVPCBlockPublicAccessExclusionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnVPCBlockPublicAccessExclusionProps>
A builder for
CfnVPCBlockPublicAccessExclusionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.internetGatewayExclusionMode
(String internetGatewayExclusionMode) Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getInternetGatewayExclusionMode()
Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getSubnetId()
Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getTags()
Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getVpcId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
internetGatewayExclusionMode
@Stability(Stable) public CfnVPCBlockPublicAccessExclusionProps.Builder internetGatewayExclusionMode(String internetGatewayExclusionMode) Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getInternetGatewayExclusionMode()
- Parameters:
internetGatewayExclusionMode
- The desired VPC Block Public Access mode for a specific VPC or subnet exclusion. This parameter is required.allow-bidirectional
: Allow all internet traffic to and from the excluded VPCs and subnets.allow-egress
: Allow outbound internet traffic from the excluded VPCs and subnets. Block inbound internet traffic to the excluded VPCs and subnets. Only applies when VPC Block Public Access is set toblock-bidirectional
.
- Returns:
this
-
subnetId
Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getSubnetId()
- Parameters:
subnetId
- The ID of the subnet you want to exclude. Required only if you don't specify VpcId.- Returns:
this
-
tags
@Stability(Stable) public CfnVPCBlockPublicAccessExclusionProps.Builder tags(List<? extends CfnTag> tags) Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getTags()
- Parameters:
tags
- An array of key-value pairs to apply to this resource.- Returns:
this
-
vpcId
Sets the value ofCfnVPCBlockPublicAccessExclusionProps.getVpcId()
- Parameters:
vpcId
- The ID of the VPC you want to exclude. Required only if you don't specify SubnetId.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnVPCBlockPublicAccessExclusionProps>
- Returns:
- a new instance of
CfnVPCBlockPublicAccessExclusionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-