/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.elasticmapreduce.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OnDemandCapacityReservationOptions implements Serializable, Cloneable, StructuredPojo { /** *

* Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. *

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to * fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity * Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused * Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is * launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. *

*/ private String usageStrategy; /** *

* Indicates the instance's Capacity Reservation preferences. Possible preferences include: *

* */ private String capacityReservationPreference; /** *

* The ARN of the Capacity Reservation resource group in which to run the instance. *

*/ private String capacityReservationResourceGroupArn; /** *

* Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. *

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to * fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity * Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused * Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is * launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. *

* * @param usageStrategy * Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations * to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused * Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the * number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand * target capacity is launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. * @see OnDemandCapacityReservationUsageStrategy */ public void setUsageStrategy(String usageStrategy) { this.usageStrategy = usageStrategy; } /** *

* Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. *

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to * fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity * Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused * Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is * launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. *

* * @return Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations * to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused * Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the * number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining * On-Demand target capacity is launched according to the On-Demand allocation strategy ( * lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen * On-Demand allocation strategy. * @see OnDemandCapacityReservationUsageStrategy */ public String getUsageStrategy() { return this.usageStrategy; } /** *

* Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. *

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to * fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity * Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused * Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is * launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. *

* * @param usageStrategy * Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations * to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused * Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the * number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand * target capacity is launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. * @return Returns a reference to this object so that method calls can be chained together. * @see OnDemandCapacityReservationUsageStrategy */ public OnDemandCapacityReservationOptions withUsageStrategy(String usageStrategy) { setUsageStrategy(usageStrategy); return this; } /** *

* Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. *

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to * fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity * Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused * Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is * launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. *

* * @param usageStrategy * Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

*

* If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations * to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused * Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the * number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand * target capacity is launched according to the On-Demand allocation strategy (lowest-price). *

*

* If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand * allocation strategy. * @return Returns a reference to this object so that method calls can be chained together. * @see OnDemandCapacityReservationUsageStrategy */ public OnDemandCapacityReservationOptions withUsageStrategy(OnDemandCapacityReservationUsageStrategy usageStrategy) { this.usageStrategy = usageStrategy.toString(); return this; } /** *

* Indicates the instance's Capacity Reservation preferences. Possible preferences include: *

* * * @param capacityReservationPreference * Indicates the instance's Capacity Reservation preferences. Possible preferences include:

*