com.pulumi.kubernetes.policy.v1beta1.kotlin.inputs.AllowedHostPathArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.policy.v1beta1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kubernetes.policy.v1beta1.inputs.AllowedHostPathArgs.builder
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* 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.
* @property 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`
* @property readOnly when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
*/
public data class AllowedHostPathArgs(
public val pathPrefix: Output? = null,
public val readOnly: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.policy.v1beta1.inputs.AllowedHostPathArgs =
com.pulumi.kubernetes.policy.v1beta1.inputs.AllowedHostPathArgs.builder()
.pathPrefix(pathPrefix?.applyValue({ args0 -> args0 }))
.readOnly(readOnly?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AllowedHostPathArgs].
*/
@PulumiTagMarker
public class AllowedHostPathArgsBuilder internal constructor() {
private var pathPrefix: Output? = null
private var readOnly: Output? = null
/**
* @param value 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`
*/
@JvmName("ffymkbbpfjtqracs")
public suspend fun pathPrefix(`value`: Output) {
this.pathPrefix = value
}
/**
* @param value when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
*/
@JvmName("vkevmhvsybjgqxhp")
public suspend fun readOnly(`value`: Output) {
this.readOnly = value
}
/**
* @param value 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`
*/
@JvmName("yjywgmjmskwvmsag")
public suspend fun pathPrefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pathPrefix = mapped
}
/**
* @param value when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.
*/
@JvmName("strvjttusuexicog")
public suspend fun readOnly(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.readOnly = mapped
}
internal fun build(): AllowedHostPathArgs = AllowedHostPathArgs(
pathPrefix = pathPrefix,
readOnly = readOnly,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy