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

com.pulumi.kubernetes.extensions.v1beta1.inputs.AllowedHostPathArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
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.kubernetes.extensions.v1beta1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. Deprecated: use AllowedHostPath from policy API Group instead.
 * 
 */
public final class AllowedHostPathArgs extends com.pulumi.resources.ResourceArgs {

    public static final AllowedHostPathArgs Empty = new AllowedHostPathArgs();

    /**
     * pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.
     * 
     * Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`
     * 
     */
    @Import(name="pathPrefix")
    private @Nullable Output pathPrefix;

    /**
     * @return pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.
     * 
     * Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`
     * 
     */
    public Optional> pathPrefix() {
        return Optional.ofNullable(this.pathPrefix);
    }

    /**
     * when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
     * 
     */
    @Import(name="readOnly")
    private @Nullable Output readOnly;

    /**
     * @return when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
     * 
     */
    public Optional> readOnly() {
        return Optional.ofNullable(this.readOnly);
    }

    private AllowedHostPathArgs() {}

    private AllowedHostPathArgs(AllowedHostPathArgs $) {
        this.pathPrefix = $.pathPrefix;
        this.readOnly = $.readOnly;
    }

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

    public static final class Builder {
        private AllowedHostPathArgs $;

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

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

        /**
         * @param pathPrefix pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.
         * 
         * Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`
         * 
         * @return builder
         * 
         */
        public Builder pathPrefix(@Nullable Output pathPrefix) {
            $.pathPrefix = pathPrefix;
            return this;
        }

        /**
         * @param pathPrefix pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.
         * 
         * Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`
         * 
         * @return builder
         * 
         */
        public Builder pathPrefix(String pathPrefix) {
            return pathPrefix(Output.of(pathPrefix));
        }

        /**
         * @param readOnly when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
         * 
         * @return builder
         * 
         */
        public Builder readOnly(@Nullable Output readOnly) {
            $.readOnly = readOnly;
            return this;
        }

        /**
         * @param readOnly when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
         * 
         * @return builder
         * 
         */
        public Builder readOnly(Boolean readOnly) {
            return readOnly(Output.of(readOnly));
        }

        public AllowedHostPathArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy