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

com.pulumi.vsphere.NasDatastoreArgs Maven / Gradle / Ivy

There is a newer version: 4.13.0-alpha.1731738919
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.vsphere;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final NasDatastoreArgs Empty = new NasDatastoreArgs();

    /**
     * Access mode for the mount point. Can be one of
     * `readOnly` or `readWrite`. Note that `readWrite` does not necessarily mean
     * that the datastore will be read-write depending on the permissions of the
     * actual share. Default: `readWrite`. Forces a new resource if changed.
     * 
     */
    @Import(name="accessMode")
    private @Nullable Output accessMode;

    /**
     * @return Access mode for the mount point. Can be one of
     * `readOnly` or `readWrite`. Note that `readWrite` does not necessarily mean
     * that the datastore will be read-write depending on the permissions of the
     * actual share. Default: `readWrite`. Forces a new resource if changed.
     * 
     */
    public Optional> accessMode() {
        return Optional.ofNullable(this.accessMode);
    }

    /**
     * Map of custom attribute ids to attribute
     * value strings to set on datasource resource.
     * 
     * > **NOTE:** Custom attributes are unsupported on direct ESXi connections
     * and require vCenter.
     * 
     */
    @Import(name="customAttributes")
    private @Nullable Output> customAttributes;

    /**
     * @return Map of custom attribute ids to attribute
     * value strings to set on datasource resource.
     * 
     * > **NOTE:** Custom attributes are unsupported on direct ESXi connections
     * and require vCenter.
     * 
     */
    public Optional>> customAttributes() {
        return Optional.ofNullable(this.customAttributes);
    }

    /**
     * The managed object
     * ID of a datastore cluster to put this datastore in.
     * Conflicts with `folder`.
     * 
     */
    @Import(name="datastoreClusterId")
    private @Nullable Output datastoreClusterId;

    /**
     * @return The managed object
     * ID of a datastore cluster to put this datastore in.
     * Conflicts with `folder`.
     * 
     */
    public Optional> datastoreClusterId() {
        return Optional.ofNullable(this.datastoreClusterId);
    }

    /**
     * The relative path to a folder to put this datastore in.
     * This is a path relative to the datacenter you are deploying the datastore to.
     * Example: for the `dc1` datacenter, and a provided `folder` of `foo/bar`,
     * The provider will place a datastore named `test` in a datastore folder
     * located at `/dc1/datastore/foo/bar`, with the final inventory path being
     * `/dc1/datastore/foo/bar/test`. Conflicts with
     * `datastore_cluster_id`.
     * 
     */
    @Import(name="folder")
    private @Nullable Output folder;

    /**
     * @return The relative path to a folder to put this datastore in.
     * This is a path relative to the datacenter you are deploying the datastore to.
     * Example: for the `dc1` datacenter, and a provided `folder` of `foo/bar`,
     * The provider will place a datastore named `test` in a datastore folder
     * located at `/dc1/datastore/foo/bar`, with the final inventory path being
     * `/dc1/datastore/foo/bar/test`. Conflicts with
     * `datastore_cluster_id`.
     * 
     */
    public Optional> folder() {
        return Optional.ofNullable(this.folder);
    }

    /**
     * The managed object IDs of
     * the hosts to mount the datastore on.
     * 
     */
    @Import(name="hostSystemIds", required=true)
    private Output> hostSystemIds;

    /**
     * @return The managed object IDs of
     * the hosts to mount the datastore on.
     * 
     */
    public Output> hostSystemIds() {
        return this.hostSystemIds;
    }

    /**
     * The name of the datastore. Forces a new resource if
     * changed.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the datastore. Forces a new resource if
     * changed.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The hostnames or IP addresses of the remote
     * servers. Only one element should be present for NFS v3 but multiple
     * can be present for NFS v4.1. Forces a new resource if changed.
     * 
     */
    @Import(name="remoteHosts", required=true)
    private Output> remoteHosts;

    /**
     * @return The hostnames or IP addresses of the remote
     * servers. Only one element should be present for NFS v3 but multiple
     * can be present for NFS v4.1. Forces a new resource if changed.
     * 
     */
    public Output> remoteHosts() {
        return this.remoteHosts;
    }

    /**
     * The remote path of the mount point. Forces a new
     * resource if changed.
     * 
     */
    @Import(name="remotePath", required=true)
    private Output remotePath;

    /**
     * @return The remote path of the mount point. Forces a new
     * resource if changed.
     * 
     */
    public Output remotePath() {
        return this.remotePath;
    }

    /**
     * The security type to use when using NFS v4.1.
     * Can be one of `AUTH_SYS`, `SEC_KRB5`, or `SEC_KRB5I`. Forces a new resource
     * if changed.
     * 
     */
    @Import(name="securityType")
    private @Nullable Output securityType;

    /**
     * @return The security type to use when using NFS v4.1.
     * Can be one of `AUTH_SYS`, `SEC_KRB5`, or `SEC_KRB5I`. Forces a new resource
     * if changed.
     * 
     */
    public Optional> securityType() {
        return Optional.ofNullable(this.securityType);
    }

    /**
     * The IDs of any tags to attach to this resource.
     * 
     * > **NOTE:** Tagging support is unsupported on direct ESXi connections and
     * requires vCenter 6.0 or higher.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return The IDs of any tags to attach to this resource.
     * 
     * > **NOTE:** Tagging support is unsupported on direct ESXi connections and
     * requires vCenter 6.0 or higher.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The type of NAS volume. Can be one of `NFS` (to denote
     * v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if
     * changed.
     * 
     */
    @Import(name="type")
    private @Nullable Output type;

    /**
     * @return The type of NAS volume. Can be one of `NFS` (to denote
     * v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if
     * changed.
     * 
     */
    public Optional> type() {
        return Optional.ofNullable(this.type);
    }

    private NasDatastoreArgs() {}

    private NasDatastoreArgs(NasDatastoreArgs $) {
        this.accessMode = $.accessMode;
        this.customAttributes = $.customAttributes;
        this.datastoreClusterId = $.datastoreClusterId;
        this.folder = $.folder;
        this.hostSystemIds = $.hostSystemIds;
        this.name = $.name;
        this.remoteHosts = $.remoteHosts;
        this.remotePath = $.remotePath;
        this.securityType = $.securityType;
        this.tags = $.tags;
        this.type = $.type;
    }

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

    public static final class Builder {
        private NasDatastoreArgs $;

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

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

        /**
         * @param accessMode Access mode for the mount point. Can be one of
         * `readOnly` or `readWrite`. Note that `readWrite` does not necessarily mean
         * that the datastore will be read-write depending on the permissions of the
         * actual share. Default: `readWrite`. Forces a new resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder accessMode(@Nullable Output accessMode) {
            $.accessMode = accessMode;
            return this;
        }

        /**
         * @param accessMode Access mode for the mount point. Can be one of
         * `readOnly` or `readWrite`. Note that `readWrite` does not necessarily mean
         * that the datastore will be read-write depending on the permissions of the
         * actual share. Default: `readWrite`. Forces a new resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder accessMode(String accessMode) {
            return accessMode(Output.of(accessMode));
        }

        /**
         * @param customAttributes Map of custom attribute ids to attribute
         * value strings to set on datasource resource.
         * 
         * > **NOTE:** Custom attributes are unsupported on direct ESXi connections
         * and require vCenter.
         * 
         * @return builder
         * 
         */
        public Builder customAttributes(@Nullable Output> customAttributes) {
            $.customAttributes = customAttributes;
            return this;
        }

        /**
         * @param customAttributes Map of custom attribute ids to attribute
         * value strings to set on datasource resource.
         * 
         * > **NOTE:** Custom attributes are unsupported on direct ESXi connections
         * and require vCenter.
         * 
         * @return builder
         * 
         */
        public Builder customAttributes(Map customAttributes) {
            return customAttributes(Output.of(customAttributes));
        }

        /**
         * @param datastoreClusterId The managed object
         * ID of a datastore cluster to put this datastore in.
         * Conflicts with `folder`.
         * 
         * @return builder
         * 
         */
        public Builder datastoreClusterId(@Nullable Output datastoreClusterId) {
            $.datastoreClusterId = datastoreClusterId;
            return this;
        }

        /**
         * @param datastoreClusterId The managed object
         * ID of a datastore cluster to put this datastore in.
         * Conflicts with `folder`.
         * 
         * @return builder
         * 
         */
        public Builder datastoreClusterId(String datastoreClusterId) {
            return datastoreClusterId(Output.of(datastoreClusterId));
        }

        /**
         * @param folder The relative path to a folder to put this datastore in.
         * This is a path relative to the datacenter you are deploying the datastore to.
         * Example: for the `dc1` datacenter, and a provided `folder` of `foo/bar`,
         * The provider will place a datastore named `test` in a datastore folder
         * located at `/dc1/datastore/foo/bar`, with the final inventory path being
         * `/dc1/datastore/foo/bar/test`. Conflicts with
         * `datastore_cluster_id`.
         * 
         * @return builder
         * 
         */
        public Builder folder(@Nullable Output folder) {
            $.folder = folder;
            return this;
        }

        /**
         * @param folder The relative path to a folder to put this datastore in.
         * This is a path relative to the datacenter you are deploying the datastore to.
         * Example: for the `dc1` datacenter, and a provided `folder` of `foo/bar`,
         * The provider will place a datastore named `test` in a datastore folder
         * located at `/dc1/datastore/foo/bar`, with the final inventory path being
         * `/dc1/datastore/foo/bar/test`. Conflicts with
         * `datastore_cluster_id`.
         * 
         * @return builder
         * 
         */
        public Builder folder(String folder) {
            return folder(Output.of(folder));
        }

        /**
         * @param hostSystemIds The managed object IDs of
         * the hosts to mount the datastore on.
         * 
         * @return builder
         * 
         */
        public Builder hostSystemIds(Output> hostSystemIds) {
            $.hostSystemIds = hostSystemIds;
            return this;
        }

        /**
         * @param hostSystemIds The managed object IDs of
         * the hosts to mount the datastore on.
         * 
         * @return builder
         * 
         */
        public Builder hostSystemIds(List hostSystemIds) {
            return hostSystemIds(Output.of(hostSystemIds));
        }

        /**
         * @param hostSystemIds The managed object IDs of
         * the hosts to mount the datastore on.
         * 
         * @return builder
         * 
         */
        public Builder hostSystemIds(String... hostSystemIds) {
            return hostSystemIds(List.of(hostSystemIds));
        }

        /**
         * @param name The name of the datastore. Forces a new resource if
         * changed.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the datastore. Forces a new resource if
         * changed.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param remoteHosts The hostnames or IP addresses of the remote
         * servers. Only one element should be present for NFS v3 but multiple
         * can be present for NFS v4.1. Forces a new resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder remoteHosts(Output> remoteHosts) {
            $.remoteHosts = remoteHosts;
            return this;
        }

        /**
         * @param remoteHosts The hostnames or IP addresses of the remote
         * servers. Only one element should be present for NFS v3 but multiple
         * can be present for NFS v4.1. Forces a new resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder remoteHosts(List remoteHosts) {
            return remoteHosts(Output.of(remoteHosts));
        }

        /**
         * @param remoteHosts The hostnames or IP addresses of the remote
         * servers. Only one element should be present for NFS v3 but multiple
         * can be present for NFS v4.1. Forces a new resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder remoteHosts(String... remoteHosts) {
            return remoteHosts(List.of(remoteHosts));
        }

        /**
         * @param remotePath The remote path of the mount point. Forces a new
         * resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder remotePath(Output remotePath) {
            $.remotePath = remotePath;
            return this;
        }

        /**
         * @param remotePath The remote path of the mount point. Forces a new
         * resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder remotePath(String remotePath) {
            return remotePath(Output.of(remotePath));
        }

        /**
         * @param securityType The security type to use when using NFS v4.1.
         * Can be one of `AUTH_SYS`, `SEC_KRB5`, or `SEC_KRB5I`. Forces a new resource
         * if changed.
         * 
         * @return builder
         * 
         */
        public Builder securityType(@Nullable Output securityType) {
            $.securityType = securityType;
            return this;
        }

        /**
         * @param securityType The security type to use when using NFS v4.1.
         * Can be one of `AUTH_SYS`, `SEC_KRB5`, or `SEC_KRB5I`. Forces a new resource
         * if changed.
         * 
         * @return builder
         * 
         */
        public Builder securityType(String securityType) {
            return securityType(Output.of(securityType));
        }

        /**
         * @param tags The IDs of any tags to attach to this resource.
         * 
         * > **NOTE:** Tagging support is unsupported on direct ESXi connections and
         * requires vCenter 6.0 or higher.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags The IDs of any tags to attach to this resource.
         * 
         * > **NOTE:** Tagging support is unsupported on direct ESXi connections and
         * requires vCenter 6.0 or higher.
         * 
         * @return builder
         * 
         */
        public Builder tags(List tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param tags The IDs of any tags to attach to this resource.
         * 
         * > **NOTE:** Tagging support is unsupported on direct ESXi connections and
         * requires vCenter 6.0 or higher.
         * 
         * @return builder
         * 
         */
        public Builder tags(String... tags) {
            return tags(List.of(tags));
        }

        /**
         * @param type The type of NAS volume. Can be one of `NFS` (to denote
         * v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if
         * changed.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of NAS volume. Can be one of `NFS` (to denote
         * v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if
         * changed.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public NasDatastoreArgs build() {
            if ($.hostSystemIds == null) {
                throw new MissingRequiredPropertyException("NasDatastoreArgs", "hostSystemIds");
            }
            if ($.remoteHosts == null) {
                throw new MissingRequiredPropertyException("NasDatastoreArgs", "remoteHosts");
            }
            if ($.remotePath == null) {
                throw new MissingRequiredPropertyException("NasDatastoreArgs", "remotePath");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy