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

com.pulumi.googlenative.dns.v1beta2.kotlin.ManagedZone.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.dns.v1beta2.kotlin

import com.pulumi.core.Output
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneCloudLoggingConfigResponse
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneDnsSecConfigResponse
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneForwardingConfigResponse
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZonePeeringConfigResponse
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZonePrivateVisibilityConfigResponse
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneReverseLookupConfigResponse
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneServiceDirectoryConfigResponse
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
import kotlin.collections.Map
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneCloudLoggingConfigResponse.Companion.toKotlin as managedZoneCloudLoggingConfigResponseToKotlin
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneDnsSecConfigResponse.Companion.toKotlin as managedZoneDnsSecConfigResponseToKotlin
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneForwardingConfigResponse.Companion.toKotlin as managedZoneForwardingConfigResponseToKotlin
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZonePeeringConfigResponse.Companion.toKotlin as managedZonePeeringConfigResponseToKotlin
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZonePrivateVisibilityConfigResponse.Companion.toKotlin as managedZonePrivateVisibilityConfigResponseToKotlin
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneReverseLookupConfigResponse.Companion.toKotlin as managedZoneReverseLookupConfigResponseToKotlin
import com.pulumi.googlenative.dns.v1beta2.kotlin.outputs.ManagedZoneServiceDirectoryConfigResponse.Companion.toKotlin as managedZoneServiceDirectoryConfigResponseToKotlin

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

    public var args: ManagedZoneArgs = ManagedZoneArgs()

    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 ManagedZoneArgsBuilder.() -> Unit) {
        val builder = ManagedZoneArgsBuilder()
        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(): ManagedZone {
        val builtJavaResource = com.pulumi.googlenative.dns.v1beta2.ManagedZone(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return ManagedZone(builtJavaResource)
    }
}

/**
 * Creates a new ManagedZone.
 */
public class ManagedZone internal constructor(
    override val javaResource: com.pulumi.googlenative.dns.v1beta2.ManagedZone,
) : KotlinCustomResource(javaResource, ManagedZoneMapper) {
    /**
     * For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
     */
    public val clientOperationId: Output?
        get() = javaResource.clientOperationId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * The time that this resource was created on the server. This is in RFC3339 text format. Output only.
     */
    public val creationTime: Output
        get() = javaResource.creationTime().applyValue({ args0 -> args0 })

    /**
     * A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function.
     */
    public val description: Output
        get() = javaResource.description().applyValue({ args0 -> args0 })

    /**
     * The DNS name of this managed zone, for instance "example.com.".
     */
    public val dnsName: Output
        get() = javaResource.dnsName().applyValue({ args0 -> args0 })

    /**
     * DNSSEC configuration.
     */
    public val dnssecConfig: Output
        get() = javaResource.dnssecConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                managedZoneDnsSecConfigResponseToKotlin(args0)
            })
        })

    /**
     * The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to.
     */
    public val forwardingConfig: Output
        get() = javaResource.forwardingConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                managedZoneForwardingConfigResponseToKotlin(args0)
            })
        })

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

    /**
     * User labels.
     */
    public val labels: Output>
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users leave this field unset. If you need to use this field, contact your account team.
     */
    public val nameServerSet: Output
        get() = javaResource.nameServerSet().applyValue({ args0 -> args0 })

    /**
     * Delegate your managed_zone to these virtual name servers; defined by the server (output only)
     */
    public val nameServers: Output>
        get() = javaResource.nameServers().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with.
     */
    public val peeringConfig: Output
        get() = javaResource.peeringConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                managedZonePeeringConfigResponseToKotlin(args0)
            })
        })

    /**
     * For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
     */
    public val privateVisibilityConfig: Output
        get() = javaResource.privateVisibilityConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                managedZonePrivateVisibilityConfigResponseToKotlin(args0)
            })
        })

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

    /**
     * The presence of this field indicates that this is a managed reverse lookup zone and Cloud DNS resolves reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
     */
    public val reverseLookupConfig: Output
        get() = javaResource.reverseLookupConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                managedZoneReverseLookupConfigResponseToKotlin(args0)
            })
        })

    /**
     * This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones.
     */
    public val serviceDirectoryConfig: Output
        get() = javaResource.serviceDirectoryConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                managedZoneServiceDirectoryConfigResponseToKotlin(args0)
            })
        })

    /**
     * The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
     */
    public val visibility: Output
        get() = javaResource.visibility().applyValue({ args0 -> args0 })
}

public object ManagedZoneMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.dns.v1beta2.ManagedZone::class == javaResource::class

    override fun map(javaResource: Resource): ManagedZone = ManagedZone(
        javaResource as
            com.pulumi.googlenative.dns.v1beta2.ManagedZone,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy