public CreateTrailRequest withKmsKeyId(String kmsKeyId) {
        setKmsKeyId(kmsKeyId);
        return this;
    }
<p>
Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name
prefixed by <code>alias/</code>, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally
unique identifier.
</p>
<p>
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see <a
href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using multi-Region
keys</a> in the <i>Key Management Service Developer Guide</i>.
</p>
<p>
Examples:
</p>
<ul>
<li>
<p>
<code>alias/MyAliasName</code>
</p>
</li>
<li>
<p>
<code>arn:aws:kms:us-east-2:123456789012:alias/MyAliasName</code>
</p>
</li>
<li>
<p>
<code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code>
</p>
</li>
<li>
<p>
<code>12345678-1234-1234-1234-123456789012</code>
</p>
</li>
</ul>

@param kmsKeyId
       Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias
       name prefixed by <code>alias/</code>, a fully specified ARN to an alias, a fully specified ARN to a key,
       or a globally unique identifier.</p>
       <p>
       CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see <a
       href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using
       multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.
       </p>
       <p>
       Examples:
       </p>
       <ul>
       <li>
       <p>
       <code>alias/MyAliasName</code>
       </p>
       </li>
       <li>
       <p>
       <code>arn:aws:kms:us-east-2:123456789012:alias/MyAliasName</code>
       </p>
       </li>
       <li>
       <p>
       <code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code>
       </p>
       </li>
       <li>
       <p>
       <code>12345678-1234-1234-1234-123456789012</code>
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cloudtrail/src/main/java/com/amazonaws/services/cloudtrail/model/CreateTrailRequest.java