com.pulumi.azure.privatedns.kotlin.Zone.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.privatedns.kotlin
import com.pulumi.azure.privatedns.kotlin.outputs.ZoneSoaRecord
import com.pulumi.azure.privatedns.kotlin.outputs.ZoneSoaRecord.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [Zone].
*/
@PulumiTagMarker
public class ZoneResourceBuilder internal constructor() {
public var name: String? = null
public var args: ZoneArgs = ZoneArgs()
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 ZoneArgsBuilder.() -> Unit) {
val builder = ZoneArgsBuilder()
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.opts(block)
}
internal fun build(): Zone {
val builtJavaResource = com.pulumi.azure.privatedns.Zone(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Zone(builtJavaResource)
}
}
/**
* Enables you to manage Private DNS zones within Azure DNS. These zones are hosted on Azure's name servers.
* ## Example Usage
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.privatedns.Zone;
* import com.pulumi.azure.privatedns.ZoneArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .location("West Europe")
* .build());
* var exampleZone = new Zone("exampleZone", ZoneArgs.builder()
* .resourceGroupName(exampleResourceGroup.name())
* .build());
* }
* }
* ```
* ## Import
* Private DNS Zones can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:privatedns/zone:Zone zone1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1
* ```
*
*/
public class Zone internal constructor(
override val javaResource: com.pulumi.azure.privatedns.Zone,
) : KotlinCustomResource(javaResource, ZoneMapper) {
/**
* The maximum number of record sets that can be created in this Private DNS zone.
*/
public val maxNumberOfRecordSets: Output
get() = javaResource.maxNumberOfRecordSets().applyValue({ args0 -> args0 })
/**
* The maximum number of virtual networks that can be linked to this Private DNS zone.
*/
public val maxNumberOfVirtualNetworkLinks: Output
get() = javaResource.maxNumberOfVirtualNetworkLinks().applyValue({ args0 -> args0 })
/**
* The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
*/
public val maxNumberOfVirtualNetworkLinksWithRegistration: Output
get() = javaResource.maxNumberOfVirtualNetworkLinksWithRegistration().applyValue({ args0 ->
args0
})
/**
* The name of the Private DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created.
* > **NOTE:** If you are going to be using the Private DNS Zone with a Private Endpoint the name of the Private DNS Zone must follow the **Private DNS Zone name** schema in the [product documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-dns#virtual-network-and-on-premises-workloads-using-a-dns-forwarder) in order for the two resources to be connected successfully.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The current number of record sets in this Private DNS zone.
*/
public val numberOfRecordSets: Output
get() = javaResource.numberOfRecordSets().applyValue({ args0 -> args0 })
/**
* Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* An `soa_record` block as defined below. Changing this forces a new resource to be created.
*/
public val soaRecord: Output
get() = javaResource.soaRecord().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* A mapping of tags to assign to the resource.
*/
public val tags: Output