Class CfnContainerGroupDefinition.ContainerPortRangeProperty.Builder
java.lang.Object
software.amazon.awscdk.services.gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerPortRangeProperty>
- Enclosing interface:
CfnContainerGroupDefinition.ContainerPortRangeProperty
@Stability(Stable)
public static final class CfnContainerGroupDefinition.ContainerPortRangeProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerPortRangeProperty>
A builder for
CfnContainerGroupDefinition.ContainerPortRangeProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnContainerGroupDefinition.ContainerPortRangeProperty.getFromPort()
Sets the value ofCfnContainerGroupDefinition.ContainerPortRangeProperty.getProtocol()
Sets the value ofCfnContainerGroupDefinition.ContainerPortRangeProperty.getToPort()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fromPort
@Stability(Stable) public CfnContainerGroupDefinition.ContainerPortRangeProperty.Builder fromPort(Number fromPort) Sets the value ofCfnContainerGroupDefinition.ContainerPortRangeProperty.getFromPort()
- Parameters:
fromPort
- A starting value for the range of allowed port numbers. This parameter is required.- Returns:
this
-
protocol
@Stability(Stable) public CfnContainerGroupDefinition.ContainerPortRangeProperty.Builder protocol(String protocol) Sets the value ofCfnContainerGroupDefinition.ContainerPortRangeProperty.getProtocol()
- Parameters:
protocol
- The network protocol that these ports support. This parameter is required.- Returns:
this
-
toPort
@Stability(Stable) public CfnContainerGroupDefinition.ContainerPortRangeProperty.Builder toPort(Number toPort) Sets the value ofCfnContainerGroupDefinition.ContainerPortRangeProperty.getToPort()
- Parameters:
toPort
- An ending value for the range of allowed port numbers. This parameter is required. Port numbers are end-inclusive. This value must be equal to or greater thanFromPort
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerPortRangeProperty>
- Returns:
- a new instance of
CfnContainerGroupDefinition.ContainerPortRangeProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-