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

com.pulumi.awsnative.backupgateway.kotlin.Hypervisor.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.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.backupgateway.kotlin

import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin
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.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

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

    public var args: HypervisorArgs = HypervisorArgs()

    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 HypervisorArgsBuilder.() -> Unit) {
        val builder = HypervisorArgsBuilder()
        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(): Hypervisor {
        val builtJavaResource = com.pulumi.awsnative.backupgateway.Hypervisor(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Hypervisor(builtJavaResource)
    }
}

/**
 * Definition of AWS::BackupGateway::Hypervisor Resource Type
 */
public class Hypervisor internal constructor(
    override val javaResource: com.pulumi.awsnative.backupgateway.Hypervisor,
) : KotlinCustomResource(javaResource, HypervisorMapper) {
    /**
     * The server host of the hypervisor. This can be either an IP address or a fully-qualified domain name (FQDN).
     */
    public val host: Output?
        get() = javaResource.host().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Returns `HypervisorArn` , an Amazon Resource Name (ARN) that uniquely identifies a Hypervisor. For example: `arn:aws:backup-gateway:us-east-1:123456789012:hypervisor/hype-1234D67D`
     */
    public val hypervisorArn: Output
        get() = javaResource.hypervisorArn().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the AWS Key Management Service used to encrypt the hypervisor.
     */
    public val kmsKeyArn: Output?
        get() = javaResource.kmsKeyArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The Amazon Resource Name (ARN) of the group of gateways within the requested log.
     */
    public val logGroupArn: Output?
        get() = javaResource.logGroupArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the hypervisor.
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The password for the hypervisor.
     */
    public val password: Output?
        get() = javaResource.password().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The tags of the hypervisor configuration to import.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The username for the hypervisor.
     */
    public val username: Output?
        get() = javaResource.username().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

public object HypervisorMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.backupgateway.Hypervisor::class == javaResource::class

    override fun map(javaResource: Resource): Hypervisor = Hypervisor(
        javaResource as
            com.pulumi.awsnative.backupgateway.Hypervisor,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy