Class CfnSecurityGroup.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.CfnSecurityGroup.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSecurityGroup>
Enclosing class:
CfnSecurityGroup

@Stability(Stable) public static final class CfnSecurityGroup.Builder extends Object implements software.amazon.jsii.Builder<CfnSecurityGroup>
A fluent builder for CfnSecurityGroup.
  • Method Details

    • create

      @Stability(Stable) public static CfnSecurityGroup.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnSecurityGroup.Builder.
    • groupDescription

      @Stability(Stable) public CfnSecurityGroup.Builder groupDescription(String groupDescription)
      A description for the security group.

      Constraints: Up to 255 characters in length

      Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      Parameters:
      groupDescription - A description for the security group. This parameter is required.
      Returns:
      this
    • groupName

      @Stability(Stable) public CfnSecurityGroup.Builder groupName(String groupName)
      The name of the security group.

      Constraints: Up to 255 characters in length. Cannot start with sg- .

      Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      Parameters:
      groupName - The name of the security group. This parameter is required.
      Returns:
      this
    • securityGroupEgress

      @Stability(Stable) public CfnSecurityGroup.Builder securityGroupEgress(IResolvable securityGroupEgress)
      The outbound rules associated with the security group.

      There is a short interruption during which you cannot connect to the security group.

      Parameters:
      securityGroupEgress - The outbound rules associated with the security group. This parameter is required.
      Returns:
      this
    • securityGroupEgress

      @Stability(Stable) public CfnSecurityGroup.Builder securityGroupEgress(List<? extends Object> securityGroupEgress)
      The outbound rules associated with the security group.

      There is a short interruption during which you cannot connect to the security group.

      Parameters:
      securityGroupEgress - The outbound rules associated with the security group. This parameter is required.
      Returns:
      this
    • securityGroupIngress

      @Stability(Stable) public CfnSecurityGroup.Builder securityGroupIngress(IResolvable securityGroupIngress)
      The inbound rules associated with the security group.

      There is a short interruption during which you cannot connect to the security group.

      Parameters:
      securityGroupIngress - The inbound rules associated with the security group. This parameter is required.
      Returns:
      this
    • securityGroupIngress

      @Stability(Stable) public CfnSecurityGroup.Builder securityGroupIngress(List<? extends Object> securityGroupIngress)
      The inbound rules associated with the security group.

      There is a short interruption during which you cannot connect to the security group.

      Parameters:
      securityGroupIngress - The inbound rules associated with the security group. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnSecurityGroup.Builder tags(List<? extends CfnTag> tags)
      Any tags assigned to the security group.

      Parameters:
      tags - Any tags assigned to the security group. This parameter is required.
      Returns:
      this
    • vpcId

      @Stability(Stable) public CfnSecurityGroup.Builder vpcId(String vpcId)
      The ID of the VPC for the security group.

      Parameters:
      vpcId - The ID of the VPC for the security group. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnSecurityGroup build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnSecurityGroup>
      Returns:
      a newly built instance of CfnSecurityGroup.