public void setEncrypted(Boolean encrypted) {
        this.encrypted = encrypted;
    }
<p>
Specifies whether the volume should be encrypted. Encrypted EBS volumes can only be attached to instances that
support Amazon EBS encryption. For more information, see <a
href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html">Requirements for Amazon
EBS encryption</a> in the <i>Amazon EBS User Guide</i>. If your AMI uses encrypted volumes, you can also only
launch it on supported instance types.
</p>
<note>
<p>
If you are creating a volume from a snapshot, you cannot create an unencrypted volume from an encrypted snapshot.
Also, you cannot specify a KMS key ID when using a launch configuration.
</p>
<p>
If you enable encryption by default, the EBS volumes that you create are always encrypted, either using the
Amazon Web Services managed KMS key or a customer-managed KMS key, regardless of whether the snapshot was
encrypted.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-data-protection.html#encryption">Use
Amazon Web Services KMS keys to encrypt Amazon EBS volumes</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
</p>
</note>

@param encrypted
       Specifies whether the volume should be encrypted. Encrypted EBS volumes can only be attached to instances
       that support Amazon EBS encryption. For more information, see <a
       href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html">Requirements for
       Amazon EBS encryption</a> in the <i>Amazon EBS User Guide</i>. If your AMI uses encrypted volumes, you can
       also only launch it on supported instance types.</p> <note>
       <p>
       If you are creating a volume from a snapshot, you cannot create an unencrypted volume from an encrypted
       snapshot. Also, you cannot specify a KMS key ID when using a launch configuration.
       </p>
       <p>
       If you enable encryption by default, the EBS volumes that you create are always encrypted, either using
       the Amazon Web Services managed KMS key or a customer-managed KMS key, regardless of whether the snapshot
       was encrypted.
       </p>
       <p>
       For more information, see <a href=
       "https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-data-protection.html#encryption"
       >Use Amazon Web Services KMS keys to encrypt Amazon EBS volumes</a> in the <i>Amazon EC2 Auto Scaling User
       Guide</i>.
       </p>
aws-java-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/model/Ebs.java