Class CfnSecurityGroupProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnSecurityGroupProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSecurityGroupProps>
- Enclosing interface:
CfnSecurityGroupProps
@Stability(Stable)
public static final class CfnSecurityGroupProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSecurityGroupProps>
A builder for
CfnSecurityGroupProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.groupDescription
(String groupDescription) Sets the value ofCfnSecurityGroupProps.getGroupDescription()
Sets the value ofCfnSecurityGroupProps.getGroupName()
securityGroupEgress
(List<? extends Object> securityGroupEgress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupEgress()
securityGroupEgress
(IResolvable securityGroupEgress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupEgress()
securityGroupIngress
(List<? extends Object> securityGroupIngress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupIngress()
securityGroupIngress
(IResolvable securityGroupIngress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupIngress()
Sets the value ofCfnSecurityGroupProps.getTags()
Sets the value ofCfnSecurityGroupProps.getVpcId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
groupDescription
Sets the value ofCfnSecurityGroupProps.getGroupDescription()
- Parameters:
groupDescription
- A description for the security group. This parameter is required. Constraints: Up to 255 characters in lengthValid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- Returns:
this
-
groupName
Sets the value ofCfnSecurityGroupProps.getGroupName()
- Parameters:
groupName
- The name of the security group. Constraints: Up to 255 characters in length. Cannot start withsg-
.Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- Returns:
this
-
securityGroupEgress
@Stability(Stable) public CfnSecurityGroupProps.Builder securityGroupEgress(IResolvable securityGroupEgress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupEgress()
- Parameters:
securityGroupEgress
- The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.- Returns:
this
-
securityGroupEgress
@Stability(Stable) public CfnSecurityGroupProps.Builder securityGroupEgress(List<? extends Object> securityGroupEgress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupEgress()
- Parameters:
securityGroupEgress
- The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.- Returns:
this
-
securityGroupIngress
@Stability(Stable) public CfnSecurityGroupProps.Builder securityGroupIngress(IResolvable securityGroupIngress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupIngress()
- Parameters:
securityGroupIngress
- The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.- Returns:
this
-
securityGroupIngress
@Stability(Stable) public CfnSecurityGroupProps.Builder securityGroupIngress(List<? extends Object> securityGroupIngress) Sets the value ofCfnSecurityGroupProps.getSecurityGroupIngress()
- Parameters:
securityGroupIngress
- The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.- Returns:
this
-
tags
Sets the value ofCfnSecurityGroupProps.getTags()
- Parameters:
tags
- Any tags assigned to the security group.- Returns:
this
-
vpcId
Sets the value ofCfnSecurityGroupProps.getVpcId()
- Parameters:
vpcId
- The ID of the VPC for the security group. If you do not specify a VPC, the default is to use the default VPC for the Region. If there's no specified VPC and no default VPC, security group creation fails.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSecurityGroupProps>
- Returns:
- a new instance of
CfnSecurityGroupProps
- Throws:
NullPointerException
- if any required attribute was not provided
-