public LaunchSpecification withAllSecurityGroups(GroupIdentifier... allSecurityGroups) {
        if (this.allSecurityGroups == null) {
            setAllSecurityGroups(new com.amazonaws.internal.SdkInternalList<GroupIdentifier>(allSecurityGroups.length));
        }
        for (GroupIdentifier ele : allSecurityGroups) {
            this.allSecurityGroups.add(ele);
        }
        return this;
    }
<p>
The IDs of the security groups.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setAllSecurityGroups(java.util.Collection)} or {@link #withAllSecurityGroups(java.util.Collection)} if
you want to override the existing values.
</p>

@param allSecurityGroups
       The IDs of the security groups.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/LaunchSpecification.java