
com.pulumi.nomad.kotlin.CsiVolume.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.nomad.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.nomad.kotlin.outputs.CsiVolumeCapability
import com.pulumi.nomad.kotlin.outputs.CsiVolumeMountOptions
import com.pulumi.nomad.kotlin.outputs.CsiVolumeTopology
import com.pulumi.nomad.kotlin.outputs.CsiVolumeTopologyRequest
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.nomad.kotlin.outputs.CsiVolumeCapability.Companion.toKotlin as csiVolumeCapabilityToKotlin
import com.pulumi.nomad.kotlin.outputs.CsiVolumeMountOptions.Companion.toKotlin as csiVolumeMountOptionsToKotlin
import com.pulumi.nomad.kotlin.outputs.CsiVolumeTopology.Companion.toKotlin as csiVolumeTopologyToKotlin
import com.pulumi.nomad.kotlin.outputs.CsiVolumeTopologyRequest.Companion.toKotlin as csiVolumeTopologyRequestToKotlin
/**
* Builder for [CsiVolume].
*/
@PulumiTagMarker
public class CsiVolumeResourceBuilder internal constructor() {
public var name: String? = null
public var args: CsiVolumeArgs = CsiVolumeArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend CsiVolumeArgsBuilder.() -> Unit) {
val builder = CsiVolumeArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): CsiVolume {
val builtJavaResource = com.pulumi.nomad.CsiVolume(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return CsiVolume(builtJavaResource)
}
}
public class CsiVolume internal constructor(
override val javaResource: com.pulumi.nomad.CsiVolume,
) : KotlinCustomResource(javaResource, CsiVolumeMapper) {
/**
* `(``Capability``: )` - Options for validating the capability of a volume.
*/
public val capabilities: Output>
get() = javaResource.capabilities().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
csiVolumeCapabilityToKotlin(args0)
})
})
})
public val capacity: Output
get() = javaResource.capacity().applyValue({ args0 -> args0 })
/**
* `(string: )` - Option to signal a maximum volume size. This may not be supported by all storage providers.
*/
public val capacityMax: Output?
get() = javaResource.capacityMax().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
public val capacityMaxBytes: Output
get() = javaResource.capacityMaxBytes().applyValue({ args0 -> args0 })
/**
* `(string: )` - Option to signal a minimum volume size. This may not be supported by all storage providers.
*/
public val capacityMin: Output?
get() = javaResource.capacityMin().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
public val capacityMinBytes: Output
get() = javaResource.capacityMinBytes().applyValue({ args0 -> args0 })
/**
* `(string: )` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshot_id`.
*/
public val cloneId: Output?
get() = javaResource.cloneId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
public val controllerRequired: Output
get() = javaResource.controllerRequired().applyValue({ args0 -> args0 })
public val controllersExpected: Output
get() = javaResource.controllersExpected().applyValue({ args0 -> args0 })
public val controllersHealthy: Output
get() = javaResource.controllersHealthy().applyValue({ args0 -> args0 })
/**
* The ID of the physical volume from the storage provider.
*/
public val externalId: Output
get() = javaResource.externalId().applyValue({ args0 -> args0 })
/**
* `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
*/
public val mountOptions: Output?
get() = javaResource.mountOptions().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
csiVolumeMountOptionsToKotlin(args0)
})
}).orElse(null)
})
/**
* `(string: )` - The display name for the volume.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* `(string: "default")` - The namespace in which to register the volume.
*/
public val namespace: Output?
get() = javaResource.namespace().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
public val nodesExpected: Output
get() = javaResource.nodesExpected().applyValue({ args0 -> args0 })
public val nodesHealthy: Output
get() = javaResource.nodesHealthy().applyValue({ args0 -> args0 })
/**
* `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
*/
public val parameters: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy