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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

The newest version!
@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.BareMetalNodePoolConfigResponse
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.ResourceStatusResponse
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.BareMetalNodePoolConfigResponse.Companion.toKotlin as bareMetalNodePoolConfigResponseToKotlin
import com.pulumi.googlenative.gkeonprem.v1.kotlin.outputs.ResourceStatusResponse.Companion.toKotlin as resourceStatusResponseToKotlin

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

    public var args: BareMetalNodePoolArgs = BareMetalNodePoolArgs()

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

/**
 * Creates a new bare metal node pool in a given project, location and Bare Metal cluster.
 */
public class BareMetalNodePool internal constructor(
    override val javaResource: com.pulumi.googlenative.gkeonprem.v1.BareMetalNodePool,
) : KotlinCustomResource(javaResource, BareMetalNodePoolMapper) {
    /**
     * Annotations on the bare metal 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()
        })

    public val bareMetalClusterId: Output
        get() = javaResource.bareMetalClusterId().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 63 characters, and valid characters are /a-z-/. 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 bareMetalNodePoolId: Output?
        get() = javaResource.bareMetalNodePoolId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * The time at which this bare metal 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 bare metal 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 bare metal node pool resource name.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Node pool configuration.
     */
    public val nodePoolConfig: Output
        get() = javaResource.nodePoolConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                bareMetalNodePoolConfigResponseToKotlin(args0)
            })
        })

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

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

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

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

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy