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

com.pulumi.azure.compute.inputs.WindowsVirtualMachineOsDiskArgs 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.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** 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.inputs;

import com.pulumi.azure.compute.inputs.WindowsVirtualMachineOsDiskDiffDiskSettingsArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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;


public final class WindowsVirtualMachineOsDiskArgs extends com.pulumi.resources.ResourceArgs {

    public static final WindowsVirtualMachineOsDiskArgs Empty = new WindowsVirtualMachineOsDiskArgs();

    /**
     * The Type of Caching which should be used for the Internal OS Disk. Possible values are `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    @Import(name="caching", required=true)
    private Output caching;

    /**
     * @return The Type of Caching which should be used for the Internal OS Disk. Possible values are `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    public Output caching() {
        return this.caching;
    }

    /**
     * A `diff_disk_settings` block as defined above. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** `diff_disk_settings` can only be set when `caching` is set to `ReadOnly`. More information can be found [here](https://docs.microsoft.com/azure/virtual-machines/ephemeral-os-disks-deploy#vm-template-deployment)
     * 
     */
    @Import(name="diffDiskSettings")
    private @Nullable Output diffDiskSettings;

    /**
     * @return A `diff_disk_settings` block as defined above. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** `diff_disk_settings` can only be set when `caching` is set to `ReadOnly`. More information can be found [here](https://docs.microsoft.com/azure/virtual-machines/ephemeral-os-disks-deploy#vm-template-deployment)
     * 
     */
    public Optional> diffDiskSettings() {
        return Optional.ofNullable(this.diffDiskSettings);
    }

    /**
     * The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk. Conflicts with `secure_vm_disk_encryption_set_id`.
     * 
     * > **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
     * 
     */
    @Import(name="diskEncryptionSetId")
    private @Nullable Output diskEncryptionSetId;

    /**
     * @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`.
     * 
     * > **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
     * 
     */
    public Optional> diskEncryptionSetId() {
        return Optional.ofNullable(this.diskEncryptionSetId);
    }

    /**
     * The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine is sourced from.
     * 
     * > **NOTE:** If specified this must be equal to or larger than the size of the Image the Virtual Machine 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.
     * 
     */
    @Import(name="diskSizeGb")
    private @Nullable Output diskSizeGb;

    /**
     * @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 is sourced from.
     * 
     * > **NOTE:** If specified this must be equal to or larger than the size of the Image the Virtual Machine 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);
    }

    /**
     * The name which should be used for the Internal OS Disk. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name which should be used for the Internal OS Disk. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. 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`.
     * 
     */
    @Import(name="secureVmDiskEncryptionSetId")
    private @Nullable Output secureVmDiskEncryptionSetId;

    /**
     * @return The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. 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);
    }

    /**
     * Encryption Type when the Virtual Machine is a Confidential VM. 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`.
     * 
     */
    @Import(name="securityEncryptionType")
    private @Nullable Output securityEncryptionType;

    /**
     * @return Encryption Type when the Virtual Machine is a Confidential VM. 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);
    }

    /**
     * The Type of Storage Account which should back this the Internal OS Disk. Possible values are `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="storageAccountType", required=true)
    private Output storageAccountType;

    /**
     * @return The Type of Storage Account which should back this the Internal OS Disk. Possible values are `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created.
     * 
     */
    public Output storageAccountType() {
        return this.storageAccountType;
    }

    /**
     * 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`.
     * 
     */
    @Import(name="writeAcceleratorEnabled")
    private @Nullable Output writeAcceleratorEnabled;

    /**
     * @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);
    }

    private WindowsVirtualMachineOsDiskArgs() {}

    private WindowsVirtualMachineOsDiskArgs(WindowsVirtualMachineOsDiskArgs $) {
        this.caching = $.caching;
        this.diffDiskSettings = $.diffDiskSettings;
        this.diskEncryptionSetId = $.diskEncryptionSetId;
        this.diskSizeGb = $.diskSizeGb;
        this.name = $.name;
        this.secureVmDiskEncryptionSetId = $.secureVmDiskEncryptionSetId;
        this.securityEncryptionType = $.securityEncryptionType;
        this.storageAccountType = $.storageAccountType;
        this.writeAcceleratorEnabled = $.writeAcceleratorEnabled;
    }

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

    public static final class Builder {
        private WindowsVirtualMachineOsDiskArgs $;

        public Builder() {
            $ = new WindowsVirtualMachineOsDiskArgs();
        }

        public Builder(WindowsVirtualMachineOsDiskArgs defaults) {
            $ = new WindowsVirtualMachineOsDiskArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param caching The Type of Caching which should be used for the Internal OS Disk. Possible values are `None`, `ReadOnly` and `ReadWrite`.
         * 
         * @return builder
         * 
         */
        public Builder caching(Output caching) {
            $.caching = caching;
            return this;
        }

        /**
         * @param caching The Type of Caching which should be used for the Internal OS Disk. Possible values are `None`, `ReadOnly` and `ReadWrite`.
         * 
         * @return builder
         * 
         */
        public Builder caching(String caching) {
            return caching(Output.of(caching));
        }

        /**
         * @param diffDiskSettings A `diff_disk_settings` block as defined above. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** `diff_disk_settings` can only be set when `caching` is set to `ReadOnly`. More information can be found [here](https://docs.microsoft.com/azure/virtual-machines/ephemeral-os-disks-deploy#vm-template-deployment)
         * 
         * @return builder
         * 
         */
        public Builder diffDiskSettings(@Nullable Output diffDiskSettings) {
            $.diffDiskSettings = diffDiskSettings;
            return this;
        }

        /**
         * @param diffDiskSettings A `diff_disk_settings` block as defined above. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** `diff_disk_settings` can only be set when `caching` is set to `ReadOnly`. More information can be found [here](https://docs.microsoft.com/azure/virtual-machines/ephemeral-os-disks-deploy#vm-template-deployment)
         * 
         * @return builder
         * 
         */
        public Builder diffDiskSettings(WindowsVirtualMachineOsDiskDiffDiskSettingsArgs diffDiskSettings) {
            return diffDiskSettings(Output.of(diffDiskSettings));
        }

        /**
         * @param diskEncryptionSetId The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk. Conflicts with `secure_vm_disk_encryption_set_id`.
         * 
         * > **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
         * 
         * @return builder
         * 
         */
        public Builder diskEncryptionSetId(@Nullable Output diskEncryptionSetId) {
            $.diskEncryptionSetId = diskEncryptionSetId;
            return this;
        }

        /**
         * @param diskEncryptionSetId The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk. Conflicts with `secure_vm_disk_encryption_set_id`.
         * 
         * > **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
         * 
         * @return builder
         * 
         */
        public Builder diskEncryptionSetId(String diskEncryptionSetId) {
            return diskEncryptionSetId(Output.of(diskEncryptionSetId));
        }

        /**
         * @param diskSizeGb The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine is sourced from.
         * 
         * > **NOTE:** If specified this must be equal to or larger than the size of the Image the Virtual Machine 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.
         * 
         * @return builder
         * 
         */
        public Builder diskSizeGb(@Nullable Output diskSizeGb) {
            $.diskSizeGb = diskSizeGb;
            return this;
        }

        /**
         * @param diskSizeGb The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine is sourced from.
         * 
         * > **NOTE:** If specified this must be equal to or larger than the size of the Image the Virtual Machine 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.
         * 
         * @return builder
         * 
         */
        public Builder diskSizeGb(Integer diskSizeGb) {
            return diskSizeGb(Output.of(diskSizeGb));
        }

        /**
         * @param name The name which should be used for the Internal OS Disk. 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 which should be used for the Internal OS Disk. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param secureVmDiskEncryptionSetId The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. 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`.
         * 
         * @return builder
         * 
         */
        public Builder secureVmDiskEncryptionSetId(@Nullable Output secureVmDiskEncryptionSetId) {
            $.secureVmDiskEncryptionSetId = secureVmDiskEncryptionSetId;
            return this;
        }

        /**
         * @param secureVmDiskEncryptionSetId The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. 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`.
         * 
         * @return builder
         * 
         */
        public Builder secureVmDiskEncryptionSetId(String secureVmDiskEncryptionSetId) {
            return secureVmDiskEncryptionSetId(Output.of(secureVmDiskEncryptionSetId));
        }

        /**
         * @param securityEncryptionType Encryption Type when the Virtual Machine is a Confidential VM. 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`.
         * 
         * @return builder
         * 
         */
        public Builder securityEncryptionType(@Nullable Output securityEncryptionType) {
            $.securityEncryptionType = securityEncryptionType;
            return this;
        }

        /**
         * @param securityEncryptionType Encryption Type when the Virtual Machine is a Confidential VM. 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`.
         * 
         * @return builder
         * 
         */
        public Builder securityEncryptionType(String securityEncryptionType) {
            return securityEncryptionType(Output.of(securityEncryptionType));
        }

        /**
         * @param storageAccountType The Type of Storage Account which should back this the Internal OS Disk. Possible values are `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(Output storageAccountType) {
            $.storageAccountType = storageAccountType;
            return this;
        }

        /**
         * @param storageAccountType The Type of Storage Account which should back this the Internal OS Disk. Possible values are `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(String storageAccountType) {
            return storageAccountType(Output.of(storageAccountType));
        }

        /**
         * @param writeAcceleratorEnabled 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`.
         * 
         * @return builder
         * 
         */
        public Builder writeAcceleratorEnabled(@Nullable Output writeAcceleratorEnabled) {
            $.writeAcceleratorEnabled = writeAcceleratorEnabled;
            return this;
        }

        /**
         * @param writeAcceleratorEnabled 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`.
         * 
         * @return builder
         * 
         */
        public Builder writeAcceleratorEnabled(Boolean writeAcceleratorEnabled) {
            return writeAcceleratorEnabled(Output.of(writeAcceleratorEnabled));
        }

        public WindowsVirtualMachineOsDiskArgs build() {
            if ($.caching == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineOsDiskArgs", "caching");
            }
            if ($.storageAccountType == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineOsDiskArgs", "storageAccountType");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy