public void setSpotPrice(String spotPrice) {
        this.spotPrice = spotPrice;
    }
<p>
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this
parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the
current Spot price.
</p>
<important>
<p>
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify
this parameter.
</p>
</important>

@param spotPrice
       The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using
       this parameter because it can lead to increased interruptions. If you do not specify this parameter, you
       will pay the current Spot price.</p> <important>
       <p>
       If you specify a maximum price, your instances will be interrupted more frequently than if you do not
       specify this parameter.
       </p>
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/SpotPrice.java