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

com.pulumi.cloudflare.kotlin.Web3Hostname.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: 5.40.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.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.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

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

    public var args: Web3HostnameArgs = Web3HostnameArgs()

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

/**
 * Manages Web3 hostnames for IPFS and Ethereum gateways.
 */
public class Web3Hostname internal constructor(
    override val javaResource: com.pulumi.cloudflare.Web3Hostname,
) : KotlinCustomResource(javaResource, Web3HostnameMapper) {
    /**
     * Creation time.
     */
    public val createdOn: Output
        get() = javaResource.createdOn().applyValue({ args0 -> args0 })

    /**
     * An optional description of the hostname.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * DNSLink value used if the target is ipfs.
     */
    public val dnslink: Output?
        get() = javaResource.dnslink().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Last modification time.
     */
    public val modifiedOn: Output
        get() = javaResource.modifiedOn().applyValue({ args0 -> args0 })

    /**
     * The hostname that will point to the target gateway via CNAME.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Status of the hostname's activation.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 -> args0 })

    /**
     * Target gateway of the hostname.
     */
    public val target: Output
        get() = javaResource.target().applyValue({ args0 -> args0 })

    /**
     * The zone identifier to target for the resource.
     */
    public val zoneId: Output
        get() = javaResource.zoneId().applyValue({ args0 -> args0 })
}

public object Web3HostnameMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.cloudflare.Web3Hostname::class == javaResource::class

    override fun map(javaResource: Resource): Web3Hostname = Web3Hostname(
        javaResource as
            com.pulumi.cloudflare.Web3Hostname,
    )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy