public CreateGameServerGroupRequest withInstanceDefinitions(InstanceDefinition... instanceDefinitions) {
        if (this.instanceDefinitions == null) {
            setInstanceDefinitions(new java.util.ArrayList<InstanceDefinition>(instanceDefinitions.length));
        }
        for (InstanceDefinition ele : instanceDefinitions) {
            this.instanceDefinitions.add(ele);
        }
        return this;
    }
<p>
The Amazon EC2 instance types and sizes to use in the Auto Scaling group. The instance definitions must specify
at least two different instance types that are supported by Amazon GameLift FleetIQ. For more information on
instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">EC2
Instance Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. You can optionally specify capacity
weighting for each instance type. If no weight value is specified for an instance type, it is set to the default
value "1". For more information about capacity weighting, see <a
href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-weighting.html"> Instance Weighting for
Amazon EC2 Auto Scaling</a> in the Amazon EC2 Auto Scaling User Guide.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setInstanceDefinitions(java.util.Collection)} or {@link #withInstanceDefinitions(java.util.Collection)}
if you want to override the existing values.
</p>

@param instanceDefinitions
       The Amazon EC2 instance types and sizes to use in the Auto Scaling group. The instance definitions must
       specify at least two different instance types that are supported by Amazon GameLift FleetIQ. For more
       information on instance types, see <a
       href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">EC2 Instance Types</a> in
       the <i>Amazon Elastic Compute Cloud User Guide</i>. You can optionally specify capacity weighting for each
       instance type. If no weight value is specified for an instance type, it is set to the default value "1".
       For more information about capacity weighting, see <a
       href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-weighting.html"> Instance
       Weighting for Amazon EC2 Auto Scaling</a> in the Amazon EC2 Auto Scaling User Guide.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/CreateGameServerGroupRequest.java