Class Connections.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.Connections.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Connections>
- Enclosing class:
Connections
@Stability(Stable)
public static final class Connections.Builder
extends Object
implements software.amazon.jsii.Builder<Connections>
A fluent builder for
Connections
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static Connections.Builder
create()
defaultPort
(Port defaultPort) Default port range for initiating connections to and from this object.Class that represents the rule by which others can connect to this connectable.securityGroups
(List<? extends ISecurityGroup> securityGroups) What securityGroup(s) this object is managing connections for.
-
Method Details
-
create
- Returns:
- a new instance of
Connections.Builder
.
-
defaultPort
Default port range for initiating connections to and from this object.Default: - No default port
- Parameters:
defaultPort
- Default port range for initiating connections to and from this object. This parameter is required.- Returns:
this
-
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.
Default: Derived from securityGroup if set.
- Parameters:
peer
- Class that represents the rule by which others can connect to this connectable. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public Connections.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) What securityGroup(s) this object is managing connections for.Default: No security groups
- Parameters:
securityGroups
- What securityGroup(s) this object is managing connections for. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Connections>
- Returns:
- a newly built instance of
Connections
.
-