public void setKeyName(String keyName) {
        this.keyName = keyName;
    }
<p>
The name of the key pair. You can create a key pair using <a
href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or <a
href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.
</p>
<important>
<p>
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured
to allow users another way to log in.
</p>
</important>

@param keyName
       The name of the key pair. You can create a key pair using <a
       href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a> or
       <a
       href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.<
       /p> <important>
       <p>
       If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is
       configured to allow users another way to log in.
       </p>
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/RunInstancesRequest.java