
com.pulumi.azurenative.compute.outputs.ScaleInPolicyResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.compute.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ScaleInPolicyResponse {
/**
* @return This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview)
*
*/
private @Nullable Boolean forceDeletion;
/**
* @return The rules to be followed when scaling-in a virtual machine scale set. <br><br> Possible values are: <br><br> **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in. <br><br> **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal. <br><br> **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal. <br><br>
*
*/
private @Nullable List rules;
private ScaleInPolicyResponse() {}
/**
* @return This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview)
*
*/
public Optional forceDeletion() {
return Optional.ofNullable(this.forceDeletion);
}
/**
* @return The rules to be followed when scaling-in a virtual machine scale set. <br><br> Possible values are: <br><br> **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in. <br><br> **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal. <br><br> **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal. <br><br>
*
*/
public List rules() {
return this.rules == null ? List.of() : this.rules;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ScaleInPolicyResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Boolean forceDeletion;
private @Nullable List rules;
public Builder() {}
public Builder(ScaleInPolicyResponse defaults) {
Objects.requireNonNull(defaults);
this.forceDeletion = defaults.forceDeletion;
this.rules = defaults.rules;
}
@CustomType.Setter
public Builder forceDeletion(@Nullable Boolean forceDeletion) {
this.forceDeletion = forceDeletion;
return this;
}
@CustomType.Setter
public Builder rules(@Nullable List rules) {
this.rules = rules;
return this;
}
public Builder rules(String... rules) {
return rules(List.of(rules));
}
public ScaleInPolicyResponse build() {
final var _resultValue = new ScaleInPolicyResponse();
_resultValue.forceDeletion = forceDeletion;
_resultValue.rules = rules;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy