alicloud.dns.getAlidnsDomains
Explore with Pulumi AI
This data source provides a list of Alidns Domains in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.95.0+.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var domainsDs = AliCloud.Dns.GetAlidnsDomains.Invoke(new()
{
DomainNameRegex = "^hegu",
OutputFile = "domains.txt",
});
return new Dictionary<string, object?>
{
["firstDomainId"] = domainsDs.Apply(getAlidnsDomainsResult => getAlidnsDomainsResult.Domains[0]?.DomainId),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
domainsDs, err := dns.GetAlidnsDomains(ctx, &dns.GetAlidnsDomainsArgs{
DomainNameRegex: pulumi.StringRef("^hegu"),
OutputFile: pulumi.StringRef("domains.txt"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstDomainId", domainsDs.Domains[0].DomainId)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.DnsFunctions;
import com.pulumi.alicloud.dns.inputs.GetAlidnsDomainsArgs;
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 domainsDs = DnsFunctions.getAlidnsDomains(GetAlidnsDomainsArgs.builder()
.domainNameRegex("^hegu")
.outputFile("domains.txt")
.build());
ctx.export("firstDomainId", domainsDs.applyValue(getAlidnsDomainsResult -> getAlidnsDomainsResult.domains()[0].domainId()));
}
}
import pulumi
import pulumi_alicloud as alicloud
domains_ds = alicloud.dns.get_alidns_domains(domain_name_regex="^hegu",
output_file="domains.txt")
pulumi.export("firstDomainId", domains_ds.domains[0].domain_id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const domainsDs = alicloud.dns.getAlidnsDomains({
domainNameRegex: "^hegu",
outputFile: "domains.txt",
});
export const firstDomainId = domainsDs.then(domainsDs => domainsDs.domains?.[0]?.domainId);
variables:
domainsDs:
fn::invoke:
Function: alicloud:dns:getAlidnsDomains
Arguments:
domainNameRegex: ^hegu
outputFile: domains.txt
outputs:
firstDomainId: ${domainsDs.domains[0].domainId}
Using getAlidnsDomains
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 getAlidnsDomains(args: GetAlidnsDomainsArgs, opts?: InvokeOptions): Promise<GetAlidnsDomainsResult>
function getAlidnsDomainsOutput(args: GetAlidnsDomainsOutputArgs, opts?: InvokeOptions): Output<GetAlidnsDomainsResult>
def get_alidns_domains(ali_domain: Optional[bool] = None,
domain_name_regex: Optional[str] = None,
enable_details: Optional[bool] = None,
group_id: Optional[str] = None,
group_name_regex: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
key_word: Optional[str] = None,
lang: Optional[str] = None,
output_file: Optional[str] = None,
resource_group_id: Optional[str] = None,
search_mode: Optional[str] = None,
starmark: Optional[bool] = None,
tags: Optional[Mapping[str, Any]] = None,
version_code: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAlidnsDomainsResult
def get_alidns_domains_output(ali_domain: Optional[pulumi.Input[bool]] = None,
domain_name_regex: Optional[pulumi.Input[str]] = None,
enable_details: Optional[pulumi.Input[bool]] = None,
group_id: Optional[pulumi.Input[str]] = None,
group_name_regex: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
key_word: Optional[pulumi.Input[str]] = None,
lang: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
search_mode: Optional[pulumi.Input[str]] = None,
starmark: Optional[pulumi.Input[bool]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
version_code: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAlidnsDomainsResult]
func GetAlidnsDomains(ctx *Context, args *GetAlidnsDomainsArgs, opts ...InvokeOption) (*GetAlidnsDomainsResult, error)
func GetAlidnsDomainsOutput(ctx *Context, args *GetAlidnsDomainsOutputArgs, opts ...InvokeOption) GetAlidnsDomainsResultOutput
> Note: This function is named GetAlidnsDomains
in the Go SDK.
public static class GetAlidnsDomains
{
public static Task<GetAlidnsDomainsResult> InvokeAsync(GetAlidnsDomainsArgs args, InvokeOptions? opts = null)
public static Output<GetAlidnsDomainsResult> Invoke(GetAlidnsDomainsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlidnsDomainsResult> getAlidnsDomains(GetAlidnsDomainsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dns/getAlidnsDomains:getAlidnsDomains
arguments:
# arguments dictionary
The following arguments are supported:
- Ali
Domain bool Specifies whether the domain is from Alibaba Cloud or not.
- Domain
Name stringRegex A regex string to filter results by the domain name.
- Enable
Details bool - Group
Id string Domain group ID, if not filled, the default is all groups.
- Group
Name stringRegex A regex string to filter results by the group name.
- Ids List<string>
A list of domain IDs.
- Instance
Id string Cloud analysis product ID.
- Key
Word string The keywords are searched according to the
%KeyWord%
mode, which is not case sensitive.- Lang string
User language.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Resource
Group stringId The Id of resource group which the dns belongs.
- Search
Mode string Search mode,
LIKE
fuzzy search,EXACT
exact search.- Starmark bool
Whether to query the domain name star.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Version
Code string Cloud analysis version code.
- Ali
Domain bool Specifies whether the domain is from Alibaba Cloud or not.
- Domain
Name stringRegex A regex string to filter results by the domain name.
- Enable
Details bool - Group
Id string Domain group ID, if not filled, the default is all groups.
- Group
Name stringRegex A regex string to filter results by the group name.
- Ids []string
A list of domain IDs.
- Instance
Id string Cloud analysis product ID.
- Key
Word string The keywords are searched according to the
%KeyWord%
mode, which is not case sensitive.- Lang string
User language.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Resource
Group stringId The Id of resource group which the dns belongs.
- Search
Mode string Search mode,
LIKE
fuzzy search,EXACT
exact search.- Starmark bool
Whether to query the domain name star.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Version
Code string Cloud analysis version code.
- ali
Domain Boolean Specifies whether the domain is from Alibaba Cloud or not.
- domain
Name StringRegex A regex string to filter results by the domain name.
- enable
Details Boolean - group
Id String Domain group ID, if not filled, the default is all groups.
- group
Name StringRegex A regex string to filter results by the group name.
- ids List<String>
A list of domain IDs.
- instance
Id String Cloud analysis product ID.
- key
Word String The keywords are searched according to the
%KeyWord%
mode, which is not case sensitive.- lang String
User language.
- output
File String File name where to save data source results (after running
pulumi preview
).- resource
Group StringId The Id of resource group which the dns belongs.
- search
Mode String Search mode,
LIKE
fuzzy search,EXACT
exact search.- starmark Boolean
Whether to query the domain name star.
- Map<String,Object>
A mapping of tags to assign to the resource.
- version
Code String Cloud analysis version code.
- ali
Domain boolean Specifies whether the domain is from Alibaba Cloud or not.
- domain
Name stringRegex A regex string to filter results by the domain name.
- enable
Details boolean - group
Id string Domain group ID, if not filled, the default is all groups.
- group
Name stringRegex A regex string to filter results by the group name.
- ids string[]
A list of domain IDs.
- instance
Id string Cloud analysis product ID.
- key
Word string The keywords are searched according to the
%KeyWord%
mode, which is not case sensitive.- lang string
User language.
- output
File string File name where to save data source results (after running
pulumi preview
).- resource
Group stringId The Id of resource group which the dns belongs.
- search
Mode string Search mode,
LIKE
fuzzy search,EXACT
exact search.- starmark boolean
Whether to query the domain name star.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- version
Code string Cloud analysis version code.
- ali_
domain bool Specifies whether the domain is from Alibaba Cloud or not.
- domain_
name_ strregex A regex string to filter results by the domain name.
- enable_
details bool - group_
id str Domain group ID, if not filled, the default is all groups.
- group_
name_ strregex A regex string to filter results by the group name.
- ids Sequence[str]
A list of domain IDs.
- instance_
id str Cloud analysis product ID.
- key_
word str The keywords are searched according to the
%KeyWord%
mode, which is not case sensitive.- lang str
User language.
- output_
file str File name where to save data source results (after running
pulumi preview
).- resource_
group_ strid The Id of resource group which the dns belongs.
- search_
mode str Search mode,
LIKE
fuzzy search,EXACT
exact search.- starmark bool
Whether to query the domain name star.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- version_
code str Cloud analysis version code.
- ali
Domain Boolean Specifies whether the domain is from Alibaba Cloud or not.
- domain
Name StringRegex A regex string to filter results by the domain name.
- enable
Details Boolean - group
Id String Domain group ID, if not filled, the default is all groups.
- group
Name StringRegex A regex string to filter results by the group name.
- ids List<String>
A list of domain IDs.
- instance
Id String Cloud analysis product ID.
- key
Word String The keywords are searched according to the
%KeyWord%
mode, which is not case sensitive.- lang String
User language.
- output
File String File name where to save data source results (after running
pulumi preview
).- resource
Group StringId The Id of resource group which the dns belongs.
- search
Mode String Search mode,
LIKE
fuzzy search,EXACT
exact search.- starmark Boolean
Whether to query the domain name star.
- Map<Any>
A mapping of tags to assign to the resource.
- version
Code String Cloud analysis version code.
getAlidnsDomains Result
The following output properties are available:
- Domains
List<Pulumi.
Ali Cloud. Dns. Outputs. Get Alidns Domains Domain> A list of domains. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of domain IDs.
- Names List<string>
A list of domain names.
- Ali
Domain bool Indicates whether the domain is an Alibaba Cloud domain.
- Domain
Name stringRegex - Enable
Details bool - Group
Id string Id of group that contains the domain.
- Group
Name stringRegex - Instance
Id string Cloud analysis product ID of the domain.
- Key
Word string - Lang string
- Output
File string - Resource
Group stringId The Id of resource group which the dns belongs.
- Search
Mode string - Starmark bool
- Dictionary<string, object>
- Version
Code string Cloud resolution version ID.
- Domains
[]Get
Alidns Domains Domain A list of domains. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of domain IDs.
- Names []string
A list of domain names.
- Ali
Domain bool Indicates whether the domain is an Alibaba Cloud domain.
- Domain
Name stringRegex - Enable
Details bool - Group
Id string Id of group that contains the domain.
- Group
Name stringRegex - Instance
Id string Cloud analysis product ID of the domain.
- Key
Word string - Lang string
- Output
File string - Resource
Group stringId The Id of resource group which the dns belongs.
- Search
Mode string - Starmark bool
- map[string]interface{}
- Version
Code string Cloud resolution version ID.
- domains
List<Get
Ali Domains Domain> A list of domains. Each element contains the following attributes:
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of domain IDs.
- names List<String>
A list of domain names.
- ali
Domain Boolean Indicates whether the domain is an Alibaba Cloud domain.
- domain
Name StringRegex - enable
Details Boolean - group
Id String Id of group that contains the domain.
- group
Name StringRegex - instance
Id String Cloud analysis product ID of the domain.
- key
Word String - lang String
- output
File String - resource
Group StringId The Id of resource group which the dns belongs.
- search
Mode String - starmark Boolean
- Map<String,Object>
- version
Code String Cloud resolution version ID.
- domains
Get
Alidns Domains Domain[] A list of domains. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of domain IDs.
- names string[]
A list of domain names.
- ali
Domain boolean Indicates whether the domain is an Alibaba Cloud domain.
- domain
Name stringRegex - enable
Details boolean - group
Id string Id of group that contains the domain.
- group
Name stringRegex - instance
Id string Cloud analysis product ID of the domain.
- key
Word string - lang string
- output
File string - resource
Group stringId The Id of resource group which the dns belongs.
- search
Mode string - starmark boolean
- {[key: string]: any}
- version
Code string Cloud resolution version ID.
- domains
Sequence[Get
Alidns Domains Domain] A list of domains. Each element contains the following attributes:
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
A list of domain IDs.
- names Sequence[str]
A list of domain names.
- ali_
domain bool Indicates whether the domain is an Alibaba Cloud domain.
- domain_
name_ strregex - enable_
details bool - group_
id str Id of group that contains the domain.
- group_
name_ strregex - instance_
id str Cloud analysis product ID of the domain.
- key_
word str - lang str
- output_
file str - resource_
group_ strid The Id of resource group which the dns belongs.
- search_
mode str - starmark bool
- Mapping[str, Any]
- version_
code str Cloud resolution version ID.
- domains List<Property Map>
A list of domains. Each element contains the following attributes:
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of domain IDs.
- names List<String>
A list of domain names.
- ali
Domain Boolean Indicates whether the domain is an Alibaba Cloud domain.
- domain
Name StringRegex - enable
Details Boolean - group
Id String Id of group that contains the domain.
- group
Name StringRegex - instance
Id String Cloud analysis product ID of the domain.
- key
Word String - lang String
- output
File String - resource
Group StringId The Id of resource group which the dns belongs.
- search
Mode String - starmark Boolean
- Map<Any>
- version
Code String Cloud resolution version ID.
Supporting Types
GetAlidnsDomainsDomain
- Ali
Domain bool Specifies whether the domain is from Alibaba Cloud or not.
- Available
Ttls List<int> List of available TTLs.
- Dns
Servers List<string> DNS list of domain names in the resolution system.
- Domain
Id string ID of the domain.
- Domain
Name string Name of the domain.
- Group
Id string Domain group ID, if not filled, the default is all groups.
- Group
Name string Name of group that contains the domain.
- Id string
The Id of resource.
- In
Black boolHole Whether it is in black hole.
- In
Clean bool Whether it is cleaning.
- Instance
Id string Cloud analysis product ID.
- Line
Type string - Min
Ttl int Minimum TTL.
- Puny
Code string Punycode of the Chinese domain.
- Record
Line stringTree Json Tree-like analytical line list.
- Record
Lines List<Pulumi.Ali Cloud. Dns. Inputs. Get Alidns Domains Domain Record Line> Parse the line data list.
- Region
Lines bool Whether it is a regional route.
- Remark string
The Id of resource group which the dns belongs.
- Resource
Group stringId The Id of resource group which the dns belongs.
- Slave
Dns bool Whether to allow auxiliary dns.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Version
Code string Cloud analysis version code.
- Version
Name string
- Ali
Domain bool Specifies whether the domain is from Alibaba Cloud or not.
- Available
Ttls []int List of available TTLs.
- Dns
Servers []string DNS list of domain names in the resolution system.
- Domain
Id string ID of the domain.
- Domain
Name string Name of the domain.
- Group
Id string Domain group ID, if not filled, the default is all groups.
- Group
Name string Name of group that contains the domain.
- Id string
The Id of resource.
- In
Black boolHole Whether it is in black hole.
- In
Clean bool Whether it is cleaning.
- Instance
Id string Cloud analysis product ID.
- Line
Type string - Min
Ttl int Minimum TTL.
- Puny
Code string Punycode of the Chinese domain.
- Record
Line stringTree Json Tree-like analytical line list.
- Record
Lines []GetAlidns Domains Domain Record Line Parse the line data list.
- Region
Lines bool Whether it is a regional route.
- Remark string
The Id of resource group which the dns belongs.
- Resource
Group stringId The Id of resource group which the dns belongs.
- Slave
Dns bool Whether to allow auxiliary dns.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Version
Code string Cloud analysis version code.
- Version
Name string
- ali
Domain Boolean Specifies whether the domain is from Alibaba Cloud or not.
- available
Ttls List<Integer> List of available TTLs.
- dns
Servers List<String> DNS list of domain names in the resolution system.
- domain
Id String ID of the domain.
- domain
Name String Name of the domain.
- group
Id String Domain group ID, if not filled, the default is all groups.
- group
Name String Name of group that contains the domain.
- id String
The Id of resource.
- in
Black BooleanHole Whether it is in black hole.
- in
Clean Boolean Whether it is cleaning.
- instance
Id String Cloud analysis product ID.
- line
Type String - min
Ttl Integer Minimum TTL.
- puny
Code String Punycode of the Chinese domain.
- record
Line StringTree Json Tree-like analytical line list.
- record
Lines List<GetAli Domains Domain Record Line> Parse the line data list.
- region
Lines Boolean Whether it is a regional route.
- remark String
The Id of resource group which the dns belongs.
- resource
Group StringId The Id of resource group which the dns belongs.
- slave
Dns Boolean Whether to allow auxiliary dns.
- Map<String,Object>
A mapping of tags to assign to the resource.
- version
Code String Cloud analysis version code.
- version
Name String
- ali
Domain boolean Specifies whether the domain is from Alibaba Cloud or not.
- available
Ttls number[] List of available TTLs.
- dns
Servers string[] DNS list of domain names in the resolution system.
- domain
Id string ID of the domain.
- domain
Name string Name of the domain.
- group
Id string Domain group ID, if not filled, the default is all groups.
- group
Name string Name of group that contains the domain.
- id string
The Id of resource.
- in
Black booleanHole Whether it is in black hole.
- in
Clean boolean Whether it is cleaning.
- instance
Id string Cloud analysis product ID.
- line
Type string - min
Ttl number Minimum TTL.
- puny
Code string Punycode of the Chinese domain.
- record
Line stringTree Json Tree-like analytical line list.
- record
Lines GetAlidns Domains Domain Record Line[] Parse the line data list.
- region
Lines boolean Whether it is a regional route.
- remark string
The Id of resource group which the dns belongs.
- resource
Group stringId The Id of resource group which the dns belongs.
- slave
Dns boolean Whether to allow auxiliary dns.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- version
Code string Cloud analysis version code.
- version
Name string
- ali_
domain bool Specifies whether the domain is from Alibaba Cloud or not.
- available_
ttls Sequence[int] List of available TTLs.
- dns_
servers Sequence[str] DNS list of domain names in the resolution system.
- domain_
id str ID of the domain.
- domain_
name str Name of the domain.
- group_
id str Domain group ID, if not filled, the default is all groups.
- group_
name str Name of group that contains the domain.
- id str
The Id of resource.
- in_
black_ boolhole Whether it is in black hole.
- in_
clean bool Whether it is cleaning.
- instance_
id str Cloud analysis product ID.
- line_
type str - min_
ttl int Minimum TTL.
- puny_
code str Punycode of the Chinese domain.
- record_
line_ strtree_ json Tree-like analytical line list.
- record_
lines Sequence[GetAlidns Domains Domain Record Line] Parse the line data list.
- region_
lines bool Whether it is a regional route.
- remark str
The Id of resource group which the dns belongs.
- resource_
group_ strid The Id of resource group which the dns belongs.
- slave_
dns bool Whether to allow auxiliary dns.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- version_
code str Cloud analysis version code.
- version_
name str
- ali
Domain Boolean Specifies whether the domain is from Alibaba Cloud or not.
- available
Ttls List<Number> List of available TTLs.
- dns
Servers List<String> DNS list of domain names in the resolution system.
- domain
Id String ID of the domain.
- domain
Name String Name of the domain.
- group
Id String Domain group ID, if not filled, the default is all groups.
- group
Name String Name of group that contains the domain.
- id String
The Id of resource.
- in
Black BooleanHole Whether it is in black hole.
- in
Clean Boolean Whether it is cleaning.
- instance
Id String Cloud analysis product ID.
- line
Type String - min
Ttl Number Minimum TTL.
- puny
Code String Punycode of the Chinese domain.
- record
Line StringTree Json Tree-like analytical line list.
- record
Lines List<Property Map> Parse the line data list.
- region
Lines Boolean Whether it is a regional route.
- remark String
The Id of resource group which the dns belongs.
- resource
Group StringId The Id of resource group which the dns belongs.
- slave
Dns Boolean Whether to allow auxiliary dns.
- Map<Any>
A mapping of tags to assign to the resource.
- version
Code String Cloud analysis version code.
- version
Name String
GetAlidnsDomainsDomainRecordLine
- Father
Code string The code of the parent line, or empty if there is none.
- Line
Code string Sub-line Code.
- Line
Display stringName Parent line display name.
- Line
Name string Sub-line display name.
- Father
Code string The code of the parent line, or empty if there is none.
- Line
Code string Sub-line Code.
- Line
Display stringName Parent line display name.
- Line
Name string Sub-line display name.
- father
Code String The code of the parent line, or empty if there is none.
- line
Code String Sub-line Code.
- line
Display StringName Parent line display name.
- line
Name String Sub-line display name.
- father
Code string The code of the parent line, or empty if there is none.
- line
Code string Sub-line Code.
- line
Display stringName Parent line display name.
- line
Name string Sub-line display name.
- father_
code str The code of the parent line, or empty if there is none.
- line_
code str Sub-line Code.
- line_
display_ strname Parent line display name.
- line_
name str Sub-line display name.
- father
Code String The code of the parent line, or empty if there is none.
- line
Code String Sub-line Code.
- line
Display StringName Parent line display name.
- line
Name String Sub-line display name.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.