
com.pulumi.azurenative.azurefleet.outputs.SpotPriorityProfileResponse Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.azurefleet.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class SpotPriorityProfileResponse {
/**
* @return Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
*
*/
private @Nullable String allocationStrategy;
/**
* @return Total capacity to achieve. It is currently in terms of number of VMs.
*
*/
private @Nullable Integer capacity;
/**
* @return Eviction Policy to follow when evicting Spot VMs.
*
*/
private @Nullable String evictionPolicy;
/**
* @return Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.
* If maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)
* or update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.
* Maintain is enabled by default.
*
*/
private @Nullable Boolean maintain;
/**
* @return Price per hour of each Spot VM will never exceed this.
*
*/
private @Nullable Double maxPricePerVM;
/**
* @return Minimum capacity to achieve which cannot be updated. If we will not be able to "guarantee" minimum capacity, we will reject the request in the sync path itself.
*
*/
private @Nullable Integer minCapacity;
private SpotPriorityProfileResponse() {}
/**
* @return Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
*
*/
public Optional allocationStrategy() {
return Optional.ofNullable(this.allocationStrategy);
}
/**
* @return Total capacity to achieve. It is currently in terms of number of VMs.
*
*/
public Optional capacity() {
return Optional.ofNullable(this.capacity);
}
/**
* @return Eviction Policy to follow when evicting Spot VMs.
*
*/
public Optional evictionPolicy() {
return Optional.ofNullable(this.evictionPolicy);
}
/**
* @return Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.
* If maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)
* or update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.
* Maintain is enabled by default.
*
*/
public Optional maintain() {
return Optional.ofNullable(this.maintain);
}
/**
* @return Price per hour of each Spot VM will never exceed this.
*
*/
public Optional maxPricePerVM() {
return Optional.ofNullable(this.maxPricePerVM);
}
/**
* @return Minimum capacity to achieve which cannot be updated. If we will not be able to "guarantee" minimum capacity, we will reject the request in the sync path itself.
*
*/
public Optional minCapacity() {
return Optional.ofNullable(this.minCapacity);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(SpotPriorityProfileResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String allocationStrategy;
private @Nullable Integer capacity;
private @Nullable String evictionPolicy;
private @Nullable Boolean maintain;
private @Nullable Double maxPricePerVM;
private @Nullable Integer minCapacity;
public Builder() {}
public Builder(SpotPriorityProfileResponse defaults) {
Objects.requireNonNull(defaults);
this.allocationStrategy = defaults.allocationStrategy;
this.capacity = defaults.capacity;
this.evictionPolicy = defaults.evictionPolicy;
this.maintain = defaults.maintain;
this.maxPricePerVM = defaults.maxPricePerVM;
this.minCapacity = defaults.minCapacity;
}
@CustomType.Setter
public Builder allocationStrategy(@Nullable String allocationStrategy) {
this.allocationStrategy = allocationStrategy;
return this;
}
@CustomType.Setter
public Builder capacity(@Nullable Integer capacity) {
this.capacity = capacity;
return this;
}
@CustomType.Setter
public Builder evictionPolicy(@Nullable String evictionPolicy) {
this.evictionPolicy = evictionPolicy;
return this;
}
@CustomType.Setter
public Builder maintain(@Nullable Boolean maintain) {
this.maintain = maintain;
return this;
}
@CustomType.Setter
public Builder maxPricePerVM(@Nullable Double maxPricePerVM) {
this.maxPricePerVM = maxPricePerVM;
return this;
}
@CustomType.Setter
public Builder minCapacity(@Nullable Integer minCapacity) {
this.minCapacity = minCapacity;
return this;
}
public SpotPriorityProfileResponse build() {
final var _resultValue = new SpotPriorityProfileResponse();
_resultValue.allocationStrategy = allocationStrategy;
_resultValue.capacity = capacity;
_resultValue.evictionPolicy = evictionPolicy;
_resultValue.maintain = maintain;
_resultValue.maxPricePerVM = maxPricePerVM;
_resultValue.minCapacity = minCapacity;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy