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

com.pulumi.azurenative.batch.inputs.DataDiskArgs 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.batch.inputs;

import com.pulumi.azurenative.batch.enums.CachingType;
import com.pulumi.azurenative.batch.enums.StorageAccountType;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Settings which will be used by the data disks associated to Compute Nodes in the Pool. When using attached data disks, you need to mount and format the disks from within a VM to use them.
 * 
 */
public final class DataDiskArgs extends com.pulumi.resources.ResourceArgs {

    public static final DataDiskArgs Empty = new DataDiskArgs();

    /**
     * Values are:
     * 
     *  none - The caching mode for the disk is not enabled.
     *  readOnly - The caching mode for the disk is read only.
     *  readWrite - The caching mode for the disk is read and write.
     * 
     *  The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
     * 
     */
    @Import(name="caching")
    private @Nullable Output caching;

    /**
     * @return Values are:
     * 
     *  none - The caching mode for the disk is not enabled.
     *  readOnly - The caching mode for the disk is read only.
     *  readWrite - The caching mode for the disk is read and write.
     * 
     *  The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
     * 
     */
    public Optional> caching() {
        return Optional.ofNullable(this.caching);
    }

    @Import(name="diskSizeGB", required=true)
    private Output diskSizeGB;

    public Output diskSizeGB() {
        return this.diskSizeGB;
    }

    /**
     * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. The value must be between 0 and 63, inclusive.
     * 
     */
    @Import(name="lun", required=true)
    private Output lun;

    /**
     * @return The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. The value must be between 0 and 63, inclusive.
     * 
     */
    public Output lun() {
        return this.lun;
    }

    /**
     * If omitted, the default is "Standard_LRS". Values are:
     * 
     *  Standard_LRS - The data disk should use standard locally redundant storage.
     *  Premium_LRS - The data disk should use premium locally redundant storage.
     * 
     */
    @Import(name="storageAccountType")
    private @Nullable Output storageAccountType;

    /**
     * @return If omitted, the default is "Standard_LRS". Values are:
     * 
     *  Standard_LRS - The data disk should use standard locally redundant storage.
     *  Premium_LRS - The data disk should use premium locally redundant storage.
     * 
     */
    public Optional> storageAccountType() {
        return Optional.ofNullable(this.storageAccountType);
    }

    private DataDiskArgs() {}

    private DataDiskArgs(DataDiskArgs $) {
        this.caching = $.caching;
        this.diskSizeGB = $.diskSizeGB;
        this.lun = $.lun;
        this.storageAccountType = $.storageAccountType;
    }

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

    public static final class Builder {
        private DataDiskArgs $;

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

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

        /**
         * @param caching Values are:
         * 
         *  none - The caching mode for the disk is not enabled.
         *  readOnly - The caching mode for the disk is read only.
         *  readWrite - The caching mode for the disk is read and write.
         * 
         *  The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
         * 
         * @return builder
         * 
         */
        public Builder caching(@Nullable Output caching) {
            $.caching = caching;
            return this;
        }

        /**
         * @param caching Values are:
         * 
         *  none - The caching mode for the disk is not enabled.
         *  readOnly - The caching mode for the disk is read only.
         *  readWrite - The caching mode for the disk is read and write.
         * 
         *  The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
         * 
         * @return builder
         * 
         */
        public Builder caching(CachingType caching) {
            return caching(Output.of(caching));
        }

        public Builder diskSizeGB(Output diskSizeGB) {
            $.diskSizeGB = diskSizeGB;
            return this;
        }

        public Builder diskSizeGB(Integer diskSizeGB) {
            return diskSizeGB(Output.of(diskSizeGB));
        }

        /**
         * @param lun The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. The value must be between 0 and 63, inclusive.
         * 
         * @return builder
         * 
         */
        public Builder lun(Output lun) {
            $.lun = lun;
            return this;
        }

        /**
         * @param lun The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. The value must be between 0 and 63, inclusive.
         * 
         * @return builder
         * 
         */
        public Builder lun(Integer lun) {
            return lun(Output.of(lun));
        }

        /**
         * @param storageAccountType If omitted, the default is "Standard_LRS". Values are:
         * 
         *  Standard_LRS - The data disk should use standard locally redundant storage.
         *  Premium_LRS - The data disk should use premium locally redundant storage.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(@Nullable Output storageAccountType) {
            $.storageAccountType = storageAccountType;
            return this;
        }

        /**
         * @param storageAccountType If omitted, the default is "Standard_LRS". Values are:
         * 
         *  Standard_LRS - The data disk should use standard locally redundant storage.
         *  Premium_LRS - The data disk should use premium locally redundant storage.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountType(StorageAccountType storageAccountType) {
            return storageAccountType(Output.of(storageAccountType));
        }

        public DataDiskArgs build() {
            if ($.diskSizeGB == null) {
                throw new MissingRequiredPropertyException("DataDiskArgs", "diskSizeGB");
            }
            if ($.lun == null) {
                throw new MissingRequiredPropertyException("DataDiskArgs", "lun");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy