Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.nomad.kotlin.CsiVolumeArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.nomad.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.nomad.CsiVolumeArgs.builder
import com.pulumi.nomad.kotlin.inputs.CsiVolumeCapabilityArgs
import com.pulumi.nomad.kotlin.inputs.CsiVolumeCapabilityArgsBuilder
import com.pulumi.nomad.kotlin.inputs.CsiVolumeMountOptionsArgs
import com.pulumi.nomad.kotlin.inputs.CsiVolumeMountOptionsArgsBuilder
import com.pulumi.nomad.kotlin.inputs.CsiVolumeTopologyRequestArgs
import com.pulumi.nomad.kotlin.inputs.CsiVolumeTopologyRequestArgsBuilder
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
*
* @property capabilities `(``Capability``: )` - Options for validating the capability of a volume.
* @property capacityMax `(string: )` - Option to signal a maximum volume size. This may not be supported by all storage providers.
* @property capacityMin `(string: )` - Option to signal a minimum volume size. This may not be supported by all storage providers.
* @property cloneId `(string: )` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshot_id`.
* @property mountOptions `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
* @property name `(string: )` - The display name for the volume.
* @property namespace `(string: "default")` - The namespace in which to register the volume.
* @property parameters `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
* @property pluginId `(string: )` - The ID of the Nomad plugin for registering this volume.
* @property secrets `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
* @property snapshotId `(string: )` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `clone_id`.
* @property topologyRequest `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
* @property volumeId `(string: )` - The unique ID of the volume.
*/
public data class CsiVolumeArgs(
public val capabilities: Output>? = null,
public val capacityMax: Output? = null,
public val capacityMin: Output? = null,
public val cloneId: Output? = null,
public val mountOptions: Output? = null,
public val name: Output? = null,
public val namespace: Output? = null,
public val parameters: Output>? = null,
public val pluginId: Output? = null,
public val secrets: Output>? = null,
public val snapshotId: Output? = null,
public val topologyRequest: Output? = null,
public val volumeId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.nomad.CsiVolumeArgs = com.pulumi.nomad.CsiVolumeArgs.builder()
.capabilities(
capabilities?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.capacityMax(capacityMax?.applyValue({ args0 -> args0 }))
.capacityMin(capacityMin?.applyValue({ args0 -> args0 }))
.cloneId(cloneId?.applyValue({ args0 -> args0 }))
.mountOptions(mountOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.parameters(
parameters?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.pluginId(pluginId?.applyValue({ args0 -> args0 }))
.secrets(secrets?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.snapshotId(snapshotId?.applyValue({ args0 -> args0 }))
.topologyRequest(topologyRequest?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.volumeId(volumeId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [CsiVolumeArgs].
*/
@PulumiTagMarker
public class CsiVolumeArgsBuilder internal constructor() {
private var capabilities: Output>? = null
private var capacityMax: Output? = null
private var capacityMin: Output? = null
private var cloneId: Output? = null
private var mountOptions: Output? = null
private var name: Output? = null
private var namespace: Output? = null
private var parameters: Output>? = null
private var pluginId: Output? = null
private var secrets: Output>? = null
private var snapshotId: Output? = null
private var topologyRequest: Output? = null
private var volumeId: Output? = null
/**
* @param value `(``Capability``: )` - Options for validating the capability of a volume.
*/
@JvmName("sgugbnwophffrhtn")
public suspend fun capabilities(`value`: Output>) {
this.capabilities = value
}
@JvmName("ddphstmmeinuyxtf")
public suspend fun capabilities(vararg values: Output) {
this.capabilities = Output.all(values.asList())
}
/**
* @param values `(``Capability``: )` - Options for validating the capability of a volume.
*/
@JvmName("adoqvyxjypjseacg")
public suspend fun capabilities(values: List>) {
this.capabilities = Output.all(values)
}
/**
* @param value `(string: )` - Option to signal a maximum volume size. This may not be supported by all storage providers.
*/
@JvmName("ypqruwyfacveaujx")
public suspend fun capacityMax(`value`: Output) {
this.capacityMax = value
}
/**
* @param value `(string: )` - Option to signal a minimum volume size. This may not be supported by all storage providers.
*/
@JvmName("bqaxfrkmyrjnskek")
public suspend fun capacityMin(`value`: Output) {
this.capacityMin = value
}
/**
* @param value `(string: )` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshot_id`.
*/
@JvmName("rsnxelhnwrcetxor")
public suspend fun cloneId(`value`: Output) {
this.cloneId = value
}
/**
* @param value `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
*/
@JvmName("gqjjjobtldgybxll")
public suspend fun mountOptions(`value`: Output) {
this.mountOptions = value
}
/**
* @param value `(string: )` - The display name for the volume.
*/
@JvmName("yfjuaqetqjsoxcln")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value `(string: "default")` - The namespace in which to register the volume.
*/
@JvmName("sgnrquawyelrjwjg")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
*/
@JvmName("jyhavowmveopjfya")
public suspend fun parameters(`value`: Output>) {
this.parameters = value
}
/**
* @param value `(string: )` - The ID of the Nomad plugin for registering this volume.
*/
@JvmName("kkhaxblvycepkbrc")
public suspend fun pluginId(`value`: Output) {
this.pluginId = value
}
/**
* @param value `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
*/
@JvmName("huhwckuhiknpxwue")
public suspend fun secrets(`value`: Output>) {
this.secrets = value
}
/**
* @param value `(string: )` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `clone_id`.
*/
@JvmName("uucqxpckmoultngq")
public suspend fun snapshotId(`value`: Output) {
this.snapshotId = value
}
/**
* @param value `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
*/
@JvmName("lbumtckqedvnfwrv")
public suspend fun topologyRequest(`value`: Output) {
this.topologyRequest = value
}
/**
* @param value `(string: )` - The unique ID of the volume.
*/
@JvmName("ntiqydjbdfquvoxa")
public suspend fun volumeId(`value`: Output) {
this.volumeId = value
}
/**
* @param value `(``Capability``: )` - Options for validating the capability of a volume.
*/
@JvmName("xlkpcrcjydeehxux")
public suspend fun capabilities(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.capabilities = mapped
}
/**
* @param argument `(``Capability``: )` - Options for validating the capability of a volume.
*/
@JvmName("mbfohtmqfjfuefrl")
public suspend fun capabilities(argument: List Unit>) {
val toBeMapped = argument.toList().map {
CsiVolumeCapabilityArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.capabilities = mapped
}
/**
* @param argument `(``Capability``: )` - Options for validating the capability of a volume.
*/
@JvmName("wurulkdapoggymif")
public suspend fun capabilities(vararg argument: suspend CsiVolumeCapabilityArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
CsiVolumeCapabilityArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.capabilities = mapped
}
/**
* @param argument `(``Capability``: )` - Options for validating the capability of a volume.
*/
@JvmName("roapsnctxrouwblq")
public suspend fun capabilities(argument: suspend CsiVolumeCapabilityArgsBuilder.() -> Unit) {
val toBeMapped = listOf(CsiVolumeCapabilityArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.capabilities = mapped
}
/**
* @param values `(``Capability``: )` - Options for validating the capability of a volume.
*/
@JvmName("ledmsylnqxtfdfjs")
public suspend fun capabilities(vararg values: CsiVolumeCapabilityArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.capabilities = mapped
}
/**
* @param value `(string: )` - Option to signal a maximum volume size. This may not be supported by all storage providers.
*/
@JvmName("wujilvgdirdluork")
public suspend fun capacityMax(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.capacityMax = mapped
}
/**
* @param value `(string: )` - Option to signal a minimum volume size. This may not be supported by all storage providers.
*/
@JvmName("sbtrnjehttbeprks")
public suspend fun capacityMin(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.capacityMin = mapped
}
/**
* @param value `(string: )` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshot_id`.
*/
@JvmName("vsntbpvliwnrqpqf")
public suspend fun cloneId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cloneId = mapped
}
/**
* @param value `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
*/
@JvmName("nohnxcwlaugosfmw")
public suspend fun mountOptions(`value`: CsiVolumeMountOptionsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mountOptions = mapped
}
/**
* @param argument `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
*/
@JvmName("yocraldvebwybntm")
public suspend fun mountOptions(argument: suspend CsiVolumeMountOptionsArgsBuilder.() -> Unit) {
val toBeMapped = CsiVolumeMountOptionsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.mountOptions = mapped
}
/**
* @param value `(string: )` - The display name for the volume.
*/
@JvmName("trthqrxkyvqnykeo")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value `(string: "default")` - The namespace in which to register the volume.
*/
@JvmName("jaanswofqkrcgckw")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
*/
@JvmName("bripsoqqphdsgbwd")
public suspend fun parameters(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param values `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
*/
@JvmName("pedrrlwxwiefarxo")
public fun parameters(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param value `(string: )` - The ID of the Nomad plugin for registering this volume.
*/
@JvmName("lacwmpfqqrroyfel")
public suspend fun pluginId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pluginId = mapped
}
/**
* @param value `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
*/
@JvmName("shqcevwkflwvvdfk")
public suspend fun secrets(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.secrets = mapped
}
/**
* @param values `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
*/
@JvmName("jiwllckvmalokxso")
public fun secrets(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.secrets = mapped
}
/**
* @param value `(string: )` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `clone_id`.
*/
@JvmName("piwqfswcrjvxgddt")
public suspend fun snapshotId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.snapshotId = mapped
}
/**
* @param value `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
*/
@JvmName("vtiaoiquoojlkryx")
public suspend fun topologyRequest(`value`: CsiVolumeTopologyRequestArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.topologyRequest = mapped
}
/**
* @param argument `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
*/
@JvmName("vwwbnaawdvecxjax")
public suspend fun topologyRequest(argument: suspend CsiVolumeTopologyRequestArgsBuilder.() -> Unit) {
val toBeMapped = CsiVolumeTopologyRequestArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.topologyRequest = mapped
}
/**
* @param value `(string: )` - The unique ID of the volume.
*/
@JvmName("jwhuqjqxesahcmrh")
public suspend fun volumeId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.volumeId = mapped
}
internal fun build(): CsiVolumeArgs = CsiVolumeArgs(
capabilities = capabilities,
capacityMax = capacityMax,
capacityMin = capacityMin,
cloneId = cloneId,
mountOptions = mountOptions,
name = name,
namespace = namespace,
parameters = parameters,
pluginId = pluginId,
secrets = secrets,
snapshotId = snapshotId,
topologyRequest = topologyRequest,
volumeId = volumeId,
)
}