Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.dns.getDomains
Explore with Pulumi AI
DEPRECATED: This resource has been renamed to alicloud.dns.getAlidnsDomains from version 1.95.0.
This data source provides a list of DNS Domains in an Alibaba Cloud account according to the specified filters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const domainsDs = alicloud.dns.getDomains({
domainNameRegex: "^hegu",
outputFile: "domains.txt",
});
export const firstDomainId = domainsDs.then(domainsDs => domainsDs.domains?.[0]?.domainId);
import pulumi
import pulumi_alicloud as alicloud
domains_ds = alicloud.dns.get_domains(domain_name_regex="^hegu",
output_file="domains.txt")
pulumi.export("firstDomainId", domains_ds.domains[0].domain_id)
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.GetDomains(ctx, &dns.GetDomainsArgs{
DomainNameRegex: pulumi.StringRef("^hegu"),
OutputFile: pulumi.StringRef("domains.txt"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstDomainId", domainsDs.Domains[0].DomainId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var domainsDs = AliCloud.Dns.GetDomains.Invoke(new()
{
DomainNameRegex = "^hegu",
OutputFile = "domains.txt",
});
return new Dictionary<string, object?>
{
["firstDomainId"] = domainsDs.Apply(getDomainsResult => getDomainsResult.Domains[0]?.DomainId),
};
});
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.GetDomainsArgs;
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.getDomains(GetDomainsArgs.builder()
.domainNameRegex("^hegu")
.outputFile("domains.txt")
.build());
ctx.export("firstDomainId", domainsDs.applyValue(getDomainsResult -> getDomainsResult.domains()[0].domainId()));
}
}
variables:
domainsDs:
fn::invoke:
Function: alicloud:dns:getDomains
Arguments:
domainNameRegex: ^hegu
outputFile: domains.txt
outputs:
firstDomainId: ${domainsDs.domains[0].domainId}
Using getDomains
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 getDomains(args: GetDomainsArgs, opts?: InvokeOptions): Promise<GetDomainsResult>
function getDomainsOutput(args: GetDomainsOutputArgs, opts?: InvokeOptions): Output<GetDomainsResult>
def get_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) -> GetDomainsResult
def get_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[GetDomainsResult]
func GetDomains(ctx *Context, args *GetDomainsArgs, opts ...InvokeOption) (*GetDomainsResult, error)
func GetDomainsOutput(ctx *Context, args *GetDomainsOutputArgs, opts ...InvokeOption) GetDomainsResultOutput
> Note: This function is named GetDomains
in the Go SDK.
public static class GetDomains
{
public static Task<GetDomainsResult> InvokeAsync(GetDomainsArgs args, InvokeOptions? opts = null)
public static Output<GetDomainsResult> Invoke(GetDomainsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDomainsResult> getDomains(GetDomainsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dns/getDomains:getDomains
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.
getDomains Result
The following output properties are available:
- Domains
List<Pulumi.
Ali Cloud. Dns. Outputs. Get 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
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
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
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
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
GetDomainsDomain
- Ali
Domain bool - Specifies whether the domain is from Alibaba Cloud or not.
- Available
Ttls List<int> - 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 Domains Domain Record Line> - 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 - 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 []GetDomains Domain Record Line - 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> - 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<GetDomains Domain Record Line> - 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[] - 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 GetDomains Domain Record Line[] - 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] - 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[GetDomains Domain Record Line] - 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> - 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> - 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
GetDomainsDomainRecordLine
- Father
Code string - Line
Code string - Line
Display stringName - Line
Name string
- Father
Code string - Line
Code string - Line
Display stringName - Line
Name string
- father
Code String - line
Code String - line
Display StringName - line
Name String
- father
Code string - line
Code string - line
Display stringName - line
Name string
- father_
code str - line_
code str - line_
display_ strname - line_
name str
- father
Code String - line
Code String - line
Display StringName - line
Name String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.