Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.compute.OrchestratedVirtualMachineScaleSetArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.compute;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetBootDiagnosticsArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetDataDiskArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetExtensionArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetIdentityArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetNetworkInterfaceArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetOsDiskArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetOsProfileArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetPlanArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetPriorityMixArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetSourceImageReferenceArgs;
import com.pulumi.azure.compute.inputs.OrchestratedVirtualMachineScaleSetTerminationNotificationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class OrchestratedVirtualMachineScaleSetArgs extends com.pulumi.resources.ResourceArgs {
public static final OrchestratedVirtualMachineScaleSetArgs Empty = new OrchestratedVirtualMachineScaleSetArgs();
/**
* An `additional_capabilities` block as defined below.
*
*/
@Import(name="additionalCapabilities")
private @Nullable Output additionalCapabilities;
/**
* @return An `additional_capabilities` block as defined below.
*
*/
public Optional> additionalCapabilities() {
return Optional.ofNullable(this.additionalCapabilities);
}
/**
* An `automatic_instance_repair` block as defined below.
*
* > **Note:** To enable the `automatic_instance_repair`, the Orchestrated Virtual Machine Scale Set must have a valid [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension).
*
*/
@Import(name="automaticInstanceRepair")
private @Nullable Output automaticInstanceRepair;
/**
* @return An `automatic_instance_repair` block as defined below.
*
* > **Note:** To enable the `automatic_instance_repair`, the Orchestrated Virtual Machine Scale Set must have a valid [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension).
*
*/
public Optional> automaticInstanceRepair() {
return Optional.ofNullable(this.automaticInstanceRepair);
}
/**
* A `boot_diagnostics` block as defined below.
*
*/
@Import(name="bootDiagnostics")
private @Nullable Output bootDiagnostics;
/**
* @return A `boot_diagnostics` block as defined below.
*
*/
public Optional> bootDiagnostics() {
return Optional.ofNullable(this.bootDiagnostics);
}
/**
* Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created.
*
* > **Note:** `capacity_reservation_group_id` cannot be specified with `proximity_placement_group_id`
*
* > **Note:** If `capacity_reservation_group_id` is specified the `single_placement_group` must be set to `false`.
*
*/
@Import(name="capacityReservationGroupId")
private @Nullable Output capacityReservationGroupId;
/**
* @return Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created.
*
* > **Note:** `capacity_reservation_group_id` cannot be specified with `proximity_placement_group_id`
*
* > **Note:** If `capacity_reservation_group_id` is specified the `single_placement_group` must be set to `false`.
*
*/
public Optional> capacityReservationGroupId() {
return Optional.ofNullable(this.capacityReservationGroupId);
}
/**
* One or more `data_disk` blocks as defined below.
*
*/
@Import(name="dataDisks")
private @Nullable Output> dataDisks;
/**
* @return One or more `data_disk` blocks as defined below.
*
*/
public Optional>> dataDisks() {
return Optional.ofNullable(this.dataDisks);
}
/**
* Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host?
*
*/
@Import(name="encryptionAtHostEnabled")
private @Nullable Output encryptionAtHostEnabled;
/**
* @return Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host?
*
*/
public Optional> encryptionAtHostEnabled() {
return Optional.ofNullable(this.encryptionAtHostEnabled);
}
/**
* The Policy which should be used by Spot Virtual Machines that are Evicted from the Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
*/
@Import(name="evictionPolicy")
private @Nullable Output evictionPolicy;
/**
* @return The Policy which should be used by Spot Virtual Machines that are Evicted from the Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
*/
public Optional> evictionPolicy() {
return Optional.ofNullable(this.evictionPolicy);
}
/**
* Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** `extension_operations_enabled` may only be set to `false` if there are no extensions defined in the `extension` field.
*
*/
@Import(name="extensionOperationsEnabled")
private @Nullable Output extensionOperationsEnabled;
/**
* @return Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** `extension_operations_enabled` may only be set to `false` if there are no extensions defined in the `extension` field.
*
*/
public Optional> extensionOperationsEnabled() {
return Optional.ofNullable(this.extensionOperationsEnabled);
}
/**
* One or more `extension` blocks as defined below
*
*/
@Import(name="extensions")
private @Nullable Output> extensions;
/**
* @return One or more `extension` blocks as defined below
*
*/
public Optional>> extensions() {
return Optional.ofNullable(this.extensions);
}
/**
* Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
*/
@Import(name="extensionsTimeBudget")
private @Nullable Output extensionsTimeBudget;
/**
* @return Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
*/
public Optional> extensionsTimeBudget() {
return Optional.ofNullable(this.extensionsTimeBudget);
}
/**
* An `identity` block as defined below.
*
*/
@Import(name="identity")
private @Nullable Output identity;
/**
* @return An `identity` block as defined below.
*
*/
public Optional> identity() {
return Optional.ofNullable(this.identity);
}
/**
* The number of Virtual Machines in the Virtual Machine Scale Set.
*
*/
@Import(name="instances")
private @Nullable Output instances;
/**
* @return The number of Virtual Machines in the Virtual Machine Scale Set.
*
*/
public Optional> instances() {
return Optional.ofNullable(this.instances);
}
/**
* Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
*/
@Import(name="licenseType")
private @Nullable Output licenseType;
/**
* @return Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
*/
public Optional> licenseType() {
return Optional.ofNullable(this.licenseType);
}
/**
* The Azure location where the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
*/
@Import(name="location")
private @Nullable Output location;
/**
* @return The Azure location where the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
*/
public Optional> location() {
return Optional.ofNullable(this.location);
}
/**
* The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons.
*
*/
@Import(name="maxBidPrice")
private @Nullable Output maxBidPrice;
/**
* @return The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons.
*
*/
public Optional> maxBidPrice() {
return Optional.ofNullable(this.maxBidPrice);
}
/**
* The name of the Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* One or more `network_interface` blocks as defined below.
*
*/
@Import(name="networkInterfaces")
private @Nullable Output> networkInterfaces;
/**
* @return One or more `network_interface` blocks as defined below.
*
*/
public Optional>> networkInterfaces() {
return Optional.ofNullable(this.networkInterfaces);
}
/**
* An `os_disk` block as defined below.
*
*/
@Import(name="osDisk")
private @Nullable Output osDisk;
/**
* @return An `os_disk` block as defined below.
*
*/
public Optional> osDisk() {
return Optional.ofNullable(this.osDisk);
}
/**
* An `os_profile` block as defined below.
*
*/
@Import(name="osProfile")
private @Nullable Output osProfile;
/**
* @return An `os_profile` block as defined below.
*
*/
public Optional> osProfile() {
return Optional.ofNullable(this.osProfile);
}
/**
* A `plan` block as documented below. Changing this forces a new resource to be created.
*
*/
@Import(name="plan")
private @Nullable Output plan;
/**
* @return A `plan` block as documented below. Changing this forces a new resource to be created.
*
*/
public Optional> plan() {
return Optional.ofNullable(this.plan);
}
/**
* Specifies the number of fault domains that are used by this Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
* > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview).
*
*/
@Import(name="platformFaultDomainCount", required=true)
private Output platformFaultDomainCount;
/**
* @return Specifies the number of fault domains that are used by this Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
* > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview).
*
*/
public Output platformFaultDomainCount() {
return this.platformFaultDomainCount;
}
/**
* The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource.
*
*/
@Import(name="priority")
private @Nullable Output priority;
/**
* @return The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource.
*
*/
public Optional> priority() {
return Optional.ofNullable(this.priority);
}
/**
* a `priority_mix` block as defined below
*
*/
@Import(name="priorityMix")
private @Nullable Output priorityMix;
/**
* @return a `priority_mix` block as defined below
*
*/
public Optional> priorityMix() {
return Optional.ofNullable(this.priorityMix);
}
/**
* The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created.
*
*/
@Import(name="proximityPlacementGroupId")
private @Nullable Output proximityPlacementGroupId;
/**
* @return The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created.
*
*/
public Optional> proximityPlacementGroupId() {
return Optional.ofNullable(this.proximityPlacementGroupId);
}
/**
* The name of the Resource Group in which the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
*/
@Import(name="resourceGroupName", required=true)
private Output resourceGroupName;
/**
* @return The name of the Resource Group in which the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values are `true` or `false`.
*
* > **Note:** `single_placement_group` behaves differently for Flexible orchestration Virtual Machine Scale Sets than it does for Uniform orchestration Virtual Machine Scale Sets. It is recommended that you do not define the `single_placement_group` field in your configuration file as the service will determine what this value should be based off of the value contained within the `sku_name` field of your configuration file. You may set the `single_placement_group` field to `true`, however once you set it to `false` you will not be able to revert it back to `true`.
*
*/
@Import(name="singlePlacementGroup")
private @Nullable Output singlePlacementGroup;
/**
* @return Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values are `true` or `false`.
*
* > **Note:** `single_placement_group` behaves differently for Flexible orchestration Virtual Machine Scale Sets than it does for Uniform orchestration Virtual Machine Scale Sets. It is recommended that you do not define the `single_placement_group` field in your configuration file as the service will determine what this value should be based off of the value contained within the `sku_name` field of your configuration file. You may set the `single_placement_group` field to `true`, however once you set it to `false` you will not be able to revert it back to `true`.
*
*/
public Optional> singlePlacementGroup() {
return Optional.ofNullable(this.singlePlacementGroup);
}
/**
* The `name` of the SKU to be used by this Virtual Machine Scale Set. Valid values include: any of the [General purpose](https://docs.microsoft.com/azure/virtual-machines/sizes-general), [Compute optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-compute), [Memory optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-memory), [Storage optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-storage), [GPU optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-gpu), [FPGA optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-field-programmable-gate-arrays), [High performance](https://docs.microsoft.com/azure/virtual-machines/sizes-hpc), or [Previous generation](https://docs.microsoft.com/azure/virtual-machines/sizes-previous-gen) virtual machine SKUs.
*
*/
@Import(name="skuName")
private @Nullable Output skuName;
/**
* @return The `name` of the SKU to be used by this Virtual Machine Scale Set. Valid values include: any of the [General purpose](https://docs.microsoft.com/azure/virtual-machines/sizes-general), [Compute optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-compute), [Memory optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-memory), [Storage optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-storage), [GPU optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-gpu), [FPGA optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-field-programmable-gate-arrays), [High performance](https://docs.microsoft.com/azure/virtual-machines/sizes-hpc), or [Previous generation](https://docs.microsoft.com/azure/virtual-machines/sizes-previous-gen) virtual machine SKUs.
*
*/
public Optional> skuName() {
return Optional.ofNullable(this.skuName);
}
/**
* The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
*/
@Import(name="sourceImageId")
private @Nullable Output sourceImageId;
/**
* @return The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
*/
public Optional> sourceImageId() {
return Optional.ofNullable(this.sourceImageId);
}
/**
* A `source_image_reference` block as defined below.
*
*/
@Import(name="sourceImageReference")
private @Nullable Output sourceImageReference;
/**
* @return A `source_image_reference` block as defined below.
*
*/
public Optional> sourceImageReference() {
return Optional.ofNullable(this.sourceImageReference);
}
/**
* A mapping of tags which should be assigned to this Virtual Machine Scale Set.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return A mapping of tags which should be assigned to this Virtual Machine Scale Set.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* A `termination_notification` block as defined below.
*
*/
@Import(name="terminationNotification")
private @Nullable Output terminationNotification;
/**
* @return A `termination_notification` block as defined below.
*
*/
public Optional> terminationNotification() {
return Optional.ofNullable(this.terminationNotification);
}
/**
* The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set.
*
*/
@Import(name="userDataBase64")
private @Nullable Output userDataBase64;
/**
* @return The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set.
*
*/
public Optional> userDataBase64() {
return Optional.ofNullable(this.userDataBase64);
}
/**
* Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults to `false`. Changing this forces a new resource to be created.
*
* > **Note:** This can only be set to `true` when one or more `zones` are configured.
*
*/
@Import(name="zoneBalance")
private @Nullable Output zoneBalance;
/**
* @return Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults to `false`. Changing this forces a new resource to be created.
*
* > **Note:** This can only be set to `true` when one or more `zones` are configured.
*
*/
public Optional> zoneBalance() {
return Optional.ofNullable(this.zoneBalance);
}
/**
* Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances.
*
* > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
*
*/
@Import(name="zones")
private @Nullable Output> zones;
/**
* @return Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances.
*
* > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
*
*/
public Optional>> zones() {
return Optional.ofNullable(this.zones);
}
private OrchestratedVirtualMachineScaleSetArgs() {}
private OrchestratedVirtualMachineScaleSetArgs(OrchestratedVirtualMachineScaleSetArgs $) {
this.additionalCapabilities = $.additionalCapabilities;
this.automaticInstanceRepair = $.automaticInstanceRepair;
this.bootDiagnostics = $.bootDiagnostics;
this.capacityReservationGroupId = $.capacityReservationGroupId;
this.dataDisks = $.dataDisks;
this.encryptionAtHostEnabled = $.encryptionAtHostEnabled;
this.evictionPolicy = $.evictionPolicy;
this.extensionOperationsEnabled = $.extensionOperationsEnabled;
this.extensions = $.extensions;
this.extensionsTimeBudget = $.extensionsTimeBudget;
this.identity = $.identity;
this.instances = $.instances;
this.licenseType = $.licenseType;
this.location = $.location;
this.maxBidPrice = $.maxBidPrice;
this.name = $.name;
this.networkInterfaces = $.networkInterfaces;
this.osDisk = $.osDisk;
this.osProfile = $.osProfile;
this.plan = $.plan;
this.platformFaultDomainCount = $.platformFaultDomainCount;
this.priority = $.priority;
this.priorityMix = $.priorityMix;
this.proximityPlacementGroupId = $.proximityPlacementGroupId;
this.resourceGroupName = $.resourceGroupName;
this.singlePlacementGroup = $.singlePlacementGroup;
this.skuName = $.skuName;
this.sourceImageId = $.sourceImageId;
this.sourceImageReference = $.sourceImageReference;
this.tags = $.tags;
this.terminationNotification = $.terminationNotification;
this.userDataBase64 = $.userDataBase64;
this.zoneBalance = $.zoneBalance;
this.zones = $.zones;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(OrchestratedVirtualMachineScaleSetArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private OrchestratedVirtualMachineScaleSetArgs $;
public Builder() {
$ = new OrchestratedVirtualMachineScaleSetArgs();
}
public Builder(OrchestratedVirtualMachineScaleSetArgs defaults) {
$ = new OrchestratedVirtualMachineScaleSetArgs(Objects.requireNonNull(defaults));
}
/**
* @param additionalCapabilities An `additional_capabilities` block as defined below.
*
* @return builder
*
*/
public Builder additionalCapabilities(@Nullable Output additionalCapabilities) {
$.additionalCapabilities = additionalCapabilities;
return this;
}
/**
* @param additionalCapabilities An `additional_capabilities` block as defined below.
*
* @return builder
*
*/
public Builder additionalCapabilities(OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesArgs additionalCapabilities) {
return additionalCapabilities(Output.of(additionalCapabilities));
}
/**
* @param automaticInstanceRepair An `automatic_instance_repair` block as defined below.
*
* > **Note:** To enable the `automatic_instance_repair`, the Orchestrated Virtual Machine Scale Set must have a valid [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension).
*
* @return builder
*
*/
public Builder automaticInstanceRepair(@Nullable Output automaticInstanceRepair) {
$.automaticInstanceRepair = automaticInstanceRepair;
return this;
}
/**
* @param automaticInstanceRepair An `automatic_instance_repair` block as defined below.
*
* > **Note:** To enable the `automatic_instance_repair`, the Orchestrated Virtual Machine Scale Set must have a valid [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension).
*
* @return builder
*
*/
public Builder automaticInstanceRepair(OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairArgs automaticInstanceRepair) {
return automaticInstanceRepair(Output.of(automaticInstanceRepair));
}
/**
* @param bootDiagnostics A `boot_diagnostics` block as defined below.
*
* @return builder
*
*/
public Builder bootDiagnostics(@Nullable Output bootDiagnostics) {
$.bootDiagnostics = bootDiagnostics;
return this;
}
/**
* @param bootDiagnostics A `boot_diagnostics` block as defined below.
*
* @return builder
*
*/
public Builder bootDiagnostics(OrchestratedVirtualMachineScaleSetBootDiagnosticsArgs bootDiagnostics) {
return bootDiagnostics(Output.of(bootDiagnostics));
}
/**
* @param capacityReservationGroupId Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created.
*
* > **Note:** `capacity_reservation_group_id` cannot be specified with `proximity_placement_group_id`
*
* > **Note:** If `capacity_reservation_group_id` is specified the `single_placement_group` must be set to `false`.
*
* @return builder
*
*/
public Builder capacityReservationGroupId(@Nullable Output capacityReservationGroupId) {
$.capacityReservationGroupId = capacityReservationGroupId;
return this;
}
/**
* @param capacityReservationGroupId Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created.
*
* > **Note:** `capacity_reservation_group_id` cannot be specified with `proximity_placement_group_id`
*
* > **Note:** If `capacity_reservation_group_id` is specified the `single_placement_group` must be set to `false`.
*
* @return builder
*
*/
public Builder capacityReservationGroupId(String capacityReservationGroupId) {
return capacityReservationGroupId(Output.of(capacityReservationGroupId));
}
/**
* @param dataDisks One or more `data_disk` blocks as defined below.
*
* @return builder
*
*/
public Builder dataDisks(@Nullable Output> dataDisks) {
$.dataDisks = dataDisks;
return this;
}
/**
* @param dataDisks One or more `data_disk` blocks as defined below.
*
* @return builder
*
*/
public Builder dataDisks(List dataDisks) {
return dataDisks(Output.of(dataDisks));
}
/**
* @param dataDisks One or more `data_disk` blocks as defined below.
*
* @return builder
*
*/
public Builder dataDisks(OrchestratedVirtualMachineScaleSetDataDiskArgs... dataDisks) {
return dataDisks(List.of(dataDisks));
}
/**
* @param encryptionAtHostEnabled Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host?
*
* @return builder
*
*/
public Builder encryptionAtHostEnabled(@Nullable Output encryptionAtHostEnabled) {
$.encryptionAtHostEnabled = encryptionAtHostEnabled;
return this;
}
/**
* @param encryptionAtHostEnabled Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host?
*
* @return builder
*
*/
public Builder encryptionAtHostEnabled(Boolean encryptionAtHostEnabled) {
return encryptionAtHostEnabled(Output.of(encryptionAtHostEnabled));
}
/**
* @param evictionPolicy The Policy which should be used by Spot Virtual Machines that are Evicted from the Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder evictionPolicy(@Nullable Output evictionPolicy) {
$.evictionPolicy = evictionPolicy;
return this;
}
/**
* @param evictionPolicy The Policy which should be used by Spot Virtual Machines that are Evicted from the Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder evictionPolicy(String evictionPolicy) {
return evictionPolicy(Output.of(evictionPolicy));
}
/**
* @param extensionOperationsEnabled Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** `extension_operations_enabled` may only be set to `false` if there are no extensions defined in the `extension` field.
*
* @return builder
*
*/
public Builder extensionOperationsEnabled(@Nullable Output extensionOperationsEnabled) {
$.extensionOperationsEnabled = extensionOperationsEnabled;
return this;
}
/**
* @param extensionOperationsEnabled Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** `extension_operations_enabled` may only be set to `false` if there are no extensions defined in the `extension` field.
*
* @return builder
*
*/
public Builder extensionOperationsEnabled(Boolean extensionOperationsEnabled) {
return extensionOperationsEnabled(Output.of(extensionOperationsEnabled));
}
/**
* @param extensions One or more `extension` blocks as defined below
*
* @return builder
*
*/
public Builder extensions(@Nullable Output> extensions) {
$.extensions = extensions;
return this;
}
/**
* @param extensions One or more `extension` blocks as defined below
*
* @return builder
*
*/
public Builder extensions(List extensions) {
return extensions(Output.of(extensions));
}
/**
* @param extensions One or more `extension` blocks as defined below
*
* @return builder
*
*/
public Builder extensions(OrchestratedVirtualMachineScaleSetExtensionArgs... extensions) {
return extensions(List.of(extensions));
}
/**
* @param extensionsTimeBudget Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
* @return builder
*
*/
public Builder extensionsTimeBudget(@Nullable Output extensionsTimeBudget) {
$.extensionsTimeBudget = extensionsTimeBudget;
return this;
}
/**
* @param extensionsTimeBudget Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
* @return builder
*
*/
public Builder extensionsTimeBudget(String extensionsTimeBudget) {
return extensionsTimeBudget(Output.of(extensionsTimeBudget));
}
/**
* @param identity An `identity` block as defined below.
*
* @return builder
*
*/
public Builder identity(@Nullable Output identity) {
$.identity = identity;
return this;
}
/**
* @param identity An `identity` block as defined below.
*
* @return builder
*
*/
public Builder identity(OrchestratedVirtualMachineScaleSetIdentityArgs identity) {
return identity(Output.of(identity));
}
/**
* @param instances The number of Virtual Machines in the Virtual Machine Scale Set.
*
* @return builder
*
*/
public Builder instances(@Nullable Output instances) {
$.instances = instances;
return this;
}
/**
* @param instances The number of Virtual Machines in the Virtual Machine Scale Set.
*
* @return builder
*
*/
public Builder instances(Integer instances) {
return instances(Output.of(instances));
}
/**
* @param licenseType Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
* @return builder
*
*/
public Builder licenseType(@Nullable Output licenseType) {
$.licenseType = licenseType;
return this;
}
/**
* @param licenseType Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
* @return builder
*
*/
public Builder licenseType(String licenseType) {
return licenseType(Output.of(licenseType));
}
/**
* @param location The Azure location where the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder location(@Nullable Output location) {
$.location = location;
return this;
}
/**
* @param location The Azure location where the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder location(String location) {
return location(Output.of(location));
}
/**
* @param maxBidPrice The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons.
*
* @return builder
*
*/
public Builder maxBidPrice(@Nullable Output maxBidPrice) {
$.maxBidPrice = maxBidPrice;
return this;
}
/**
* @param maxBidPrice The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons.
*
* @return builder
*
*/
public Builder maxBidPrice(Double maxBidPrice) {
return maxBidPrice(Output.of(maxBidPrice));
}
/**
* @param name The name of the Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param networkInterfaces One or more `network_interface` blocks as defined below.
*
* @return builder
*
*/
public Builder networkInterfaces(@Nullable Output> networkInterfaces) {
$.networkInterfaces = networkInterfaces;
return this;
}
/**
* @param networkInterfaces One or more `network_interface` blocks as defined below.
*
* @return builder
*
*/
public Builder networkInterfaces(List networkInterfaces) {
return networkInterfaces(Output.of(networkInterfaces));
}
/**
* @param networkInterfaces One or more `network_interface` blocks as defined below.
*
* @return builder
*
*/
public Builder networkInterfaces(OrchestratedVirtualMachineScaleSetNetworkInterfaceArgs... networkInterfaces) {
return networkInterfaces(List.of(networkInterfaces));
}
/**
* @param osDisk An `os_disk` block as defined below.
*
* @return builder
*
*/
public Builder osDisk(@Nullable Output osDisk) {
$.osDisk = osDisk;
return this;
}
/**
* @param osDisk An `os_disk` block as defined below.
*
* @return builder
*
*/
public Builder osDisk(OrchestratedVirtualMachineScaleSetOsDiskArgs osDisk) {
return osDisk(Output.of(osDisk));
}
/**
* @param osProfile An `os_profile` block as defined below.
*
* @return builder
*
*/
public Builder osProfile(@Nullable Output osProfile) {
$.osProfile = osProfile;
return this;
}
/**
* @param osProfile An `os_profile` block as defined below.
*
* @return builder
*
*/
public Builder osProfile(OrchestratedVirtualMachineScaleSetOsProfileArgs osProfile) {
return osProfile(Output.of(osProfile));
}
/**
* @param plan A `plan` block as documented below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder plan(@Nullable Output plan) {
$.plan = plan;
return this;
}
/**
* @param plan A `plan` block as documented below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder plan(OrchestratedVirtualMachineScaleSetPlanArgs plan) {
return plan(Output.of(plan));
}
/**
* @param platformFaultDomainCount Specifies the number of fault domains that are used by this Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
* > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview).
*
* @return builder
*
*/
public Builder platformFaultDomainCount(Output platformFaultDomainCount) {
$.platformFaultDomainCount = platformFaultDomainCount;
return this;
}
/**
* @param platformFaultDomainCount Specifies the number of fault domains that are used by this Virtual Machine Scale Set. Changing this forces a new resource to be created.
*
* > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview).
*
* @return builder
*
*/
public Builder platformFaultDomainCount(Integer platformFaultDomainCount) {
return platformFaultDomainCount(Output.of(platformFaultDomainCount));
}
/**
* @param priority The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource.
*
* @return builder
*
*/
public Builder priority(@Nullable Output priority) {
$.priority = priority;
return this;
}
/**
* @param priority The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource.
*
* @return builder
*
*/
public Builder priority(String priority) {
return priority(Output.of(priority));
}
/**
* @param priorityMix a `priority_mix` block as defined below
*
* @return builder
*
*/
public Builder priorityMix(@Nullable Output priorityMix) {
$.priorityMix = priorityMix;
return this;
}
/**
* @param priorityMix a `priority_mix` block as defined below
*
* @return builder
*
*/
public Builder priorityMix(OrchestratedVirtualMachineScaleSetPriorityMixArgs priorityMix) {
return priorityMix(Output.of(priorityMix));
}
/**
* @param proximityPlacementGroupId The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder proximityPlacementGroupId(@Nullable Output proximityPlacementGroupId) {
$.proximityPlacementGroupId = proximityPlacementGroupId;
return this;
}
/**
* @param proximityPlacementGroupId The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder proximityPlacementGroupId(String proximityPlacementGroupId) {
return proximityPlacementGroupId(Output.of(proximityPlacementGroupId));
}
/**
* @param resourceGroupName The name of the Resource Group in which the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder resourceGroupName(Output resourceGroupName) {
$.resourceGroupName = resourceGroupName;
return this;
}
/**
* @param resourceGroupName The name of the Resource Group in which the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder resourceGroupName(String resourceGroupName) {
return resourceGroupName(Output.of(resourceGroupName));
}
/**
* @param singlePlacementGroup Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values are `true` or `false`.
*
* > **Note:** `single_placement_group` behaves differently for Flexible orchestration Virtual Machine Scale Sets than it does for Uniform orchestration Virtual Machine Scale Sets. It is recommended that you do not define the `single_placement_group` field in your configuration file as the service will determine what this value should be based off of the value contained within the `sku_name` field of your configuration file. You may set the `single_placement_group` field to `true`, however once you set it to `false` you will not be able to revert it back to `true`.
*
* @return builder
*
*/
public Builder singlePlacementGroup(@Nullable Output singlePlacementGroup) {
$.singlePlacementGroup = singlePlacementGroup;
return this;
}
/**
* @param singlePlacementGroup Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values are `true` or `false`.
*
* > **Note:** `single_placement_group` behaves differently for Flexible orchestration Virtual Machine Scale Sets than it does for Uniform orchestration Virtual Machine Scale Sets. It is recommended that you do not define the `single_placement_group` field in your configuration file as the service will determine what this value should be based off of the value contained within the `sku_name` field of your configuration file. You may set the `single_placement_group` field to `true`, however once you set it to `false` you will not be able to revert it back to `true`.
*
* @return builder
*
*/
public Builder singlePlacementGroup(Boolean singlePlacementGroup) {
return singlePlacementGroup(Output.of(singlePlacementGroup));
}
/**
* @param skuName The `name` of the SKU to be used by this Virtual Machine Scale Set. Valid values include: any of the [General purpose](https://docs.microsoft.com/azure/virtual-machines/sizes-general), [Compute optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-compute), [Memory optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-memory), [Storage optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-storage), [GPU optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-gpu), [FPGA optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-field-programmable-gate-arrays), [High performance](https://docs.microsoft.com/azure/virtual-machines/sizes-hpc), or [Previous generation](https://docs.microsoft.com/azure/virtual-machines/sizes-previous-gen) virtual machine SKUs.
*
* @return builder
*
*/
public Builder skuName(@Nullable Output skuName) {
$.skuName = skuName;
return this;
}
/**
* @param skuName The `name` of the SKU to be used by this Virtual Machine Scale Set. Valid values include: any of the [General purpose](https://docs.microsoft.com/azure/virtual-machines/sizes-general), [Compute optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-compute), [Memory optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-memory), [Storage optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-storage), [GPU optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-gpu), [FPGA optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-field-programmable-gate-arrays), [High performance](https://docs.microsoft.com/azure/virtual-machines/sizes-hpc), or [Previous generation](https://docs.microsoft.com/azure/virtual-machines/sizes-previous-gen) virtual machine SKUs.
*
* @return builder
*
*/
public Builder skuName(String skuName) {
return skuName(Output.of(skuName));
}
/**
* @param sourceImageId The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
* @return builder
*
*/
public Builder sourceImageId(@Nullable Output sourceImageId) {
$.sourceImageId = sourceImageId;
return this;
}
/**
* @param sourceImageId The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
* @return builder
*
*/
public Builder sourceImageId(String sourceImageId) {
return sourceImageId(Output.of(sourceImageId));
}
/**
* @param sourceImageReference A `source_image_reference` block as defined below.
*
* @return builder
*
*/
public Builder sourceImageReference(@Nullable Output sourceImageReference) {
$.sourceImageReference = sourceImageReference;
return this;
}
/**
* @param sourceImageReference A `source_image_reference` block as defined below.
*
* @return builder
*
*/
public Builder sourceImageReference(OrchestratedVirtualMachineScaleSetSourceImageReferenceArgs sourceImageReference) {
return sourceImageReference(Output.of(sourceImageReference));
}
/**
* @param tags A mapping of tags which should be assigned to this Virtual Machine Scale Set.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags A mapping of tags which should be assigned to this Virtual Machine Scale Set.
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param terminationNotification A `termination_notification` block as defined below.
*
* @return builder
*
*/
public Builder terminationNotification(@Nullable Output terminationNotification) {
$.terminationNotification = terminationNotification;
return this;
}
/**
* @param terminationNotification A `termination_notification` block as defined below.
*
* @return builder
*
*/
public Builder terminationNotification(OrchestratedVirtualMachineScaleSetTerminationNotificationArgs terminationNotification) {
return terminationNotification(Output.of(terminationNotification));
}
/**
* @param userDataBase64 The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set.
*
* @return builder
*
*/
public Builder userDataBase64(@Nullable Output userDataBase64) {
$.userDataBase64 = userDataBase64;
return this;
}
/**
* @param userDataBase64 The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set.
*
* @return builder
*
*/
public Builder userDataBase64(String userDataBase64) {
return userDataBase64(Output.of(userDataBase64));
}
/**
* @param zoneBalance Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults to `false`. Changing this forces a new resource to be created.
*
* > **Note:** This can only be set to `true` when one or more `zones` are configured.
*
* @return builder
*
*/
public Builder zoneBalance(@Nullable Output zoneBalance) {
$.zoneBalance = zoneBalance;
return this;
}
/**
* @param zoneBalance Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults to `false`. Changing this forces a new resource to be created.
*
* > **Note:** This can only be set to `true` when one or more `zones` are configured.
*
* @return builder
*
*/
public Builder zoneBalance(Boolean zoneBalance) {
return zoneBalance(Output.of(zoneBalance));
}
/**
* @param zones Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances.
*
* > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
*
* @return builder
*
*/
public Builder zones(@Nullable Output> zones) {
$.zones = zones;
return this;
}
/**
* @param zones Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances.
*
* > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
*
* @return builder
*
*/
public Builder zones(List zones) {
return zones(Output.of(zones));
}
/**
* @param zones Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances.
*
* > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created.
*
* > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
*
* @return builder
*
*/
public Builder zones(String... zones) {
return zones(List.of(zones));
}
public OrchestratedVirtualMachineScaleSetArgs build() {
if ($.platformFaultDomainCount == null) {
throw new MissingRequiredPropertyException("OrchestratedVirtualMachineScaleSetArgs", "platformFaultDomainCount");
}
if ($.resourceGroupName == null) {
throw new MissingRequiredPropertyException("OrchestratedVirtualMachineScaleSetArgs", "resourceGroupName");
}
return $;
}
}
}