Class RuleScope.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • id

      @Stability(Stable) public RuleScope.Builder id(String id)
      Sets the value of RuleScope.getId()
      Parameters:
      id - The construct ID to use for the rule. This parameter is required.
      Returns:
      this
    • scope

      @Stability(Stable) public RuleScope.Builder scope(ISecurityGroup scope)
      Sets the value of RuleScope.getScope()
      Parameters:
      scope - The SecurityGroup in which a rule should be scoped. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public RuleScope build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<RuleScope>
      Returns:
      a new instance of RuleScope
      Throws:
      NullPointerException - if any required attribute was not provided