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

com.pulumi.azure.compute.inputs.VirtualMachineStorageOsDiskArgs 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.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 VirtualMachineStorageOsDiskArgs extends com.pulumi.resources.ResourceArgs {

    public static final VirtualMachineStorageOsDiskArgs Empty = new VirtualMachineStorageOsDiskArgs();

    /**
     * Specifies the caching requirements for the OS Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    @Import(name="caching")
    private @Nullable Output caching;

    /**
     * @return Specifies the caching requirements for the OS Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
     * 
     */
    public Optional> caching() {
        return Optional.ofNullable(this.caching);
    }

    /**
     * Specifies how the OS Disk should be created. Possible values are `Attach` (managed disks only) and `FromImage`.
     * 
     */
    @Import(name="createOption", required=true)
    private Output createOption;

    /**
     * @return Specifies how the OS Disk should be created. Possible values are `Attach` (managed disks only) and `FromImage`.
     * 
     */
    public Output createOption() {
        return this.createOption;
    }

    /**
     * Specifies the size of the OS Disk in gigabytes.
     * 
     */
    @Import(name="diskSizeGb")
    private @Nullable Output diskSizeGb;

    /**
     * @return Specifies the size of the OS Disk in gigabytes.
     * 
     */
    public Optional> diskSizeGb() {
        return Optional.ofNullable(this.diskSizeGb);
    }

    /**
     * Specifies the Image URI in the format `publisherName:offer:skus:version`. This field can also specify the [VHD URI](https://docs.microsoft.com/azure/virtual-machines/linux/tutorial-custom-images) of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the `os_type` field must be set.
     * 
     */
    @Import(name="imageUri")
    private @Nullable Output imageUri;

    /**
     * @return Specifies the Image URI in the format `publisherName:offer:skus:version`. This field can also specify the [VHD URI](https://docs.microsoft.com/azure/virtual-machines/linux/tutorial-custom-images) of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the `os_type` field must be set.
     * 
     */
    public Optional> imageUri() {
        return Optional.ofNullable(this.imageUri);
    }

    /**
     * Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the `create_option` must be set to `Attach`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="managedDiskId")
    private @Nullable Output managedDiskId;

    /**
     * @return Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the `create_option` must be set to `Attach`. Changing this forces a new resource to be created.
     * 
     */
    public Optional> managedDiskId() {
        return Optional.ofNullable(this.managedDiskId);
    }

    /**
     * Specifies the type of Managed Disk which should be created. Possible values are `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`.
     * 
     * The following properties apply when using Unmanaged Disks:
     * 
     */
    @Import(name="managedDiskType")
    private @Nullable Output managedDiskType;

    /**
     * @return Specifies the type of Managed Disk which should be created. Possible values are `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`.
     * 
     * The following properties apply when using Unmanaged Disks:
     * 
     */
    public Optional> managedDiskType() {
        return Optional.ofNullable(this.managedDiskType);
    }

    /**
     * Specifies the name of the OS Disk.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Specifies the name of the OS Disk.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * Specifies the Operating System on the OS Disk. Possible values are `Linux` and `Windows`.
     * 
     */
    @Import(name="osType")
    private @Nullable Output osType;

    /**
     * @return Specifies the Operating System on the OS Disk. Possible values are `Linux` and `Windows`.
     * 
     */
    public Optional> osType() {
        return Optional.ofNullable(this.osType);
    }

    /**
     * Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="vhdUri")
    private @Nullable Output vhdUri;

    /**
     * @return Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.
     * 
     */
    public Optional> vhdUri() {
        return Optional.ofNullable(this.vhdUri);
    }

    /**
     * Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
     * 
     * The following properties apply when using Managed Disks:
     * 
     */
    @Import(name="writeAcceleratorEnabled")
    private @Nullable Output writeAcceleratorEnabled;

    /**
     * @return Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
     * 
     * The following properties apply when using Managed Disks:
     * 
     */
    public Optional> writeAcceleratorEnabled() {
        return Optional.ofNullable(this.writeAcceleratorEnabled);
    }

    private VirtualMachineStorageOsDiskArgs() {}

    private VirtualMachineStorageOsDiskArgs(VirtualMachineStorageOsDiskArgs $) {
        this.caching = $.caching;
        this.createOption = $.createOption;
        this.diskSizeGb = $.diskSizeGb;
        this.imageUri = $.imageUri;
        this.managedDiskId = $.managedDiskId;
        this.managedDiskType = $.managedDiskType;
        this.name = $.name;
        this.osType = $.osType;
        this.vhdUri = $.vhdUri;
        this.writeAcceleratorEnabled = $.writeAcceleratorEnabled;
    }

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

    public static final class Builder {
        private VirtualMachineStorageOsDiskArgs $;

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

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

        /**
         * @param caching Specifies the caching requirements for the OS Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
         * 
         * @return builder
         * 
         */
        public Builder caching(@Nullable Output caching) {
            $.caching = caching;
            return this;
        }

        /**
         * @param caching Specifies the caching requirements for the OS Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
         * 
         * @return builder
         * 
         */
        public Builder caching(String caching) {
            return caching(Output.of(caching));
        }

        /**
         * @param createOption Specifies how the OS Disk should be created. Possible values are `Attach` (managed disks only) and `FromImage`.
         * 
         * @return builder
         * 
         */
        public Builder createOption(Output createOption) {
            $.createOption = createOption;
            return this;
        }

        /**
         * @param createOption Specifies how the OS Disk should be created. Possible values are `Attach` (managed disks only) and `FromImage`.
         * 
         * @return builder
         * 
         */
        public Builder createOption(String createOption) {
            return createOption(Output.of(createOption));
        }

        /**
         * @param diskSizeGb Specifies the size of the OS Disk in gigabytes.
         * 
         * @return builder
         * 
         */
        public Builder diskSizeGb(@Nullable Output diskSizeGb) {
            $.diskSizeGb = diskSizeGb;
            return this;
        }

        /**
         * @param diskSizeGb Specifies the size of the OS Disk in gigabytes.
         * 
         * @return builder
         * 
         */
        public Builder diskSizeGb(Integer diskSizeGb) {
            return diskSizeGb(Output.of(diskSizeGb));
        }

        /**
         * @param imageUri Specifies the Image URI in the format `publisherName:offer:skus:version`. This field can also specify the [VHD URI](https://docs.microsoft.com/azure/virtual-machines/linux/tutorial-custom-images) of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the `os_type` field must be set.
         * 
         * @return builder
         * 
         */
        public Builder imageUri(@Nullable Output imageUri) {
            $.imageUri = imageUri;
            return this;
        }

        /**
         * @param imageUri Specifies the Image URI in the format `publisherName:offer:skus:version`. This field can also specify the [VHD URI](https://docs.microsoft.com/azure/virtual-machines/linux/tutorial-custom-images) of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the `os_type` field must be set.
         * 
         * @return builder
         * 
         */
        public Builder imageUri(String imageUri) {
            return imageUri(Output.of(imageUri));
        }

        /**
         * @param managedDiskId Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the `create_option` must be set to `Attach`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedDiskId(@Nullable Output managedDiskId) {
            $.managedDiskId = managedDiskId;
            return this;
        }

        /**
         * @param managedDiskId Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the `create_option` must be set to `Attach`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedDiskId(String managedDiskId) {
            return managedDiskId(Output.of(managedDiskId));
        }

        /**
         * @param managedDiskType Specifies the type of Managed Disk which should be created. Possible values are `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`.
         * 
         * The following properties apply when using Unmanaged Disks:
         * 
         * @return builder
         * 
         */
        public Builder managedDiskType(@Nullable Output managedDiskType) {
            $.managedDiskType = managedDiskType;
            return this;
        }

        /**
         * @param managedDiskType Specifies the type of Managed Disk which should be created. Possible values are `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`.
         * 
         * The following properties apply when using Unmanaged Disks:
         * 
         * @return builder
         * 
         */
        public Builder managedDiskType(String managedDiskType) {
            return managedDiskType(Output.of(managedDiskType));
        }

        /**
         * @param name Specifies the name of the OS Disk.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the OS Disk.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param osType Specifies the Operating System on the OS Disk. Possible values are `Linux` and `Windows`.
         * 
         * @return builder
         * 
         */
        public Builder osType(@Nullable Output osType) {
            $.osType = osType;
            return this;
        }

        /**
         * @param osType Specifies the Operating System on the OS Disk. Possible values are `Linux` and `Windows`.
         * 
         * @return builder
         * 
         */
        public Builder osType(String osType) {
            return osType(Output.of(osType));
        }

        /**
         * @param vhdUri Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder vhdUri(@Nullable Output vhdUri) {
            $.vhdUri = vhdUri;
            return this;
        }

        /**
         * @param vhdUri Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder vhdUri(String vhdUri) {
            return vhdUri(Output.of(vhdUri));
        }

        /**
         * @param writeAcceleratorEnabled Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
         * 
         * The following properties apply when using Managed Disks:
         * 
         * @return builder
         * 
         */
        public Builder writeAcceleratorEnabled(@Nullable Output writeAcceleratorEnabled) {
            $.writeAcceleratorEnabled = writeAcceleratorEnabled;
            return this;
        }

        /**
         * @param writeAcceleratorEnabled Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
         * 
         * The following properties apply when using Managed Disks:
         * 
         * @return builder
         * 
         */
        public Builder writeAcceleratorEnabled(Boolean writeAcceleratorEnabled) {
            return writeAcceleratorEnabled(Output.of(writeAcceleratorEnabled));
        }

        public VirtualMachineStorageOsDiskArgs build() {
            if ($.createOption == null) {
                throw new MissingRequiredPropertyException("VirtualMachineStorageOsDiskArgs", "createOption");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("VirtualMachineStorageOsDiskArgs", "name");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy