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

com.pulumi.googlenative.gkeonprem.v1.kotlin.VmwareNodePool.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.gkeonprem.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.ResourceStatusResponse
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.VmwareNodeConfigResponse
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.VmwareNodePoolAutoscalingConfigResponse
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.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.ResourceStatusResponse.Companion.toKotlin as resourceStatusResponseToKotlin
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.VmwareNodeConfigResponse.Companion.toKotlin as vmwareNodeConfigResponseToKotlin
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.VmwareNodePoolAutoscalingConfigResponse.Companion.toKotlin as vmwareNodePoolAutoscalingConfigResponseToKotlin

/**
 * Builder for [VmwareNodePool].
 */
@PulumiTagMarker
public class VmwareNodePoolResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: VmwareNodePoolArgs = VmwareNodePoolArgs()

    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 VmwareNodePoolArgsBuilder.() -> Unit) {
        val builder = VmwareNodePoolArgsBuilder()
        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(): VmwareNodePool {
        val builtJavaResource =
            com.pulumi.googlenative.gkeonprem.v1.VmwareNodePool(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return VmwareNodePool(builtJavaResource)
    }
}

/**
 * Creates a new VMware node pool in a given project, location and VMWare cluster.
 */
public class VmwareNodePool internal constructor(
    override val javaResource: com.pulumi.googlenative.gkeonprem.v1.VmwareNodePool,
) : KotlinCustomResource(javaResource, VmwareNodePoolMapper) {
    /**
     * Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
     */
    public val annotations: Output>
        get() = javaResource.annotations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * The node configuration of the node pool.
     */
    public val config: Output
        get() = javaResource.config().applyValue({ args0 ->
            args0.let({ args0 ->
                vmwareNodeConfigResponseToKotlin(args0)
            })
        })

    /**
     * The time at which this node pool was created.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * The time at which this node pool was deleted. If the resource is not deleted, this must be empty
     */
    public val deleteTime: Output
        get() = javaResource.deleteTime().applyValue({ args0 -> args0 })

    /**
     * The display name for the node pool.
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Allows clients to perform consistent read-modify-writes through optimistic concurrency control.
     */
    public val etag: Output
        get() = javaResource.etag().applyValue({ args0 -> args0 })

    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Immutable. The resource name of this node pool.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Node pool autoscaling config for the node pool.
     */
    public val nodePoolAutoscaling: Output
        get() = javaResource.nodePoolAutoscaling().applyValue({ args0 ->
            args0.let({ args0 ->
                vmwareNodePoolAutoscalingConfigResponseToKotlin(args0)
            })
        })

    /**
     * Anthos version for the node pool. Defaults to the user cluster version.
     */
    public val onPremVersion: Output
        get() = javaResource.onPremVersion().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * If set, there are currently changes in flight to the node pool.
     */
    public val reconciling: Output
        get() = javaResource.reconciling().applyValue({ args0 -> args0 })

    /**
     * The current state of the node pool.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0 })

    /**
     * ResourceStatus representing the detailed VMware node pool state.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                resourceStatusResponseToKotlin(args0)
            })
        })

    /**
     * The unique identifier of the node pool.
     */
    public val uid: Output
        get() = javaResource.uid().applyValue({ args0 -> args0 })

    /**
     * The time at which this node pool was last updated.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })

    public val vmwareClusterId: Output
        get() = javaResource.vmwareClusterId().applyValue({ args0 -> args0 })

    /**
     * The ID to use for the node pool, which will become the final component of the node pool's resource name. This value must be up to 40 characters and follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format. The value must not be permitted to be a UUID (or UUID-like: anything matching /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i).
     */
    public val vmwareNodePoolId: Output?
        get() = javaResource.vmwareNodePoolId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object VmwareNodePoolMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.gkeonprem.v1.VmwareNodePool::class == javaResource::class

    override fun map(javaResource: Resource): VmwareNodePool = VmwareNodePool(
        javaResource as
            com.pulumi.googlenative.gkeonprem.v1.VmwareNodePool,
    )
}

/**
 * @see [VmwareNodePool].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [VmwareNodePool].
 */
public suspend fun vmwareNodePool(
    name: String,
    block: suspend VmwareNodePoolResourceBuilder.() -> Unit,
): VmwareNodePool {
    val builder = VmwareNodePoolResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [VmwareNodePool].
 * @param name The _unique_ name of the resulting resource.
 */
public fun vmwareNodePool(name: String): VmwareNodePool {
    val builder = VmwareNodePoolResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy