All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.compute.outputs.WindowsVirtualMachineScaleSetOsDisk 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.azure.compute.outputs;

import com.pulumi.azure.compute.outputs.WindowsVirtualMachineScaleSetOsDiskDiffDiskSettings;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class WindowsVirtualMachineScaleSetOsDisk {
    /**
     * @return The Type of Caching which should be used for the Internal OS Disk. Possible values are `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    private String caching;
    /**
     * @return A `diff_disk_settings` block as defined above. Changing this forces a new resource to be created.
     * 
     */
    private @Nullable WindowsVirtualMachineScaleSetOsDiskDiffDiskSettings diffDiskSettings;
    /**
     * @return The ID of the Disk Encryption Set which should be used to encrypt this OS Disk. Conflicts with `secure_vm_disk_encryption_set_id`. Changing this forces a new resource to be created.
     * 
     * > **Note:** The Disk Encryption Set must have the `Reader` Role Assignment scoped on the Key Vault - in addition to an Access Policy to the Key Vault
     * 
     * > **Note:** Disk Encryption Sets are in Public Preview in a limited set of regions
     * 
     */
    private @Nullable String diskEncryptionSetId;
    /**
     * @return The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine Scale Set is sourced from.
     * 
     * > **Note:** If specified this must be equal to or larger than the size of the Image the VM Scale Set is based on. When creating a larger disk than exists in the image you'll need to repartition the disk to use the remaining space.
     * 
     */
    private @Nullable Integer diskSizeGb;
    /**
     * @return The ID of the Disk Encryption Set which should be used to Encrypt the OS Disk when the Virtual Machine Scale Set is Confidential VMSS. Conflicts with `disk_encryption_set_id`. Changing this forces a new resource to be created.
     * 
     * > **Note:** `secure_vm_disk_encryption_set_id` can only be specified when `security_encryption_type` is set to `DiskWithVMGuestState`.
     * 
     */
    private @Nullable String secureVmDiskEncryptionSetId;
    /**
     * @return Encryption Type when the Virtual Machine Scale Set is Confidential VMSS. Possible values are `VMGuestStateOnly` and `DiskWithVMGuestState`. Changing this forces a new resource to be created.
     * 
     * > **Note:** `vtpm_enabled` must be set to `true` when `security_encryption_type` is specified.
     * 
     * > **Note:** `encryption_at_host_enabled` cannot be set to `true` when `security_encryption_type` is set to `DiskWithVMGuestState`.
     * 
     */
    private @Nullable String securityEncryptionType;
    /**
     * @return The Type of Storage Account which should back this the Internal OS Disk. Possible values include `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS`, `Premium_LRS` and `Premium_ZRS`. Changing this forces a new resource to be created.
     * 
     */
    private String storageAccountType;
    /**
     * @return Should Write Accelerator be Enabled for this OS Disk? Defaults to `false`.
     * 
     * > **Note:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`.
     * 
     */
    private @Nullable Boolean writeAcceleratorEnabled;

    private WindowsVirtualMachineScaleSetOsDisk() {}
    /**
     * @return The Type of Caching which should be used for the Internal OS Disk. Possible values are `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    public String caching() {
        return this.caching;
    }
    /**
     * @return A `diff_disk_settings` block as defined above. Changing this forces a new resource to be created.
     * 
     */
    public Optional diffDiskSettings() {
        return Optional.ofNullable(this.diffDiskSettings);
    }
    /**
     * @return The ID of the Disk Encryption Set which should be used to encrypt this OS Disk. Conflicts with `secure_vm_disk_encryption_set_id`. Changing this forces a new resource to be created.
     * 
     * > **Note:** The Disk Encryption Set must have the `Reader` Role Assignment scoped on the Key Vault - in addition to an Access Policy to the Key Vault
     * 
     * > **Note:** Disk Encryption Sets are in Public Preview in a limited set of regions
     * 
     */
    public Optional diskEncryptionSetId() {
        return Optional.ofNullable(this.diskEncryptionSetId);
    }
    /**
     * @return The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine Scale Set is sourced from.
     * 
     * > **Note:** If specified this must be equal to or larger than the size of the Image the VM Scale Set is based on. When creating a larger disk than exists in the image you'll need to repartition the disk to use the remaining space.
     * 
     */
    public Optional diskSizeGb() {
        return Optional.ofNullable(this.diskSizeGb);
    }
    /**
     * @return The ID of the Disk Encryption Set which should be used to Encrypt the OS Disk when the Virtual Machine Scale Set is Confidential VMSS. Conflicts with `disk_encryption_set_id`. Changing this forces a new resource to be created.
     * 
     * > **Note:** `secure_vm_disk_encryption_set_id` can only be specified when `security_encryption_type` is set to `DiskWithVMGuestState`.
     * 
     */
    public Optional secureVmDiskEncryptionSetId() {
        return Optional.ofNullable(this.secureVmDiskEncryptionSetId);
    }
    /**
     * @return Encryption Type when the Virtual Machine Scale Set is Confidential VMSS. Possible values are `VMGuestStateOnly` and `DiskWithVMGuestState`. Changing this forces a new resource to be created.
     * 
     * > **Note:** `vtpm_enabled` must be set to `true` when `security_encryption_type` is specified.
     * 
     * > **Note:** `encryption_at_host_enabled` cannot be set to `true` when `security_encryption_type` is set to `DiskWithVMGuestState`.
     * 
     */
    public Optional securityEncryptionType() {
        return Optional.ofNullable(this.securityEncryptionType);
    }
    /**
     * @return The Type of Storage Account which should back this the Internal OS Disk. Possible values include `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS`, `Premium_LRS` and `Premium_ZRS`. Changing this forces a new resource to be created.
     * 
     */
    public String storageAccountType() {
        return this.storageAccountType;
    }
    /**
     * @return Should Write Accelerator be Enabled for this OS Disk? Defaults to `false`.
     * 
     * > **Note:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`.
     * 
     */
    public Optional writeAcceleratorEnabled() {
        return Optional.ofNullable(this.writeAcceleratorEnabled);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(WindowsVirtualMachineScaleSetOsDisk defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String caching;
        private @Nullable WindowsVirtualMachineScaleSetOsDiskDiffDiskSettings diffDiskSettings;
        private @Nullable String diskEncryptionSetId;
        private @Nullable Integer diskSizeGb;
        private @Nullable String secureVmDiskEncryptionSetId;
        private @Nullable String securityEncryptionType;
        private String storageAccountType;
        private @Nullable Boolean writeAcceleratorEnabled;
        public Builder() {}
        public Builder(WindowsVirtualMachineScaleSetOsDisk defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.caching = defaults.caching;
    	      this.diffDiskSettings = defaults.diffDiskSettings;
    	      this.diskEncryptionSetId = defaults.diskEncryptionSetId;
    	      this.diskSizeGb = defaults.diskSizeGb;
    	      this.secureVmDiskEncryptionSetId = defaults.secureVmDiskEncryptionSetId;
    	      this.securityEncryptionType = defaults.securityEncryptionType;
    	      this.storageAccountType = defaults.storageAccountType;
    	      this.writeAcceleratorEnabled = defaults.writeAcceleratorEnabled;
        }

        @CustomType.Setter
        public Builder caching(String caching) {
            if (caching == null) {
              throw new MissingRequiredPropertyException("WindowsVirtualMachineScaleSetOsDisk", "caching");
            }
            this.caching = caching;
            return this;
        }
        @CustomType.Setter
        public Builder diffDiskSettings(@Nullable WindowsVirtualMachineScaleSetOsDiskDiffDiskSettings diffDiskSettings) {

            this.diffDiskSettings = diffDiskSettings;
            return this;
        }
        @CustomType.Setter
        public Builder diskEncryptionSetId(@Nullable String diskEncryptionSetId) {

            this.diskEncryptionSetId = diskEncryptionSetId;
            return this;
        }
        @CustomType.Setter
        public Builder diskSizeGb(@Nullable Integer diskSizeGb) {

            this.diskSizeGb = diskSizeGb;
            return this;
        }
        @CustomType.Setter
        public Builder secureVmDiskEncryptionSetId(@Nullable String secureVmDiskEncryptionSetId) {

            this.secureVmDiskEncryptionSetId = secureVmDiskEncryptionSetId;
            return this;
        }
        @CustomType.Setter
        public Builder securityEncryptionType(@Nullable String securityEncryptionType) {

            this.securityEncryptionType = securityEncryptionType;
            return this;
        }
        @CustomType.Setter
        public Builder storageAccountType(String storageAccountType) {
            if (storageAccountType == null) {
              throw new MissingRequiredPropertyException("WindowsVirtualMachineScaleSetOsDisk", "storageAccountType");
            }
            this.storageAccountType = storageAccountType;
            return this;
        }
        @CustomType.Setter
        public Builder writeAcceleratorEnabled(@Nullable Boolean writeAcceleratorEnabled) {

            this.writeAcceleratorEnabled = writeAcceleratorEnabled;
            return this;
        }
        public WindowsVirtualMachineScaleSetOsDisk build() {
            final var _resultValue = new WindowsVirtualMachineScaleSetOsDisk();
            _resultValue.caching = caching;
            _resultValue.diffDiskSettings = diffDiskSettings;
            _resultValue.diskEncryptionSetId = diskEncryptionSetId;
            _resultValue.diskSizeGb = diskSizeGb;
            _resultValue.secureVmDiskEncryptionSetId = secureVmDiskEncryptionSetId;
            _resultValue.securityEncryptionType = securityEncryptionType;
            _resultValue.storageAccountType = storageAccountType;
            _resultValue.writeAcceleratorEnabled = writeAcceleratorEnabled;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy