public RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) {
        if (this.blockDeviceMappings == null) {
            setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList<BlockDeviceMapping>(blockDeviceMappings.length));
        }
        for (BlockDeviceMapping ele : blockDeviceMappings) {
            this.blockDeviceMappings.add(ele);
        }
        return this;
    }
<p>
The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at
launch. For more information, see <a
href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block device
mappings</a> in the <i>Amazon EC2 User Guide</i>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setBlockDeviceMappings(java.util.Collection)} or {@link #withBlockDeviceMappings(java.util.Collection)}
if you want to override the existing values.
</p>

@param blockDeviceMappings
       The block device mapping, which defines the EBS volumes and instance store volumes to attach to the
       instance at launch. For more information, see <a
       href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block device
       mappings</a> in the <i>Amazon EC2 User Guide</i>.
@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/RunInstancesRequest.java