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

com.pulumi.azurenative.compute.inputs.ImageDataDiskArgs 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.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 a data disk.
 * 
 */
public final class ImageDataDiskArgs extends com.pulumi.resources.ResourceArgs {

    public static final ImageDataDiskArgs Empty = new ImageDataDiskArgs();

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

    /**
     * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
     * 
     */
    @Import(name="lun", required=true)
    private Output lun;

    /**
     * @return Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
     * 
     */
    public Output lun() {
        return this.lun;
    }

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

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

    /**
     * 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 ImageDataDiskArgs() {}

    private ImageDataDiskArgs(ImageDataDiskArgs $) {
        this.blobUri = $.blobUri;
        this.caching = $.caching;
        this.diskEncryptionSet = $.diskEncryptionSet;
        this.diskSizeGB = $.diskSizeGB;
        this.lun = $.lun;
        this.managedDisk = $.managedDisk;
        this.snapshot = $.snapshot;
        this.storageAccountType = $.storageAccountType;
    }

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

    public static final class Builder {
        private ImageDataDiskArgs $;

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

        public Builder(ImageDataDiskArgs defaults) {
            $ = new ImageDataDiskArgs(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 lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
         * 
         * @return builder
         * 
         */
        public Builder lun(Output lun) {
            $.lun = lun;
            return this;
        }

        /**
         * @param lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
         * 
         * @return builder
         * 
         */
        public Builder lun(Integer lun) {
            return lun(Output.of(lun));
        }

        /**
         * @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 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 ImageDataDiskArgs build() {
            if ($.lun == null) {
                throw new MissingRequiredPropertyException("ImageDataDiskArgs", "lun");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy