com.pulumi.cloudflare.kotlin.FallbackDomain.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
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.cloudflare.kotlin
import com.pulumi.cloudflare.kotlin.outputs.FallbackDomainDomain
import com.pulumi.cloudflare.kotlin.outputs.FallbackDomainDomain.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 [FallbackDomain].
*/
@PulumiTagMarker
public class FallbackDomainResourceBuilder internal constructor() {
public var name: String? = null
public var args: FallbackDomainArgs = FallbackDomainArgs()
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 FallbackDomainArgsBuilder.() -> Unit) {
val builder = FallbackDomainArgsBuilder()
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(): FallbackDomain {
val builtJavaResource = com.pulumi.cloudflare.FallbackDomain(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return FallbackDomain(builtJavaResource)
}
}
/**
* Provides a Cloudflare Fallback Domain resource. Fallback domains are
* used to ignore DNS requests to a given list of domains. These DNS
* requests will be passed back to other DNS servers configured on
* existing network interfaces on the device.
* ## Import
* Fallback Domains for default device policies must use "default" as the policy ID.
* ```sh
* $ pulumi import cloudflare:index/fallbackDomain:FallbackDomain example /
* ```
*/
public class FallbackDomain internal constructor(
override val javaResource: com.pulumi.cloudflare.FallbackDomain,
) : KotlinCustomResource(javaResource, FallbackDomainMapper) {
/**
* The account identifier to target for the resource.
*/
public val accountId: Output
get() = javaResource.accountId().applyValue({ args0 -> args0 })
public val domains: Output>
get() = javaResource.domains().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
})
/**
* The settings policy for which to configure this fallback domain policy.
*/
public val policyId: Output?
get() = javaResource.policyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object FallbackDomainMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.FallbackDomain::class == javaResource::class
override fun map(javaResource: Resource): FallbackDomain = FallbackDomain(
javaResource as
com.pulumi.cloudflare.FallbackDomain,
)
}
/**
* @see [FallbackDomain].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [FallbackDomain].
*/
public suspend fun fallbackDomain(
name: String,
block: suspend FallbackDomainResourceBuilder.() -> Unit,
): FallbackDomain {
val builder = FallbackDomainResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [FallbackDomain].
* @param name The _unique_ name of the resulting resource.
*/
public fun fallbackDomain(name: String): FallbackDomain {
val builder = FallbackDomainResourceBuilder()
builder.name(name)
return builder.build()
}