tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getDnspodRecords
Explore with Pulumi AI
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.
- Domain
Id 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.
- Group
Id 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.
- Record
Line string - The split zone name.
- Record
Line stringId - The split zone ID. If
record_line_id
is passed in, the system will omit the parameterrecord_line
. - Record
Type string - The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
- Result
Output stringFile - Used for store query result as JSON.
- Sort
Field string - The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
- Sort
Type 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.
- Domain
Id 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.
- Group
Id 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.
- Record
Line string - The split zone name.
- Record
Line stringId - The split zone ID. If
record_line_id
is passed in, the system will omit the parameterrecord_line
. - Record
Type string - The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
- Result
Output stringFile - Used for store query result as JSON.
- Sort
Field string - The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
- Sort
Type 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.
- domain
Id 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.
- group
Id 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.
- record
Line String - The split zone name.
- record
Line StringId - The split zone ID. If
record_line_id
is passed in, the system will omit the parameterrecord_line
. - record
Type String - The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
- result
Output StringFile - Used for store query result as JSON.
- sort
Field String - The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
- sort
Type 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.
- domain
Id 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.
- group
Id 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.
- record
Line string - The split zone name.
- record
Line stringId - The split zone ID. If
record_line_id
is passed in, the system will omit the parameterrecord_line
. - record
Type string - The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
- result
Output stringFile - Used for store query result as JSON.
- sort
Field string - The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
- sort
Type 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_ strid - The split zone ID. If
record_line_id
is passed in, the system will omit the parameterrecord_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_ strfile - 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.
- domain
Id 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.
- group
Id 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.
- record
Line String - The split zone name.
- record
Line StringId - The split zone ID. If
record_line_id
is passed in, the system will omit the parameterrecord_line
. - record
Type String - The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
- result
Output StringFile - Used for store query result as JSON.
- sort
Field String - The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
- sort
Type 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
- Record
Count List<GetInfos Dnspod Records Record Count Info> - Count info of the queried record list.
- Results
List<Get
Dnspod Records Result> - The record list result.
- Domain string
- Domain
Id string - Group
Id string - Keyword string
- Limit double
- Offset double
- Record
Line string - Record
Line stringId - Record
Type string - Result
Output stringFile - Sort
Field string - Sort
Type string - Subdomain string
- Id string
- Record
Count []GetInfos Dnspod Records Record Count Info - Count info of the queried record list.
- Results
[]Get
Dnspod Records Result - The record list result.
- Domain string
- Domain
Id string - Group
Id string - Keyword string
- Limit float64
- Offset float64
- Record
Line string - Record
Line stringId - Record
Type string - Result
Output stringFile - Sort
Field string - Sort
Type string - Subdomain string
- id String
- record
Count List<GetInfos Dnspod Records Record Count Info> - Count info of the queried record list.
- results
List<Get
Dnspod Records Result> - The record list result.
- domain String
- domain
Id String - group
Id String - keyword String
- limit Double
- offset Double
- record
Line String - record
Line StringId - record
Type String - result
Output StringFile - sort
Field String - sort
Type String - subdomain String
- id string
- record
Count GetInfos Dnspod Records Record Count Info[] - Count info of the queried record list.
- results
Get
Dnspod Records Result[] - The record list result.
- domain string
- domain
Id string - group
Id string - keyword string
- limit number
- offset number
- record
Line string - record
Line stringId - record
Type string - result
Output stringFile - sort
Field string - sort
Type string - subdomain string
- id str
- record_
count_ Sequence[Getinfos Dnspod Records Record Count Info] - Count info of the queried record list.
- results
Sequence[Get
Dnspod Records Result] - The record list result.
- domain str
- domain_
id str - group_
id str - keyword str
- limit float
- offset float
- record_
line str - record_
line_ strid - record_
type str - result_
output_ strfile - sort_
field str - sort_
type str - subdomain str
- id String
- record
Count List<Property Map>Infos - Count info of the queried record list.
- results List<Property Map>
- The record list result.
- domain String
- domain
Id String - group
Id String - keyword String
- limit Number
- offset Number
- record
Line String - record
Line StringId - record
Type String - result
Output StringFile - sort
Field String - sort
Type String - subdomain String
Supporting Types
GetDnspodRecordsRecordCountInfo
- List
Count double - The count of records returned in the list.
- Subdomain
Count double - The subdomain count.
- Total
Count double - The total record count.
- List
Count float64 - The count of records returned in the list.
- Subdomain
Count float64 - The subdomain count.
- Total
Count float64 - The total record count.
- list
Count Double - The count of records returned in the list.
- subdomain
Count Double - The subdomain count.
- total
Count Double - The total record count.
- list
Count number - The count of records returned in the list.
- subdomain
Count number - The subdomain count.
- total
Count 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.
- list
Count Number - The count of records returned in the list.
- subdomain
Count Number - The subdomain count.
- total
Count Number - The total record count.
GetDnspodRecordsResult
- Line string
- The record split zone.
- Line
Id string - The split zone ID.
- Monitor
Status 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.
- Record
Id 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.
- Updated
On 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.
- Line
Id string - The split zone ID.
- Monitor
Status 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.
- Record
Id 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.
- Updated
On 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.
- line
Id String - The split zone ID.
- monitor
Status 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.
- record
Id 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.
- updated
On 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.
- line
Id string - The split zone ID.
- monitor
Status 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.
- record
Id 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.
- updated
On 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.
- line
Id String - The split zone ID.
- monitor
Status 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.
- record
Id 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.
- updated
On 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 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack