Class ConnectionsProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.ConnectionsProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ConnectionsProps>
- Enclosing interface:
ConnectionsProps
@Stability(Stable)
public static final class ConnectionsProps.Builder
extends Object
implements software.amazon.jsii.Builder<ConnectionsProps>
A builder for
ConnectionsProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.defaultPort
(Port defaultPort) Sets the value ofConnectionsProps.getDefaultPort()
Sets the value ofConnectionsProps.getPeer()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofConnectionsProps.getSecurityGroups()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultPort
Sets the value ofConnectionsProps.getDefaultPort()
- Parameters:
defaultPort
- Default port range for initiating connections to and from this object.- Returns:
this
-
peer
Sets the value ofConnectionsProps.getPeer()
- Parameters:
peer
- Class that represents the rule by which others can connect to this connectable. This object is required, but will be derived from securityGroup if that is passed.- Returns:
this
-
securityGroups
@Stability(Stable) public ConnectionsProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofConnectionsProps.getSecurityGroups()
- Parameters:
securityGroups
- What securityGroup(s) this object is managing connections for.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ConnectionsProps>
- Returns:
- a new instance of
ConnectionsProps
- Throws:
NullPointerException
- if any required attribute was not provided
-