GetRecords
This data source provides a list of DNS Domain Records in an Alibaba Cloud account according to the specified filters.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var recordsDs = Output.Create(AliCloud.Dns.GetRecords.InvokeAsync(new AliCloud.Dns.GetRecordsArgs
{
DomainName = "xiaozhu.top",
HostRecordRegex = "^@",
IsLocked = false,
OutputFile = "records.txt",
Type = "A",
}));
this.FirstRecordId = recordsDs.Apply(recordsDs => recordsDs.Records[0].RecordId);
}
[Output("firstRecordId")]
public Output<string> FirstRecordId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
records_ds = alicloud.dns.get_records(domain_name="xiaozhu.top",
host_record_regex="^@",
is_locked=False,
output_file="records.txt",
type="A")
pulumi.export("firstRecordId", records_ds.records[0]["record_id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const recordsDs = pulumi.output(alicloud.dns.getRecords({
domainName: "xiaozhu.top",
hostRecordRegex: "^@",
isLocked: false,
outputFile: "records.txt",
type: "A",
}, { async: true }));
export const firstRecordId = recordsDs.records[0].recordId;Using GetRecords
function getRecords(args: GetRecordsArgs, opts?: InvokeOptions): Promise<GetRecordsResult>function get_records(domain_name=None, host_record_regex=None, ids=None, is_locked=None, line=None, output_file=None, status=None, type=None, value_regex=None, opts=None)func GetRecords(ctx *Context, args *GetRecordsArgs, opts ...InvokeOption) (*GetRecordsResult, error)public static class GetRecords {
public static Task<GetRecordsResult> InvokeAsync(GetRecordsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Domain
Name string The domain name associated to the records.
- Host
Record stringRegex Host record regex.
- Ids List<string>
A list of record IDs.
- Is
Locked bool Whether the record is locked or not.
- Line string
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- Output
File string - Status string
Record status. Valid items are
ENABLEandDISABLE.- Type string
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- Value
Regex string Host record value regex.
- Domain
Name string The domain name associated to the records.
- Host
Record stringRegex Host record regex.
- Ids []string
A list of record IDs.
- Is
Locked bool Whether the record is locked or not.
- Line string
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- Output
File string - Status string
Record status. Valid items are
ENABLEandDISABLE.- Type string
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- Value
Regex string Host record value regex.
- domain
Name string The domain name associated to the records.
- host
Record stringRegex Host record regex.
- ids string[]
A list of record IDs.
- is
Locked boolean Whether the record is locked or not.
- line string
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- output
File string - status string
Record status. Valid items are
ENABLEandDISABLE.- type string
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- value
Regex string Host record value regex.
- domain_
name str The domain name associated to the records.
- host_
record_ strregex Host record regex.
- ids List[str]
A list of record IDs.
- is_
locked bool Whether the record is locked or not.
- line str
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- output_
file str - status str
Record status. Valid items are
ENABLEandDISABLE.- type str
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- value_
regex str Host record value regex.
GetRecords Result
The following output properties are available:
- Domain
Name string Name of the domain the record belongs to.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of record IDs.
- Records
List<Pulumi.
Ali Cloud. Dns. Outputs. Get Records Record> A list of records. Each element contains the following attributes:
- Urls List<string>
A list of entire URLs. Each item format as
<host_record>.<domain_name>.- Host
Record stringRegex - Is
Locked bool - Line string
ISP line of the record.
- Output
File string - Status string
Status of the record.
- Type string
Type of the record.
- Value
Regex string
- Domain
Name string Name of the domain the record belongs to.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of record IDs.
- Records
[]Get
Records Record A list of records. Each element contains the following attributes:
- Urls []string
A list of entire URLs. Each item format as
<host_record>.<domain_name>.- Host
Record stringRegex - Is
Locked bool - Line string
ISP line of the record.
- Output
File string - Status string
Status of the record.
- Type string
Type of the record.
- Value
Regex string
- domain
Name string Name of the domain the record belongs to.
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of record IDs.
- records
Get
Records Record[] A list of records. Each element contains the following attributes:
- urls string[]
A list of entire URLs. Each item format as
<host_record>.<domain_name>.- host
Record stringRegex - is
Locked boolean - line string
ISP line of the record.
- output
File string - status string
Status of the record.
- type string
Type of the record.
- value
Regex string
- domain_
name str Name of the domain the record belongs to.
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of record IDs.
- records
List[Get
Records Record] A list of records. Each element contains the following attributes:
- urls List[str]
A list of entire URLs. Each item format as
<host_record>.<domain_name>.- host_
record_ strregex - is_
locked bool - line str
ISP line of the record.
- output_
file str - status str
Status of the record.
- type str
Type of the record.
- value_
regex str
Supporting Types
GetRecordsRecord
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Domain
Name string The domain name associated to the records.
- Host
Record string Host record of the domain.
- Line string
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- Locked bool
Indicates whether the record is locked.
- Priority int
Priority of the
MXrecord.- Record
Id string ID of the record.
- Status string
Record status. Valid items are
ENABLEandDISABLE.- Ttl double
TTL of the record.
- Type string
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- Value string
Host record value of the domain.
- Domain
Name string The domain name associated to the records.
- Host
Record string Host record of the domain.
- Line string
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- Locked bool
Indicates whether the record is locked.
- Priority int
Priority of the
MXrecord.- Record
Id string ID of the record.
- Status string
Record status. Valid items are
ENABLEandDISABLE.- Ttl float64
TTL of the record.
- Type string
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- Value string
Host record value of the domain.
- domain
Name string The domain name associated to the records.
- host
Record string Host record of the domain.
- line string
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- locked boolean
Indicates whether the record is locked.
- priority number
Priority of the
MXrecord.- record
Id string ID of the record.
- status string
Record status. Valid items are
ENABLEandDISABLE.- ttl number
TTL of the record.
- type string
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- value string
Host record value of the domain.
- domain_
name str The domain name associated to the records.
- host_
record str Host record of the domain.
- line str
ISP line. Valid items are
default,telecom,unicom,mobile,oversea,edu,drpeng,btvn, .etc. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc- locked bool
Indicates whether the record is locked.
- priority float
Priority of the
MXrecord.- record_
id str ID of the record.
- status str
Record status. Valid items are
ENABLEandDISABLE.- ttl float
TTL of the record.
- type str
Record type. Valid items are
A,NS,MX,TXT,CNAME,SRV,AAAA,REDIRECT_URL,FORWORD_URL.- value str
Host record value of the domain.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.