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

com.pulumi.azure.dns.kotlin.DnsFunctions.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.dns.kotlin

import com.pulumi.azure.dns.DnsFunctions.getAAAARecordPlain
import com.pulumi.azure.dns.DnsFunctions.getARecordPlain
import com.pulumi.azure.dns.DnsFunctions.getCAARecordPlain
import com.pulumi.azure.dns.DnsFunctions.getCnameRecordPlain
import com.pulumi.azure.dns.DnsFunctions.getMxRecordPlain
import com.pulumi.azure.dns.DnsFunctions.getNsRecordPlain
import com.pulumi.azure.dns.DnsFunctions.getPtrRecordPlain
import com.pulumi.azure.dns.DnsFunctions.getSoaRecordPlain
import com.pulumi.azure.dns.DnsFunctions.getSrvRecordPlain
import com.pulumi.azure.dns.DnsFunctions.getTxtRecordPlain
import com.pulumi.azure.dns.DnsFunctions.getZonePlain
import com.pulumi.azure.dns.kotlin.inputs.GetAAAARecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetAAAARecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetARecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetARecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetCAARecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetCAARecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetCnameRecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetCnameRecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetMxRecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetMxRecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetNsRecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetNsRecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetPtrRecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetPtrRecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetSoaRecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetSoaRecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetSrvRecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetSrvRecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetTxtRecordPlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetTxtRecordPlainArgsBuilder
import com.pulumi.azure.dns.kotlin.inputs.GetZonePlainArgs
import com.pulumi.azure.dns.kotlin.inputs.GetZonePlainArgsBuilder
import com.pulumi.azure.dns.kotlin.outputs.GetAAAARecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetARecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetCAARecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetCnameRecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetMxRecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetNsRecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetPtrRecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetSoaRecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetSrvRecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetTxtRecordResult
import com.pulumi.azure.dns.kotlin.outputs.GetZoneResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.dns.kotlin.outputs.GetAAAARecordResult.Companion.toKotlin as getAAAARecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetARecordResult.Companion.toKotlin as getARecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetCAARecordResult.Companion.toKotlin as getCAARecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetCnameRecordResult.Companion.toKotlin as getCnameRecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetMxRecordResult.Companion.toKotlin as getMxRecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetNsRecordResult.Companion.toKotlin as getNsRecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetPtrRecordResult.Companion.toKotlin as getPtrRecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetSoaRecordResult.Companion.toKotlin as getSoaRecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetSrvRecordResult.Companion.toKotlin as getSrvRecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetTxtRecordResult.Companion.toKotlin as getTxtRecordResultToKotlin
import com.pulumi.azure.dns.kotlin.outputs.GetZoneResult.Companion.toKotlin as getZoneResultToKotlin

public object DnsFunctions {
    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getAAAARecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsAaaaRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_aaaa_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsAaaaRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetAAAARecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsAaaaRecordId"] = example.Apply(getAAAARecordResult => getAAAARecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.GetAAAARecord(ctx, &dns.GetAAAARecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsAaaaRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetAAAARecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getAAAARecord(GetAAAARecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsAaaaRecordId", example.applyValue(getAAAARecordResult -> getAAAARecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getAAAARecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsAaaaRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getAAAARecord.
     * @return A collection of values returned by getAAAARecord.
     */
    public suspend fun getAAAARecord(argument: GetAAAARecordPlainArgs): GetAAAARecordResult =
        getAAAARecordResultToKotlin(getAAAARecordPlain(argument.toJava()).await())

    /**
     * @see [getAAAARecord].
     * @param name The name of the DNS AAAA Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getAAAARecord.
     */
    public suspend fun getAAAARecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetAAAARecordResult {
        val argument = GetAAAARecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getAAAARecordResultToKotlin(getAAAARecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getAAAARecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetAAAARecordPlainArgs].
     * @return A collection of values returned by getAAAARecord.
     */
    public suspend fun getAAAARecord(argument: suspend GetAAAARecordPlainArgsBuilder.() -> Unit): GetAAAARecordResult {
        val builder = GetAAAARecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAAAARecordResultToKotlin(getAAAARecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getARecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsARecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_a_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsARecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetARecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsARecordId"] = example.Apply(getARecordResult => getARecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.LookupARecord(ctx, &dns.LookupARecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsARecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetARecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getARecord(GetARecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsARecordId", example.applyValue(getARecordResult -> getARecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getARecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsARecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getARecord.
     * @return A collection of values returned by getARecord.
     */
    public suspend fun getARecord(argument: GetARecordPlainArgs): GetARecordResult =
        getARecordResultToKotlin(getARecordPlain(argument.toJava()).await())

    /**
     * @see [getARecord].
     * @param name The name of the DNS A Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getARecord.
     */
    public suspend fun getARecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetARecordResult {
        val argument = GetARecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getARecordResultToKotlin(getARecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getARecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetARecordPlainArgs].
     * @return A collection of values returned by getARecord.
     */
    public suspend fun getARecord(argument: suspend GetARecordPlainArgsBuilder.() -> Unit): GetARecordResult {
        val builder = GetARecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getARecordResultToKotlin(getARecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getCAARecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsCaaRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_caa_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsCaaRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetCAARecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsCaaRecordId"] = example.Apply(getCAARecordResult => getCAARecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.GetCAARecord(ctx, &dns.GetCAARecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsCaaRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetCAARecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getCAARecord(GetCAARecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsCaaRecordId", example.applyValue(getCAARecordResult -> getCAARecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getCAARecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsCaaRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getCAARecord.
     * @return A collection of values returned by getCAARecord.
     */
    public suspend fun getCAARecord(argument: GetCAARecordPlainArgs): GetCAARecordResult =
        getCAARecordResultToKotlin(getCAARecordPlain(argument.toJava()).await())

    /**
     * @see [getCAARecord].
     * @param name The name of the DNS CAA Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getCAARecord.
     */
    public suspend fun getCAARecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetCAARecordResult {
        val argument = GetCAARecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getCAARecordResultToKotlin(getCAARecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getCAARecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetCAARecordPlainArgs].
     * @return A collection of values returned by getCAARecord.
     */
    public suspend fun getCAARecord(argument: suspend GetCAARecordPlainArgsBuilder.() -> Unit): GetCAARecordResult {
        val builder = GetCAARecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getCAARecordResultToKotlin(getCAARecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getCnameRecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsCnameRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_cname_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsCnameRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetCnameRecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsCnameRecordId"] = example.Apply(getCnameRecordResult => getCnameRecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.GetCnameRecord(ctx, &dns.GetCnameRecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsCnameRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetCnameRecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getCnameRecord(GetCnameRecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsCnameRecordId", example.applyValue(getCnameRecordResult -> getCnameRecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getCnameRecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsCnameRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getCnameRecord.
     * @return A collection of values returned by getCnameRecord.
     */
    public suspend fun getCnameRecord(argument: GetCnameRecordPlainArgs): GetCnameRecordResult =
        getCnameRecordResultToKotlin(getCnameRecordPlain(argument.toJava()).await())

    /**
     * @see [getCnameRecord].
     * @param name The name of the DNS CNAME Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getCnameRecord.
     */
    public suspend fun getCnameRecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetCnameRecordResult {
        val argument = GetCnameRecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getCnameRecordResultToKotlin(getCnameRecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getCnameRecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetCnameRecordPlainArgs].
     * @return A collection of values returned by getCnameRecord.
     */
    public suspend fun getCnameRecord(argument: suspend GetCnameRecordPlainArgsBuilder.() -> Unit): GetCnameRecordResult {
        val builder = GetCnameRecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getCnameRecordResultToKotlin(getCnameRecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getMxRecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsMxRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_mx_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsMxRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetMxRecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsMxRecordId"] = example.Apply(getMxRecordResult => getMxRecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.LookupMxRecord(ctx, &dns.LookupMxRecordArgs{
     * 			Name:              pulumi.StringRef("test"),
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsMxRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetMxRecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getMxRecord(GetMxRecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsMxRecordId", example.applyValue(getMxRecordResult -> getMxRecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getMxRecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsMxRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getMxRecord.
     * @return A collection of values returned by getMxRecord.
     */
    public suspend fun getMxRecord(argument: GetMxRecordPlainArgs): GetMxRecordResult =
        getMxRecordResultToKotlin(getMxRecordPlain(argument.toJava()).await())

    /**
     * @see [getMxRecord].
     * @param name The name of the DNS MX Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getMxRecord.
     */
    public suspend fun getMxRecord(
        name: String? = null,
        resourceGroupName: String,
        zoneName: String,
    ): GetMxRecordResult {
        val argument = GetMxRecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getMxRecordResultToKotlin(getMxRecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getMxRecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetMxRecordPlainArgs].
     * @return A collection of values returned by getMxRecord.
     */
    public suspend fun getMxRecord(argument: suspend GetMxRecordPlainArgsBuilder.() -> Unit): GetMxRecordResult {
        val builder = GetMxRecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getMxRecordResultToKotlin(getMxRecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getNsRecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsNsRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_ns_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsNsRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetNsRecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsNsRecordId"] = example.Apply(getNsRecordResult => getNsRecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.LookupNsRecord(ctx, &dns.LookupNsRecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsNsRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetNsRecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getNsRecord(GetNsRecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsNsRecordId", example.applyValue(getNsRecordResult -> getNsRecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getNsRecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsNsRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getNsRecord.
     * @return A collection of values returned by getNsRecord.
     */
    public suspend fun getNsRecord(argument: GetNsRecordPlainArgs): GetNsRecordResult =
        getNsRecordResultToKotlin(getNsRecordPlain(argument.toJava()).await())

    /**
     * @see [getNsRecord].
     * @param name The name of the DNS NS Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getNsRecord.
     */
    public suspend fun getNsRecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetNsRecordResult {
        val argument = GetNsRecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getNsRecordResultToKotlin(getNsRecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getNsRecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetNsRecordPlainArgs].
     * @return A collection of values returned by getNsRecord.
     */
    public suspend fun getNsRecord(argument: suspend GetNsRecordPlainArgsBuilder.() -> Unit): GetNsRecordResult {
        val builder = GetNsRecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getNsRecordResultToKotlin(getNsRecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getPtrRecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsPtrRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_ptr_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsPtrRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetPtrRecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsPtrRecordId"] = example.Apply(getPtrRecordResult => getPtrRecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.LookupPtrRecord(ctx, &dns.LookupPtrRecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsPtrRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetPtrRecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getPtrRecord(GetPtrRecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsPtrRecordId", example.applyValue(getPtrRecordResult -> getPtrRecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getPtrRecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsPtrRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getPtrRecord.
     * @return A collection of values returned by getPtrRecord.
     */
    public suspend fun getPtrRecord(argument: GetPtrRecordPlainArgs): GetPtrRecordResult =
        getPtrRecordResultToKotlin(getPtrRecordPlain(argument.toJava()).await())

    /**
     * @see [getPtrRecord].
     * @param name The name of the DNS PTR Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getPtrRecord.
     */
    public suspend fun getPtrRecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetPtrRecordResult {
        val argument = GetPtrRecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getPtrRecordResultToKotlin(getPtrRecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getPtrRecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetPtrRecordPlainArgs].
     * @return A collection of values returned by getPtrRecord.
     */
    public suspend fun getPtrRecord(argument: suspend GetPtrRecordPlainArgsBuilder.() -> Unit): GetPtrRecordResult {
        val builder = GetPtrRecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getPtrRecordResultToKotlin(getPtrRecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getSoaRecord({
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsSoaRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_soa_record(zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsSoaRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetSoaRecord.Invoke(new()
     *     {
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsSoaRecordId"] = example.Apply(getSoaRecordResult => getSoaRecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.GetSoaRecord(ctx, &dns.GetSoaRecordArgs{
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsSoaRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetSoaRecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getSoaRecord(GetSoaRecordArgs.builder()
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsSoaRecordId", example.applyValue(getSoaRecordResult -> getSoaRecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getSoaRecord
     *       Arguments:
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsSoaRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getSoaRecord.
     * @return A collection of values returned by getSoaRecord.
     */
    public suspend fun getSoaRecord(argument: GetSoaRecordPlainArgs): GetSoaRecordResult =
        getSoaRecordResultToKotlin(getSoaRecordPlain(argument.toJava()).await())

    /**
     * @see [getSoaRecord].
     * @param name The name of the DNS SOA Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getSoaRecord.
     */
    public suspend fun getSoaRecord(
        name: String? = null,
        resourceGroupName: String,
        zoneName: String,
    ): GetSoaRecordResult {
        val argument = GetSoaRecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getSoaRecordResultToKotlin(getSoaRecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getSoaRecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetSoaRecordPlainArgs].
     * @return A collection of values returned by getSoaRecord.
     */
    public suspend fun getSoaRecord(argument: suspend GetSoaRecordPlainArgsBuilder.() -> Unit): GetSoaRecordResult {
        val builder = GetSoaRecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getSoaRecordResultToKotlin(getSoaRecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getSrvRecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsSrvRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_srv_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsSrvRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetSrvRecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsSrvRecordId"] = example.Apply(getSrvRecordResult => getSrvRecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.LookupSrvRecord(ctx, &dns.LookupSrvRecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsSrvRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetSrvRecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getSrvRecord(GetSrvRecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsSrvRecordId", example.applyValue(getSrvRecordResult -> getSrvRecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getSrvRecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsSrvRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getSrvRecord.
     * @return A collection of values returned by getSrvRecord.
     */
    public suspend fun getSrvRecord(argument: GetSrvRecordPlainArgs): GetSrvRecordResult =
        getSrvRecordResultToKotlin(getSrvRecordPlain(argument.toJava()).await())

    /**
     * @see [getSrvRecord].
     * @param name The name of the DNS SRV Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getSrvRecord.
     */
    public suspend fun getSrvRecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetSrvRecordResult {
        val argument = GetSrvRecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getSrvRecordResultToKotlin(getSrvRecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getSrvRecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetSrvRecordPlainArgs].
     * @return A collection of values returned by getSrvRecord.
     */
    public suspend fun getSrvRecord(argument: suspend GetSrvRecordPlainArgsBuilder.() -> Unit): GetSrvRecordResult {
        val builder = GetSrvRecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getSrvRecordResultToKotlin(getSrvRecordPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getTxtRecord({
     *     name: "test",
     *     zoneName: "test-zone",
     *     resourceGroupName: "test-rg",
     * });
     * export const dnsTxtRecordId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_txt_record(name="test",
     *     zone_name="test-zone",
     *     resource_group_name="test-rg")
     * pulumi.export("dnsTxtRecordId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetTxtRecord.Invoke(new()
     *     {
     *         Name = "test",
     *         ZoneName = "test-zone",
     *         ResourceGroupName = "test-rg",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsTxtRecordId"] = example.Apply(getTxtRecordResult => getTxtRecordResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.LookupTxtRecord(ctx, &dns.LookupTxtRecordArgs{
     * 			Name:              "test",
     * 			ZoneName:          "test-zone",
     * 			ResourceGroupName: "test-rg",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsTxtRecordId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetTxtRecordArgs;
     * 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) {
     *         final var example = DnsFunctions.getTxtRecord(GetTxtRecordArgs.builder()
     *             .name("test")
     *             .zoneName("test-zone")
     *             .resourceGroupName("test-rg")
     *             .build());
     *         ctx.export("dnsTxtRecordId", example.applyValue(getTxtRecordResult -> getTxtRecordResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getTxtRecord
     *       Arguments:
     *         name: test
     *         zoneName: test-zone
     *         resourceGroupName: test-rg
     * outputs:
     *   dnsTxtRecordId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getTxtRecord.
     * @return A collection of values returned by getTxtRecord.
     */
    public suspend fun getTxtRecord(argument: GetTxtRecordPlainArgs): GetTxtRecordResult =
        getTxtRecordResultToKotlin(getTxtRecordPlain(argument.toJava()).await())

    /**
     * @see [getTxtRecord].
     * @param name The name of the DNS TXT Record.
     * @param resourceGroupName Specifies the resource group where the DNS Zone (parent resource) exists.
     * @param zoneName Specifies the DNS Zone where the resource exists.
     * @return A collection of values returned by getTxtRecord.
     */
    public suspend fun getTxtRecord(
        name: String,
        resourceGroupName: String,
        zoneName: String,
    ): GetTxtRecordResult {
        val argument = GetTxtRecordPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
            zoneName = zoneName,
        )
        return getTxtRecordResultToKotlin(getTxtRecordPlain(argument.toJava()).await())
    }

    /**
     * @see [getTxtRecord].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetTxtRecordPlainArgs].
     * @return A collection of values returned by getTxtRecord.
     */
    public suspend fun getTxtRecord(argument: suspend GetTxtRecordPlainArgsBuilder.() -> Unit): GetTxtRecordResult {
        val builder = GetTxtRecordPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getTxtRecordResultToKotlin(getTxtRecordPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing DNS Zone.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.dns.getZone({
     *     name: "search-eventhubns",
     *     resourceGroupName: "search-service",
     * });
     * export const dnsZoneId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.dns.get_zone(name="search-eventhubns",
     *     resource_group_name="search-service")
     * pulumi.export("dnsZoneId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Dns.GetZone.Invoke(new()
     *     {
     *         Name = "search-eventhubns",
     *         ResourceGroupName = "search-service",
     *     });
     *     return new Dictionary
     *     {
     *         ["dnsZoneId"] = example.Apply(getZoneResult => getZoneResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := dns.LookupZone(ctx, &dns.LookupZoneArgs{
     * 			Name:              "search-eventhubns",
     * 			ResourceGroupName: pulumi.StringRef("search-service"),
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("dnsZoneId", example.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.dns.DnsFunctions;
     * import com.pulumi.azure.dns.inputs.GetZoneArgs;
     * 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) {
     *         final var example = DnsFunctions.getZone(GetZoneArgs.builder()
     *             .name("search-eventhubns")
     *             .resourceGroupName("search-service")
     *             .build());
     *         ctx.export("dnsZoneId", example.applyValue(getZoneResult -> getZoneResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:dns:getZone
     *       Arguments:
     *         name: search-eventhubns
     *         resourceGroupName: search-service
     * outputs:
     *   dnsZoneId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getZone.
     * @return A collection of values returned by getZone.
     */
    public suspend fun getZone(argument: GetZonePlainArgs): GetZoneResult =
        getZoneResultToKotlin(getZonePlain(argument.toJava()).await())

    /**
     * @see [getZone].
     * @param name The name of the DNS Zone.
     * @param resourceGroupName The Name of the Resource Group where the DNS Zone exists.
     * If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones
     * in your subscription that matches `name` will be returned.
     * @return A collection of values returned by getZone.
     */
    public suspend fun getZone(name: String, resourceGroupName: String? = null): GetZoneResult {
        val argument = GetZonePlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getZoneResultToKotlin(getZonePlain(argument.toJava()).await())
    }

    /**
     * @see [getZone].
     * @param argument Builder for [com.pulumi.azure.dns.kotlin.inputs.GetZonePlainArgs].
     * @return A collection of values returned by getZone.
     */
    public suspend fun getZone(argument: suspend GetZonePlainArgsBuilder.() -> Unit): GetZoneResult {
        val builder = GetZonePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getZoneResultToKotlin(getZonePlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy