We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.dns.getSoaRecord
Explore with Pulumi AI
Example Usage
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);
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)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/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
	})
}
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<string, object?>
    {
        ["dnsSoaRecordId"] = example.Apply(getSoaRecordResult => getSoaRecordResult.Id),
    };
});
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()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:dns:getSoaRecord
      arguments:
        zoneName: test-zone
        resourceGroupName: test-rg
outputs:
  dnsSoaRecordId: ${example.id}
Using getSoaRecord
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSoaRecord(args: GetSoaRecordArgs, opts?: InvokeOptions): Promise<GetSoaRecordResult>
function getSoaRecordOutput(args: GetSoaRecordOutputArgs, opts?: InvokeOptions): Output<GetSoaRecordResult>def get_soa_record(name: Optional[str] = None,
                   resource_group_name: Optional[str] = None,
                   zone_name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetSoaRecordResult
def get_soa_record_output(name: Optional[pulumi.Input[str]] = None,
                   resource_group_name: Optional[pulumi.Input[str]] = None,
                   zone_name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetSoaRecordResult]func GetSoaRecord(ctx *Context, args *GetSoaRecordArgs, opts ...InvokeOption) (*GetSoaRecordResult, error)
func GetSoaRecordOutput(ctx *Context, args *GetSoaRecordOutputArgs, opts ...InvokeOption) GetSoaRecordResultOutput> Note: This function is named GetSoaRecord in the Go SDK.
public static class GetSoaRecord 
{
    public static Task<GetSoaRecordResult> InvokeAsync(GetSoaRecordArgs args, InvokeOptions? opts = null)
    public static Output<GetSoaRecordResult> Invoke(GetSoaRecordInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSoaRecordResult> getSoaRecord(GetSoaRecordArgs args, InvokeOptions options)
public static Output<GetSoaRecordResult> getSoaRecord(GetSoaRecordArgs args, InvokeOptions options)
fn::invoke:
  function: azure:dns/getSoaRecord:getSoaRecord
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ResourceGroup stringName 
- Specifies the resource group where the DNS Zone (parent resource) exists.
- ZoneName string
- Specifies the DNS Zone where the resource exists.
- Name string
- The name of the DNS SOA Record.
- ResourceGroup stringName 
- Specifies the resource group where the DNS Zone (parent resource) exists.
- ZoneName string
- Specifies the DNS Zone where the resource exists.
- Name string
- The name of the DNS SOA Record.
- resourceGroup StringName 
- Specifies the resource group where the DNS Zone (parent resource) exists.
- zoneName String
- Specifies the DNS Zone where the resource exists.
- name String
- The name of the DNS SOA Record.
- resourceGroup stringName 
- Specifies the resource group where the DNS Zone (parent resource) exists.
- zoneName string
- Specifies the DNS Zone where the resource exists.
- name string
- The name of the DNS SOA Record.
- resource_group_ strname 
- Specifies the resource group where the DNS Zone (parent resource) exists.
- zone_name str
- Specifies the DNS Zone where the resource exists.
- name str
- The name of the DNS SOA Record.
- resourceGroup StringName 
- Specifies the resource group where the DNS Zone (parent resource) exists.
- zoneName String
- Specifies the DNS Zone where the resource exists.
- name String
- The name of the DNS SOA Record.
getSoaRecord Result
The following output properties are available:
- Email string
- The email contact for the SOA record.
- ExpireTime int
- The expire time for the SOA record.
- Fqdn string
- The FQDN of the DNS SOA Record.
- HostName string
- The domain name of the authoritative name server for the SOA record.
- Id string
- The provider-assigned unique ID for this managed resource.
- MinimumTtl int
- The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
- RefreshTime int
- The refresh time for the SOA record.
- ResourceGroup stringName 
- RetryTime int
- The retry time for the SOA record.
- SerialNumber int
- The serial number for the SOA record.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Ttl int
- The Time To Live (TTL) of the DNS record in seconds.
- ZoneName string
- Name string
- The name of the DNS SOA Record.
- Email string
- The email contact for the SOA record.
- ExpireTime int
- The expire time for the SOA record.
- Fqdn string
- The FQDN of the DNS SOA Record.
- HostName string
- The domain name of the authoritative name server for the SOA record.
- Id string
- The provider-assigned unique ID for this managed resource.
- MinimumTtl int
- The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
- RefreshTime int
- The refresh time for the SOA record.
- ResourceGroup stringName 
- RetryTime int
- The retry time for the SOA record.
- SerialNumber int
- The serial number for the SOA record.
- map[string]string
- A mapping of tags assigned to the resource.
- Ttl int
- The Time To Live (TTL) of the DNS record in seconds.
- ZoneName string
- Name string
- The name of the DNS SOA Record.
- email String
- The email contact for the SOA record.
- expireTime Integer
- The expire time for the SOA record.
- fqdn String
- The FQDN of the DNS SOA Record.
- hostName String
- The domain name of the authoritative name server for the SOA record.
- id String
- The provider-assigned unique ID for this managed resource.
- minimumTtl Integer
- The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
- refreshTime Integer
- The refresh time for the SOA record.
- resourceGroup StringName 
- retryTime Integer
- The retry time for the SOA record.
- serialNumber Integer
- The serial number for the SOA record.
- Map<String,String>
- A mapping of tags assigned to the resource.
- ttl Integer
- The Time To Live (TTL) of the DNS record in seconds.
- zoneName String
- name String
- The name of the DNS SOA Record.
- email string
- The email contact for the SOA record.
- expireTime number
- The expire time for the SOA record.
- fqdn string
- The FQDN of the DNS SOA Record.
- hostName string
- The domain name of the authoritative name server for the SOA record.
- id string
- The provider-assigned unique ID for this managed resource.
- minimumTtl number
- The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
- refreshTime number
- The refresh time for the SOA record.
- resourceGroup stringName 
- retryTime number
- The retry time for the SOA record.
- serialNumber number
- The serial number for the SOA record.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- ttl number
- The Time To Live (TTL) of the DNS record in seconds.
- zoneName string
- name string
- The name of the DNS SOA Record.
- email str
- The email contact for the SOA record.
- expire_time int
- The expire time for the SOA record.
- fqdn str
- The FQDN of the DNS SOA Record.
- host_name str
- The domain name of the authoritative name server for the SOA record.
- id str
- The provider-assigned unique ID for this managed resource.
- minimum_ttl int
- The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
- refresh_time int
- The refresh time for the SOA record.
- resource_group_ strname 
- retry_time int
- The retry time for the SOA record.
- serial_number int
- The serial number for the SOA record.
- Mapping[str, str]
- A mapping of tags assigned to the resource.
- ttl int
- The Time To Live (TTL) of the DNS record in seconds.
- zone_name str
- name str
- The name of the DNS SOA Record.
- email String
- The email contact for the SOA record.
- expireTime Number
- The expire time for the SOA record.
- fqdn String
- The FQDN of the DNS SOA Record.
- hostName String
- The domain name of the authoritative name server for the SOA record.
- id String
- The provider-assigned unique ID for this managed resource.
- minimumTtl Number
- The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
- refreshTime Number
- The refresh time for the SOA record.
- resourceGroup StringName 
- retryTime Number
- The retry time for the SOA record.
- serialNumber Number
- The serial number for the SOA record.
- Map<String>
- A mapping of tags assigned to the resource.
- ttl Number
- The Time To Live (TTL) of the DNS record in seconds.
- zoneName String
- name String
- The name of the DNS SOA Record.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.