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

com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.compute.inputs;

import com.pulumi.azurenative.compute.enums.CachingTypes;
import com.pulumi.azurenative.compute.enums.OperatingSystemStateTypes;
import com.pulumi.azurenative.compute.enums.OperatingSystemTypes;
import com.pulumi.azurenative.compute.enums.StorageAccountTypes;
import com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Describes an Operating System disk.
 * 
 */
public final class ImageOSDiskArgs extends com.pulumi.resources.ResourceArgs {

    public static final ImageOSDiskArgs Empty = new ImageOSDiskArgs();

    /**
     * The Virtual Hard Disk.
     * 
     */
    @Import(name="blobUri")
    private @Nullable Output blobUri;

    /**
     * @return The Virtual Hard Disk.
     * 
     */
    public Optional> blobUri() {
        return Optional.ofNullable(this.blobUri);
    }

    /**
     * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**
     * 
     */
    @Import(name="caching")
    private @Nullable Output caching;

    /**
     * @return Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**
     * 
     */
    public Optional> caching() {
        return Optional.ofNullable(this.caching);
    }

    /**
     * Specifies the customer managed disk encryption set resource id for the managed image disk.
     * 
     */
    @Import(name="diskEncryptionSet")
    private @Nullable Output diskEncryptionSet;

    /**
     * @return Specifies the customer managed disk encryption set resource id for the managed image disk.
     * 
     */
    public Optional> diskEncryptionSet() {
        return Optional.ofNullable(this.diskEncryptionSet);
    }

    /**
     * Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
     * 
     */
    @Import(name="diskSizeGB")
    private @Nullable Output diskSizeGB;

    /**
     * @return Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
     * 
     */
    public Optional> diskSizeGB() {
        return Optional.ofNullable(this.diskSizeGB);
    }

    /**
     * The managedDisk.
     * 
     */
    @Import(name="managedDisk")
    private @Nullable Output managedDisk;

    /**
     * @return The managedDisk.
     * 
     */
    public Optional> managedDisk() {
        return Optional.ofNullable(this.managedDisk);
    }

    /**
     * The OS State. For managed images, use Generalized.
     * 
     */
    @Import(name="osState", required=true)
    private Output osState;

    /**
     * @return The OS State. For managed images, use Generalized.
     * 
     */
    public Output osState() {
        return this.osState;
    }

    /**
     * This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**
     * 
     */
    @Import(name="osType", required=true)
    private Output osType;

    /**
     * @return This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**
     * 
     */
    public Output osType() {
        return this.osType;
    }

    /**
     * The snapshot.
     * 
     */
    @Import(name="snapshot")
    private @Nullable Output snapshot;

    /**
     * @return The snapshot.
     * 
     */
    public Optional> snapshot() {
        return Optional.ofNullable(this.snapshot);
    }

    /**
     * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
     * 
     */
    @Import(name="storageAccountType")
    private @Nullable Output> storageAccountType;

    /**
     * @return Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
     * 
     */
    public Optional>> storageAccountType() {
        return Optional.ofNullable(this.storageAccountType);
    }

    private ImageOSDiskArgs() {}

    private ImageOSDiskArgs(ImageOSDiskArgs $) {
        this.blobUri = $.blobUri;
        this.caching = $.caching;
        this.diskEncryptionSet = $.diskEncryptionSet;
        this.diskSizeGB = $.diskSizeGB;
        this.managedDisk = $.managedDisk;
        this.osState = $.osState;
        this.osType = $.osType;
        this.snapshot = $.snapshot;
        this.storageAccountType = $.storageAccountType;
    }

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

    public static final class Builder {
        private ImageOSDiskArgs $;

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

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

        /**
         * @param blobUri The Virtual Hard Disk.
         * 
         * @return builder
         * 
         */
        public Builder blobUri(@Nullable Output blobUri) {
            $.blobUri = blobUri;
            return this;
        }

        /**
         * @param blobUri The Virtual Hard Disk.
         * 
         * @return builder
         * 
         */
        public Builder blobUri(String blobUri) {
            return blobUri(Output.of(blobUri));
        }

        /**
         * @param caching Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**
         * 
         * @return builder
         * 
         */
        public Builder caching(@Nullable Output caching) {
            $.caching = caching;
            return this;
        }

        /**
         * @param caching Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**
         * 
         * @return builder
         * 
         */
        public Builder caching(CachingTypes caching) {
            return caching(Output.of(caching));
        }

        /**
         * @param diskEncryptionSet Specifies the customer managed disk encryption set resource id for the managed image disk.
         * 
         * @return builder
         * 
         */
        public Builder diskEncryptionSet(@Nullable Output diskEncryptionSet) {
            $.diskEncryptionSet = diskEncryptionSet;
            return this;
        }

        /**
         * @param diskEncryptionSet Specifies the customer managed disk encryption set resource id for the managed image disk.
         * 
         * @return builder
         * 
         */
        public Builder diskEncryptionSet(DiskEncryptionSetParametersArgs diskEncryptionSet) {
            return diskEncryptionSet(Output.of(diskEncryptionSet));
        }

        /**
         * @param diskSizeGB Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
         * 
         * @return builder
         * 
         */
        public Builder diskSizeGB(@Nullable Output diskSizeGB) {
            $.diskSizeGB = diskSizeGB;
            return this;
        }

        /**
         * @param diskSizeGB Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
         * 
         * @return builder
         * 
         */
        public Builder diskSizeGB(Integer diskSizeGB) {
            return diskSizeGB(Output.of(diskSizeGB));
        }

        /**
         * @param managedDisk The managedDisk.
         * 
         * @return builder
         * 
         */
        public Builder managedDisk(@Nullable Output managedDisk) {
            $.managedDisk = managedDisk;
            return this;
        }

        /**
         * @param managedDisk The managedDisk.
         * 
         * @return builder
         * 
         */
        public Builder managedDisk(SubResourceArgs managedDisk) {
            return managedDisk(Output.of(managedDisk));
        }

        /**
         * @param osState The OS State. For managed images, use Generalized.
         * 
         * @return builder
         * 
         */
        public Builder osState(Output osState) {
            $.osState = osState;
            return this;
        }

        /**
         * @param osState The OS State. For managed images, use Generalized.
         * 
         * @return builder
         * 
         */
        public Builder osState(OperatingSystemStateTypes osState) {
            return osState(Output.of(osState));
        }

        /**
         * @param osType This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**
         * 
         * @return builder
         * 
         */
        public Builder osType(Output osType) {
            $.osType = osType;
            return this;
        }

        /**
         * @param osType This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**
         * 
         * @return builder
         * 
         */
        public Builder osType(OperatingSystemTypes osType) {
            return osType(Output.of(osType));
        }

        /**
         * @param snapshot The snapshot.
         * 
         * @return builder
         * 
         */
        public Builder snapshot(@Nullable Output snapshot) {
            $.snapshot = snapshot;
            return this;
        }

        /**
         * @param snapshot The snapshot.
         * 
         * @return builder
         * 
         */
        public Builder snapshot(SubResourceArgs snapshot) {
            return snapshot(Output.of(snapshot));
        }

        /**
         * @param storageAccountType Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(@Nullable Output> storageAccountType) {
            $.storageAccountType = storageAccountType;
            return this;
        }

        /**
         * @param storageAccountType Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(Either storageAccountType) {
            return storageAccountType(Output.of(storageAccountType));
        }

        /**
         * @param storageAccountType Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(String storageAccountType) {
            return storageAccountType(Either.ofLeft(storageAccountType));
        }

        /**
         * @param storageAccountType Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(StorageAccountTypes storageAccountType) {
            return storageAccountType(Either.ofRight(storageAccountType));
        }

        public ImageOSDiskArgs build() {
            if ($.osState == null) {
                throw new MissingRequiredPropertyException("ImageOSDiskArgs", "osState");
            }
            if ($.osType == null) {
                throw new MissingRequiredPropertyException("ImageOSDiskArgs", "osType");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy