1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getDnspodRecords
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getDnspodRecords

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query dnspod record list.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const record = tencentcloud.getDnspodRecords({
        domain: "example.com",
        subdomain: "www",
    });
    export const result = record.then(record => record.results);
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    record = tencentcloud.get_dnspod_records(domain="example.com",
        subdomain="www")
    pulumi.export("result", record.results)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		record, err := tencentcloud.LookupDnspodRecords(ctx, &tencentcloud.LookupDnspodRecordsArgs{
    			Domain:    pulumi.StringRef("example.com"),
    			Subdomain: pulumi.StringRef("www"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("result", record.Results)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var record = Tencentcloud.GetDnspodRecords.Invoke(new()
        {
            Domain = "example.com",
            Subdomain = "www",
        });
    
        return new Dictionary<string, object?>
        {
            ["result"] = record.Apply(getDnspodRecordsResult => getDnspodRecordsResult.Results),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetDnspodRecordsArgs;
    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 record = TencentcloudFunctions.getDnspodRecords(GetDnspodRecordsArgs.builder()
                .domain("example.com")
                .subdomain("www")
                .build());
    
            ctx.export("result", record.applyValue(getDnspodRecordsResult -> getDnspodRecordsResult.results()));
        }
    }
    
    variables:
      record:
        fn::invoke:
          function: tencentcloud:getDnspodRecords
          arguments:
            domain: example.com
            subdomain: www
    outputs:
      result: ${record.results}
    

    Use verbose filter

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const record = tencentcloud.getDnspodRecords({
        domain: "example.com",
        subdomain: "www",
        limit: 100,
        recordType: "TXT",
        sortField: "updated_on",
        sortType: "DESC",
    });
    export const result = record.then(record => record.results);
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    record = tencentcloud.get_dnspod_records(domain="example.com",
        subdomain="www",
        limit=100,
        record_type="TXT",
        sort_field="updated_on",
        sort_type="DESC")
    pulumi.export("result", record.results)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		record, err := tencentcloud.LookupDnspodRecords(ctx, &tencentcloud.LookupDnspodRecordsArgs{
    			Domain:     pulumi.StringRef("example.com"),
    			Subdomain:  pulumi.StringRef("www"),
    			Limit:      pulumi.Float64Ref(100),
    			RecordType: pulumi.StringRef("TXT"),
    			SortField:  pulumi.StringRef("updated_on"),
    			SortType:   pulumi.StringRef("DESC"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("result", record.Results)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var record = Tencentcloud.GetDnspodRecords.Invoke(new()
        {
            Domain = "example.com",
            Subdomain = "www",
            Limit = 100,
            RecordType = "TXT",
            SortField = "updated_on",
            SortType = "DESC",
        });
    
        return new Dictionary<string, object?>
        {
            ["result"] = record.Apply(getDnspodRecordsResult => getDnspodRecordsResult.Results),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetDnspodRecordsArgs;
    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 record = TencentcloudFunctions.getDnspodRecords(GetDnspodRecordsArgs.builder()
                .domain("example.com")
                .subdomain("www")
                .limit(100)
                .recordType("TXT")
                .sortField("updated_on")
                .sortType("DESC")
                .build());
    
            ctx.export("result", record.applyValue(getDnspodRecordsResult -> getDnspodRecordsResult.results()));
        }
    }
    
    variables:
      record:
        fn::invoke:
          function: tencentcloud:getDnspodRecords
          arguments:
            domain: example.com
            subdomain: www
            limit: 100
            recordType: TXT
            sortField: updated_on
            sortType: DESC
    outputs:
      result: ${record.results}
    

    Using getDnspodRecords

    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 getDnspodRecords(args: GetDnspodRecordsArgs, opts?: InvokeOptions): Promise<GetDnspodRecordsResult>
    function getDnspodRecordsOutput(args: GetDnspodRecordsOutputArgs, opts?: InvokeOptions): Output<GetDnspodRecordsResult>
    def get_dnspod_records(domain: Optional[str] = None,
                           domain_id: Optional[str] = None,
                           group_id: Optional[str] = None,
                           id: Optional[str] = None,
                           keyword: Optional[str] = None,
                           limit: Optional[float] = None,
                           offset: Optional[float] = None,
                           record_line: Optional[str] = None,
                           record_line_id: Optional[str] = None,
                           record_type: Optional[str] = None,
                           result_output_file: Optional[str] = None,
                           sort_field: Optional[str] = None,
                           sort_type: Optional[str] = None,
                           subdomain: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDnspodRecordsResult
    def get_dnspod_records_output(domain: Optional[pulumi.Input[str]] = None,
                           domain_id: Optional[pulumi.Input[str]] = None,
                           group_id: Optional[pulumi.Input[str]] = None,
                           id: Optional[pulumi.Input[str]] = None,
                           keyword: Optional[pulumi.Input[str]] = None,
                           limit: Optional[pulumi.Input[float]] = None,
                           offset: Optional[pulumi.Input[float]] = None,
                           record_line: Optional[pulumi.Input[str]] = None,
                           record_line_id: Optional[pulumi.Input[str]] = None,
                           record_type: Optional[pulumi.Input[str]] = None,
                           result_output_file: Optional[pulumi.Input[str]] = None,
                           sort_field: Optional[pulumi.Input[str]] = None,
                           sort_type: Optional[pulumi.Input[str]] = None,
                           subdomain: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDnspodRecordsResult]
    func LookupDnspodRecords(ctx *Context, args *LookupDnspodRecordsArgs, opts ...InvokeOption) (*LookupDnspodRecordsResult, error)
    func LookupDnspodRecordsOutput(ctx *Context, args *LookupDnspodRecordsOutputArgs, opts ...InvokeOption) LookupDnspodRecordsResultOutput

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

    public static class GetDnspodRecords 
    {
        public static Task<GetDnspodRecordsResult> InvokeAsync(GetDnspodRecordsArgs args, InvokeOptions? opts = null)
        public static Output<GetDnspodRecordsResult> Invoke(GetDnspodRecordsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDnspodRecordsResult> getDnspodRecords(GetDnspodRecordsArgs args, InvokeOptions options)
    public static Output<GetDnspodRecordsResult> getDnspodRecords(GetDnspodRecordsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getDnspodRecords:getDnspodRecords
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Domain string
    The domain for which DNS records are to be obtained.
    DomainId string
    The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
    GroupId string
    The group ID.
    Id string
    Keyword string
    The keyword for searching for DNS records. Host headers and record values are supported.
    Limit double
    The limit. It defaults to 100 and can be up to 3,000.
    Offset double
    The offset. Default value: 0.
    RecordLine string
    The split zone name.
    RecordLineId string
    The split zone ID. If record_line_id is passed in, the system will omit the parameter record_line.
    RecordType string
    The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
    ResultOutputFile string
    Used for store query result as JSON.
    SortField string
    The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
    SortType string
    The sorting type. Valid values: ASC (ascending, default), DESC (descending).
    Subdomain string
    The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.
    Domain string
    The domain for which DNS records are to be obtained.
    DomainId string
    The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
    GroupId string
    The group ID.
    Id string
    Keyword string
    The keyword for searching for DNS records. Host headers and record values are supported.
    Limit float64
    The limit. It defaults to 100 and can be up to 3,000.
    Offset float64
    The offset. Default value: 0.
    RecordLine string
    The split zone name.
    RecordLineId string
    The split zone ID. If record_line_id is passed in, the system will omit the parameter record_line.
    RecordType string
    The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
    ResultOutputFile string
    Used for store query result as JSON.
    SortField string
    The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
    SortType string
    The sorting type. Valid values: ASC (ascending, default), DESC (descending).
    Subdomain string
    The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.
    domain String
    The domain for which DNS records are to be obtained.
    domainId String
    The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
    groupId String
    The group ID.
    id String
    keyword String
    The keyword for searching for DNS records. Host headers and record values are supported.
    limit Double
    The limit. It defaults to 100 and can be up to 3,000.
    offset Double
    The offset. Default value: 0.
    recordLine String
    The split zone name.
    recordLineId String
    The split zone ID. If record_line_id is passed in, the system will omit the parameter record_line.
    recordType String
    The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
    resultOutputFile String
    Used for store query result as JSON.
    sortField String
    The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
    sortType String
    The sorting type. Valid values: ASC (ascending, default), DESC (descending).
    subdomain String
    The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.
    domain string
    The domain for which DNS records are to be obtained.
    domainId string
    The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
    groupId string
    The group ID.
    id string
    keyword string
    The keyword for searching for DNS records. Host headers and record values are supported.
    limit number
    The limit. It defaults to 100 and can be up to 3,000.
    offset number
    The offset. Default value: 0.
    recordLine string
    The split zone name.
    recordLineId string
    The split zone ID. If record_line_id is passed in, the system will omit the parameter record_line.
    recordType string
    The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
    resultOutputFile string
    Used for store query result as JSON.
    sortField string
    The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
    sortType string
    The sorting type. Valid values: ASC (ascending, default), DESC (descending).
    subdomain string
    The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.
    domain str
    The domain for which DNS records are to be obtained.
    domain_id str
    The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
    group_id str
    The group ID.
    id str
    keyword str
    The keyword for searching for DNS records. Host headers and record values are supported.
    limit float
    The limit. It defaults to 100 and can be up to 3,000.
    offset float
    The offset. Default value: 0.
    record_line str
    The split zone name.
    record_line_id str
    The split zone ID. If record_line_id is passed in, the system will omit the parameter record_line.
    record_type str
    The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
    result_output_file str
    Used for store query result as JSON.
    sort_field str
    The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
    sort_type str
    The sorting type. Valid values: ASC (ascending, default), DESC (descending).
    subdomain str
    The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.
    domain String
    The domain for which DNS records are to be obtained.
    domainId String
    The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
    groupId String
    The group ID.
    id String
    keyword String
    The keyword for searching for DNS records. Host headers and record values are supported.
    limit Number
    The limit. It defaults to 100 and can be up to 3,000.
    offset Number
    The offset. Default value: 0.
    recordLine String
    The split zone name.
    recordLineId String
    The split zone ID. If record_line_id is passed in, the system will omit the parameter record_line.
    recordType String
    The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
    resultOutputFile String
    Used for store query result as JSON.
    sortField String
    The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
    sortType String
    The sorting type. Valid values: ASC (ascending, default), DESC (descending).
    subdomain String
    The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.

    getDnspodRecords Result

    The following output properties are available:

    Id string
    RecordCountInfos List<GetDnspodRecordsRecordCountInfo>
    Count info of the queried record list.
    Results List<GetDnspodRecordsResult>
    The record list result.
    Domain string
    DomainId string
    GroupId string
    Keyword string
    Limit double
    Offset double
    RecordLine string
    RecordLineId string
    RecordType string
    ResultOutputFile string
    SortField string
    SortType string
    Subdomain string
    Id string
    RecordCountInfos []GetDnspodRecordsRecordCountInfo
    Count info of the queried record list.
    Results []GetDnspodRecordsResult
    The record list result.
    Domain string
    DomainId string
    GroupId string
    Keyword string
    Limit float64
    Offset float64
    RecordLine string
    RecordLineId string
    RecordType string
    ResultOutputFile string
    SortField string
    SortType string
    Subdomain string
    id String
    recordCountInfos List<GetDnspodRecordsRecordCountInfo>
    Count info of the queried record list.
    results List<GetDnspodRecordsResult>
    The record list result.
    domain String
    domainId String
    groupId String
    keyword String
    limit Double
    offset Double
    recordLine String
    recordLineId String
    recordType String
    resultOutputFile String
    sortField String
    sortType String
    subdomain String
    id string
    recordCountInfos GetDnspodRecordsRecordCountInfo[]
    Count info of the queried record list.
    results GetDnspodRecordsResult[]
    The record list result.
    domain string
    domainId string
    groupId string
    keyword string
    limit number
    offset number
    recordLine string
    recordLineId string
    recordType string
    resultOutputFile string
    sortField string
    sortType string
    subdomain string
    id String
    recordCountInfos List<Property Map>
    Count info of the queried record list.
    results List<Property Map>
    The record list result.
    domain String
    domainId String
    groupId String
    keyword String
    limit Number
    offset Number
    recordLine String
    recordLineId String
    recordType String
    resultOutputFile String
    sortField String
    sortType String
    subdomain String

    Supporting Types

    GetDnspodRecordsRecordCountInfo

    ListCount double
    The count of records returned in the list.
    SubdomainCount double
    The subdomain count.
    TotalCount double
    The total record count.
    ListCount float64
    The count of records returned in the list.
    SubdomainCount float64
    The subdomain count.
    TotalCount float64
    The total record count.
    listCount Double
    The count of records returned in the list.
    subdomainCount Double
    The subdomain count.
    totalCount Double
    The total record count.
    listCount number
    The count of records returned in the list.
    subdomainCount number
    The subdomain count.
    totalCount number
    The total record count.
    list_count float
    The count of records returned in the list.
    subdomain_count float
    The subdomain count.
    total_count float
    The total record count.
    listCount Number
    The count of records returned in the list.
    subdomainCount Number
    The subdomain count.
    totalCount Number
    The total record count.

    GetDnspodRecordsResult

    Line string
    The record split zone.
    LineId string
    The split zone ID.
    MonitorStatus string
    The monitoring status of the record. Valid values: OK (normal), WARN (warning), and DOWN (downtime). It is empty if no monitoring is set or the monitoring is suspended.
    Mx double
    The MX value, applicable to the MX record only. Note: This field may return null, indicating that no valid values can be obtained.
    Name string
    The host name.
    RecordId double
    Record ID.
    Remark string
    The record remarks.
    Status string
    The record status. Valid values: ENABLE (enabled), DISABLE (disabled).
    Ttl double
    The record cache time.
    Type string
    The record type.
    UpdatedOn string
    The update time.
    Value string
    The record value.
    Weight double
    The record weight, which is required for round-robin DNS records.
    Line string
    The record split zone.
    LineId string
    The split zone ID.
    MonitorStatus string
    The monitoring status of the record. Valid values: OK (normal), WARN (warning), and DOWN (downtime). It is empty if no monitoring is set or the monitoring is suspended.
    Mx float64
    The MX value, applicable to the MX record only. Note: This field may return null, indicating that no valid values can be obtained.
    Name string
    The host name.
    RecordId float64
    Record ID.
    Remark string
    The record remarks.
    Status string
    The record status. Valid values: ENABLE (enabled), DISABLE (disabled).
    Ttl float64
    The record cache time.
    Type string
    The record type.
    UpdatedOn string
    The update time.
    Value string
    The record value.
    Weight float64
    The record weight, which is required for round-robin DNS records.
    line String
    The record split zone.
    lineId String
    The split zone ID.
    monitorStatus String
    The monitoring status of the record. Valid values: OK (normal), WARN (warning), and DOWN (downtime). It is empty if no monitoring is set or the monitoring is suspended.
    mx Double
    The MX value, applicable to the MX record only. Note: This field may return null, indicating that no valid values can be obtained.
    name String
    The host name.
    recordId Double
    Record ID.
    remark String
    The record remarks.
    status String
    The record status. Valid values: ENABLE (enabled), DISABLE (disabled).
    ttl Double
    The record cache time.
    type String
    The record type.
    updatedOn String
    The update time.
    value String
    The record value.
    weight Double
    The record weight, which is required for round-robin DNS records.
    line string
    The record split zone.
    lineId string
    The split zone ID.
    monitorStatus string
    The monitoring status of the record. Valid values: OK (normal), WARN (warning), and DOWN (downtime). It is empty if no monitoring is set or the monitoring is suspended.
    mx number
    The MX value, applicable to the MX record only. Note: This field may return null, indicating that no valid values can be obtained.
    name string
    The host name.
    recordId number
    Record ID.
    remark string
    The record remarks.
    status string
    The record status. Valid values: ENABLE (enabled), DISABLE (disabled).
    ttl number
    The record cache time.
    type string
    The record type.
    updatedOn string
    The update time.
    value string
    The record value.
    weight number
    The record weight, which is required for round-robin DNS records.
    line str
    The record split zone.
    line_id str
    The split zone ID.
    monitor_status str
    The monitoring status of the record. Valid values: OK (normal), WARN (warning), and DOWN (downtime). It is empty if no monitoring is set or the monitoring is suspended.
    mx float
    The MX value, applicable to the MX record only. Note: This field may return null, indicating that no valid values can be obtained.
    name str
    The host name.
    record_id float
    Record ID.
    remark str
    The record remarks.
    status str
    The record status. Valid values: ENABLE (enabled), DISABLE (disabled).
    ttl float
    The record cache time.
    type str
    The record type.
    updated_on str
    The update time.
    value str
    The record value.
    weight float
    The record weight, which is required for round-robin DNS records.
    line String
    The record split zone.
    lineId String
    The split zone ID.
    monitorStatus String
    The monitoring status of the record. Valid values: OK (normal), WARN (warning), and DOWN (downtime). It is empty if no monitoring is set or the monitoring is suspended.
    mx Number
    The MX value, applicable to the MX record only. Note: This field may return null, indicating that no valid values can be obtained.
    name String
    The host name.
    recordId Number
    Record ID.
    remark String
    The record remarks.
    status String
    The record status. Valid values: ENABLE (enabled), DISABLE (disabled).
    ttl Number
    The record cache time.
    type String
    The record type.
    updatedOn String
    The update time.
    value String
    The record value.
    weight Number
    The record weight, which is required for round-robin DNS records.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack