1. Packages
  2. Unifi
  3. API Docs
  4. dns
  5. getRecords
Viewing docs for Unifi v0.2.0
published on Tuesday, Feb 17, 2026 by Pulumiverse
unifi logo
Viewing docs for Unifi v0.2.0
published on Tuesday, Feb 17, 2026 by Pulumiverse

    Retrieves information about a all DNS records.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumiverse/unifi";
    
    const _default = unifi.dns.getRecords({});
    
    import pulumi
    import pulumi_unifi as unifi
    
    default = unifi.dns.get_records()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/dns"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dns.LookupRecords(ctx, &dns.LookupRecordsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Unifi = Pulumiverse.Unifi;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Unifi.Dns.GetRecords.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.unifi.dns.DnsFunctions;
    import com.pulumi.unifi.dns.inputs.GetRecordsArgs;
    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 default = DnsFunctions.getRecords(GetRecordsArgs.builder()
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          function: unifi:dns:getRecords
          arguments: {}
    

    Using getRecords

    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 getRecords(args: GetRecordsArgs, opts?: InvokeOptions): Promise<GetRecordsResult>
    function getRecordsOutput(args: GetRecordsOutputArgs, opts?: InvokeOptions): Output<GetRecordsResult>
    def get_records(site: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetRecordsResult
    def get_records_output(site: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetRecordsResult]
    func LookupRecords(ctx *Context, args *LookupRecordsArgs, opts ...InvokeOption) (*LookupRecordsResult, error)
    func LookupRecordsOutput(ctx *Context, args *LookupRecordsOutputArgs, opts ...InvokeOption) LookupRecordsResultOutput

    > Note: This function is named LookupRecords in the Go SDK.

    public static class GetRecords 
    {
        public static Task<GetRecordsResult> InvokeAsync(GetRecordsArgs args, InvokeOptions? opts = null)
        public static Output<GetRecordsResult> Invoke(GetRecordsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRecordsResult> getRecords(GetRecordsArgs args, InvokeOptions options)
    public static Output<GetRecordsResult> getRecords(GetRecordsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: unifi:dns/getRecords:getRecords
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    site str
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.

    getRecords Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<Pulumiverse.Unifi.Dns.Outputs.GetRecordsResult>
    The list of DNS records.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetRecordsResult
    The list of DNS records.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetRecordsResult>
    The list of DNS records.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    id string
    The provider-assigned unique ID for this managed resource.
    results GetRecordsResult[]
    The list of DNS records.
    site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetRecordsResult]
    The list of DNS records.
    site str
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    The list of DNS records.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.

    Supporting Types

    GetRecordsResult

    Enabled bool
    Whether the DNS record is enabled.
    Id string
    The unique identifier of this resource.
    Name string
    DNS record name.
    Port int
    The port of the DNS record.
    Priority int
    Priority of the DNS records. Present only for MX and SRV records; unused by other record types.
    Record string
    DNS record content.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Ttl int
    Time To Live (TTL) of the DNS record in seconds. Setting to 0 means 'automatic'.
    Type string
    The type of the DNS record.
    Weight int
    A numeric value indicating the relative weight of the record.
    Enabled bool
    Whether the DNS record is enabled.
    Id string
    The unique identifier of this resource.
    Name string
    DNS record name.
    Port int
    The port of the DNS record.
    Priority int
    Priority of the DNS records. Present only for MX and SRV records; unused by other record types.
    Record string
    DNS record content.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Ttl int
    Time To Live (TTL) of the DNS record in seconds. Setting to 0 means 'automatic'.
    Type string
    The type of the DNS record.
    Weight int
    A numeric value indicating the relative weight of the record.
    enabled Boolean
    Whether the DNS record is enabled.
    id String
    The unique identifier of this resource.
    name String
    DNS record name.
    port Integer
    The port of the DNS record.
    priority Integer
    Priority of the DNS records. Present only for MX and SRV records; unused by other record types.
    record String
    DNS record content.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    ttl Integer
    Time To Live (TTL) of the DNS record in seconds. Setting to 0 means 'automatic'.
    type String
    The type of the DNS record.
    weight Integer
    A numeric value indicating the relative weight of the record.
    enabled boolean
    Whether the DNS record is enabled.
    id string
    The unique identifier of this resource.
    name string
    DNS record name.
    port number
    The port of the DNS record.
    priority number
    Priority of the DNS records. Present only for MX and SRV records; unused by other record types.
    record string
    DNS record content.
    site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    ttl number
    Time To Live (TTL) of the DNS record in seconds. Setting to 0 means 'automatic'.
    type string
    The type of the DNS record.
    weight number
    A numeric value indicating the relative weight of the record.
    enabled bool
    Whether the DNS record is enabled.
    id str
    The unique identifier of this resource.
    name str
    DNS record name.
    port int
    The port of the DNS record.
    priority int
    Priority of the DNS records. Present only for MX and SRV records; unused by other record types.
    record str
    DNS record content.
    site str
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    ttl int
    Time To Live (TTL) of the DNS record in seconds. Setting to 0 means 'automatic'.
    type str
    The type of the DNS record.
    weight int
    A numeric value indicating the relative weight of the record.
    enabled Boolean
    Whether the DNS record is enabled.
    id String
    The unique identifier of this resource.
    name String
    DNS record name.
    port Number
    The port of the DNS record.
    priority Number
    Priority of the DNS records. Present only for MX and SRV records; unused by other record types.
    record String
    DNS record content.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    ttl Number
    Time To Live (TTL) of the DNS record in seconds. Setting to 0 means 'automatic'.
    type String
    The type of the DNS record.
    weight Number
    A numeric value indicating the relative weight of the record.

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Viewing docs for Unifi v0.2.0
    published on Tuesday, Feb 17, 2026 by Pulumiverse
      Try Pulumi Cloud free. Your team will thank you.