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

tencentcloud.getPrivateDnsRecords

Explore with Pulumi AI

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

    Use this data source to query detailed information of private dns records

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const privateDnsRecord = tencentcloud.getPrivateDnsRecords({
        filters: [{
            name: "Value",
            values: ["8.8.8.8"],
        }],
        zoneId: "zone-xxxxxx",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    private_dns_record = tencentcloud.get_private_dns_records(filters=[{
            "name": "Value",
            "values": ["8.8.8.8"],
        }],
        zone_id="zone-xxxxxx")
    
    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 {
    		_, err := tencentcloud.GetPrivateDnsRecords(ctx, &tencentcloud.GetPrivateDnsRecordsArgs{
    			Filters: []tencentcloud.GetPrivateDnsRecordsFilter{
    				{
    					Name: "Value",
    					Values: []string{
    						"8.8.8.8",
    					},
    				},
    			},
    			ZoneId: "zone-xxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var privateDnsRecord = Tencentcloud.GetPrivateDnsRecords.Invoke(new()
        {
            Filters = new[]
            {
                new Tencentcloud.Inputs.GetPrivateDnsRecordsFilterInputArgs
                {
                    Name = "Value",
                    Values = new[]
                    {
                        "8.8.8.8",
                    },
                },
            },
            ZoneId = "zone-xxxxxx",
        });
    
    });
    
    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.GetPrivateDnsRecordsArgs;
    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 privateDnsRecord = TencentcloudFunctions.getPrivateDnsRecords(GetPrivateDnsRecordsArgs.builder()
                .filters(GetPrivateDnsRecordsFilterArgs.builder()
                    .name("Value")
                    .values("8.8.8.8")
                    .build())
                .zoneId("zone-xxxxxx")
                .build());
    
        }
    }
    
    variables:
      privateDnsRecord:
        fn::invoke:
          function: tencentcloud:getPrivateDnsRecords
          arguments:
            filters:
              - name: Value
                values:
                  - 8.8.8.8
            zoneId: zone-xxxxxx
    

    Using getPrivateDnsRecords

    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 getPrivateDnsRecords(args: GetPrivateDnsRecordsArgs, opts?: InvokeOptions): Promise<GetPrivateDnsRecordsResult>
    function getPrivateDnsRecordsOutput(args: GetPrivateDnsRecordsOutputArgs, opts?: InvokeOptions): Output<GetPrivateDnsRecordsResult>
    def get_private_dns_records(filters: Optional[Sequence[GetPrivateDnsRecordsFilter]] = None,
                                id: Optional[str] = None,
                                result_output_file: Optional[str] = None,
                                zone_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetPrivateDnsRecordsResult
    def get_private_dns_records_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPrivateDnsRecordsFilterArgs]]]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                result_output_file: Optional[pulumi.Input[str]] = None,
                                zone_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetPrivateDnsRecordsResult]
    func GetPrivateDnsRecords(ctx *Context, args *GetPrivateDnsRecordsArgs, opts ...InvokeOption) (*GetPrivateDnsRecordsResult, error)
    func GetPrivateDnsRecordsOutput(ctx *Context, args *GetPrivateDnsRecordsOutputArgs, opts ...InvokeOption) GetPrivateDnsRecordsResultOutput

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

    public static class GetPrivateDnsRecords 
    {
        public static Task<GetPrivateDnsRecordsResult> InvokeAsync(GetPrivateDnsRecordsArgs args, InvokeOptions? opts = null)
        public static Output<GetPrivateDnsRecordsResult> Invoke(GetPrivateDnsRecordsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPrivateDnsRecordsResult> getPrivateDnsRecords(GetPrivateDnsRecordsArgs args, InvokeOptions options)
    public static Output<GetPrivateDnsRecordsResult> getPrivateDnsRecords(GetPrivateDnsRecordsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getPrivateDnsRecords:getPrivateDnsRecords
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    Private zone id: zone-xxxxxx.
    Filters List<GetPrivateDnsRecordsFilter>
    Filter parameters (Value and RecordType filtering are supported).
    Id string
    ResultOutputFile string
    Used to save results.
    ZoneId string
    Private zone id: zone-xxxxxx.
    Filters []GetPrivateDnsRecordsFilter
    Filter parameters (Value and RecordType filtering are supported).
    Id string
    ResultOutputFile string
    Used to save results.
    zoneId String
    Private zone id: zone-xxxxxx.
    filters List<GetPrivateDnsRecordsFilter>
    Filter parameters (Value and RecordType filtering are supported).
    id String
    resultOutputFile String
    Used to save results.
    zoneId string
    Private zone id: zone-xxxxxx.
    filters GetPrivateDnsRecordsFilter[]
    Filter parameters (Value and RecordType filtering are supported).
    id string
    resultOutputFile string
    Used to save results.
    zone_id str
    Private zone id: zone-xxxxxx.
    filters Sequence[GetPrivateDnsRecordsFilter]
    Filter parameters (Value and RecordType filtering are supported).
    id str
    result_output_file str
    Used to save results.
    zoneId String
    Private zone id: zone-xxxxxx.
    filters List<Property Map>
    Filter parameters (Value and RecordType filtering are supported).
    id String
    resultOutputFile String
    Used to save results.

    getPrivateDnsRecords Result

    The following output properties are available:

    Id string
    RecordSets []GetPrivateDnsRecordsRecordSet
    Parse record list.
    ZoneId string
    Private zone id: zone-xxxxxx.
    Filters []GetPrivateDnsRecordsFilter
    ResultOutputFile string
    id string
    recordSets GetPrivateDnsRecordsRecordSet[]
    Parse record list.
    zoneId string
    Private zone id: zone-xxxxxx.
    filters GetPrivateDnsRecordsFilter[]
    resultOutputFile string
    id String
    recordSets List<Property Map>
    Parse record list.
    zoneId String
    Private zone id: zone-xxxxxx.
    filters List<Property Map>
    resultOutputFile String

    Supporting Types

    GetPrivateDnsRecordsFilter

    Name string
    Parameter name.
    Values List<string>
    Parameter values.
    Name string
    Parameter name.
    Values []string
    Parameter values.
    name String
    Parameter name.
    values List<String>
    Parameter values.
    name string
    Parameter name.
    values string[]
    Parameter values.
    name str
    Parameter name.
    values Sequence[str]
    Parameter values.
    name String
    Parameter name.
    values List<String>
    Parameter values.

    GetPrivateDnsRecordsRecordSet

    CreatedOn string
    Record creation time.
    Enabled double
    Enabled. 0 meaning paused, 1 meaning senabled.
    Extra string
    Additional information.
    Mx double
    MX priority: required if the record type is MX. Value range: 5,10,15,20,30,40,50.
    RecordId string
    Record sid.
    RecordType string
    Record type, optional record type are: A, AAAA, CNAME, MX, TXT, PTR.
    RecordValue string
    Record value.
    Status string
    Record status.
    SubDomain string
    Subdomain name.
    Ttl double
    Record cache time, the smaller the value, the faster it takes effect. The value is 1-86400s. The default is 600.
    UpdatedOn string
    Record update time.
    Weight double
    Record weight, value is 1-100.
    ZoneId string
    Private zone id: zone-xxxxxx.
    CreatedOn string
    Record creation time.
    Enabled float64
    Enabled. 0 meaning paused, 1 meaning senabled.
    Extra string
    Additional information.
    Mx float64
    MX priority: required if the record type is MX. Value range: 5,10,15,20,30,40,50.
    RecordId string
    Record sid.
    RecordType string
    Record type, optional record type are: A, AAAA, CNAME, MX, TXT, PTR.
    RecordValue string
    Record value.
    Status string
    Record status.
    SubDomain string
    Subdomain name.
    Ttl float64
    Record cache time, the smaller the value, the faster it takes effect. The value is 1-86400s. The default is 600.
    UpdatedOn string
    Record update time.
    Weight float64
    Record weight, value is 1-100.
    ZoneId string
    Private zone id: zone-xxxxxx.
    createdOn String
    Record creation time.
    enabled Double
    Enabled. 0 meaning paused, 1 meaning senabled.
    extra String
    Additional information.
    mx Double
    MX priority: required if the record type is MX. Value range: 5,10,15,20,30,40,50.
    recordId String
    Record sid.
    recordType String
    Record type, optional record type are: A, AAAA, CNAME, MX, TXT, PTR.
    recordValue String
    Record value.
    status String
    Record status.
    subDomain String
    Subdomain name.
    ttl Double
    Record cache time, the smaller the value, the faster it takes effect. The value is 1-86400s. The default is 600.
    updatedOn String
    Record update time.
    weight Double
    Record weight, value is 1-100.
    zoneId String
    Private zone id: zone-xxxxxx.
    createdOn string
    Record creation time.
    enabled number
    Enabled. 0 meaning paused, 1 meaning senabled.
    extra string
    Additional information.
    mx number
    MX priority: required if the record type is MX. Value range: 5,10,15,20,30,40,50.
    recordId string
    Record sid.
    recordType string
    Record type, optional record type are: A, AAAA, CNAME, MX, TXT, PTR.
    recordValue string
    Record value.
    status string
    Record status.
    subDomain string
    Subdomain name.
    ttl number
    Record cache time, the smaller the value, the faster it takes effect. The value is 1-86400s. The default is 600.
    updatedOn string
    Record update time.
    weight number
    Record weight, value is 1-100.
    zoneId string
    Private zone id: zone-xxxxxx.
    created_on str
    Record creation time.
    enabled float
    Enabled. 0 meaning paused, 1 meaning senabled.
    extra str
    Additional information.
    mx float
    MX priority: required if the record type is MX. Value range: 5,10,15,20,30,40,50.
    record_id str
    Record sid.
    record_type str
    Record type, optional record type are: A, AAAA, CNAME, MX, TXT, PTR.
    record_value str
    Record value.
    status str
    Record status.
    sub_domain str
    Subdomain name.
    ttl float
    Record cache time, the smaller the value, the faster it takes effect. The value is 1-86400s. The default is 600.
    updated_on str
    Record update time.
    weight float
    Record weight, value is 1-100.
    zone_id str
    Private zone id: zone-xxxxxx.
    createdOn String
    Record creation time.
    enabled Number
    Enabled. 0 meaning paused, 1 meaning senabled.
    extra String
    Additional information.
    mx Number
    MX priority: required if the record type is MX. Value range: 5,10,15,20,30,40,50.
    recordId String
    Record sid.
    recordType String
    Record type, optional record type are: A, AAAA, CNAME, MX, TXT, PTR.
    recordValue String
    Record value.
    status String
    Record status.
    subDomain String
    Subdomain name.
    ttl Number
    Record cache time, the smaller the value, the faster it takes effect. The value is 1-86400s. The default is 600.
    updatedOn String
    Record update time.
    weight Number
    Record weight, value is 1-100.
    zoneId String
    Private zone id: zone-xxxxxx.

    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