public RegisterImageRequest 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 entries.
</p>
<p>
If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption
state of the volume.
</p>
<p>
If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of
that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost
only. For more information, <a
href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami">Amazon EBS local snapshots on
Outposts</a> in the <i>Amazon EBS 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 entries.</p>
       <p>
       If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the
       encryption state of the volume.
       </p>
       <p>
       If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the
       Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on
       the same Outpost only. For more information, <a
       href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami">Amazon EBS local
       snapshots on Outposts</a> in the <i>Amazon EBS 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/RegisterImageRequest.java