Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.directmail.getDomains
Explore with Pulumi AI
This data source provides the Direct Mail Domains of the current Alibaba Cloud user.
NOTE: Available in v1.134.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.directmail.getDomains({
ids: ["example_id"],
});
export const directMailDomainId1 = ids.then(ids => ids.domains?.[0]?.id);
const nameRegex = alicloud.directmail.getDomains({
nameRegex: "^my-Domain",
});
export const directMailDomainId2 = nameRegex.then(nameRegex => nameRegex.domains?.[0]?.id);
const example = alicloud.directmail.getDomains({
status: "1",
keyWord: "^my-Domain",
ids: ["example_id"],
});
export const directMailDomainId3 = example.then(example => example.domains?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.directmail.get_domains(ids=["example_id"])
pulumi.export("directMailDomainId1", ids.domains[0].id)
name_regex = alicloud.directmail.get_domains(name_regex="^my-Domain")
pulumi.export("directMailDomainId2", name_regex.domains[0].id)
example = alicloud.directmail.get_domains(status="1",
key_word="^my-Domain",
ids=["example_id"])
pulumi.export("directMailDomainId3", example.domains[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/directmail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := directmail.GetDomains(ctx, &directmail.GetDomainsArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("directMailDomainId1", ids.Domains[0].Id)
nameRegex, err := directmail.GetDomains(ctx, &directmail.GetDomainsArgs{
NameRegex: pulumi.StringRef("^my-Domain"),
}, nil)
if err != nil {
return err
}
ctx.Export("directMailDomainId2", nameRegex.Domains[0].Id)
example, err := directmail.GetDomains(ctx, &directmail.GetDomainsArgs{
Status: pulumi.StringRef("1"),
KeyWord: pulumi.StringRef("^my-Domain"),
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("directMailDomainId3", example.Domains[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.DirectMail.GetDomains.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.DirectMail.GetDomains.Invoke(new()
{
NameRegex = "^my-Domain",
});
var example = AliCloud.DirectMail.GetDomains.Invoke(new()
{
Status = "1",
KeyWord = "^my-Domain",
Ids = new[]
{
"example_id",
},
});
return new Dictionary<string, object?>
{
["directMailDomainId1"] = ids.Apply(getDomainsResult => getDomainsResult.Domains[0]?.Id),
["directMailDomainId2"] = nameRegex.Apply(getDomainsResult => getDomainsResult.Domains[0]?.Id),
["directMailDomainId3"] = example.Apply(getDomainsResult => getDomainsResult.Domains[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.directmail.DirectmailFunctions;
import com.pulumi.alicloud.directmail.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 ids = DirectmailFunctions.getDomains(GetDomainsArgs.builder()
.ids("example_id")
.build());
ctx.export("directMailDomainId1", ids.applyValue(getDomainsResult -> getDomainsResult.domains()[0].id()));
final var nameRegex = DirectmailFunctions.getDomains(GetDomainsArgs.builder()
.nameRegex("^my-Domain")
.build());
ctx.export("directMailDomainId2", nameRegex.applyValue(getDomainsResult -> getDomainsResult.domains()[0].id()));
final var example = DirectmailFunctions.getDomains(GetDomainsArgs.builder()
.status("1")
.keyWord("^my-Domain")
.ids("example_id")
.build());
ctx.export("directMailDomainId3", example.applyValue(getDomainsResult -> getDomainsResult.domains()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:directmail:getDomains
Arguments:
ids:
- example_id
nameRegex:
fn::invoke:
Function: alicloud:directmail:getDomains
Arguments:
nameRegex: ^my-Domain
example:
fn::invoke:
Function: alicloud:directmail:getDomains
Arguments:
status: '1'
keyWord: ^my-Domain
ids:
- example_id
outputs:
directMailDomainId1: ${ids.domains[0].id}
directMailDomainId2: ${nameRegex.domains[0].id}
directMailDomainId3: ${example.domains[0].id}
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(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
key_word: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDomainsResult
def get_domains_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
key_word: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: 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:directmail/getDomains:getDomains
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids List<string>
- A list of Domain IDs.
- Key
Word string - domain, length
1
to50
, including numbers or capitals or lowercase letters or.
or-
- Name
Regex string - A regex string to filter results by Domain name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids []string
- A list of Domain IDs.
- Key
Word string - domain, length
1
to50
, including numbers or capitals or lowercase letters or.
or-
- Name
Regex string - A regex string to filter results by Domain name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Domain IDs.
- key
Word String - domain, length
1
to50
, including numbers or capitals or lowercase letters or.
or-
- name
Regex String - A regex string to filter results by Domain name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed.
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids string[]
- A list of Domain IDs.
- key
Word string - domain, length
1
to50
, including numbers or capitals or lowercase letters or.
or-
- name
Regex string - A regex string to filter results by Domain name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed.
- enable_
details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - ids Sequence[str]
- A list of Domain IDs.
- key_
word str - domain, length
1
to50
, including numbers or capitals or lowercase letters or.
or-
- name_
regex str - A regex string to filter results by Domain name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of Domain IDs.
- key
Word String - domain, length
1
to50
, including numbers or capitals or lowercase letters or.
or-
- name
Regex String - A regex string to filter results by Domain name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed.
getDomains Result
The following output properties are available:
- Domains
List<Pulumi.
Ali Cloud. Direct Mail. Outputs. Get Domains Domain> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Enable
Details bool - Key
Word string - Name
Regex string - Output
File string - Status string
- Domains
[]Get
Domains Domain - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Enable
Details bool - Key
Word string - Name
Regex string - Output
File string - Status string
- domains
List<Get
Domains Domain> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - key
Word String - name
Regex String - output
File String - status String
- domains
Get
Domains Domain[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enable
Details boolean - key
Word string - name
Regex string - output
File string - status string
- domains
Sequence[Get
Domains Domain] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- enable_
details bool - key_
word str - name_
regex str - output_
file str - status str
- domains List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - key
Word String - name
Regex String - output
File String - status String
Supporting Types
GetDomainsDomain
- Cname
Auth stringStatus - Track verification.
- Cname
Confirm stringStatus - Indicates whether the CNAME record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - Cname
Record string - The value of the CNAME record.
- Create
Time string - The time when the DNS record was created.
- Default
Domain string - The default domain name.
- Dns
Mx string - The value of the MX record.
- Dns
Spf string - The value of the SPF record.
- Dns
Txt string - The value of the TXT ownership record.
- Domain
Id string - The ID of the domain name.
- Domain
Name string - The domain name.
- Domain
Type string - The type of the domain.
- Icp
Status string - The status of ICP filing. Valid values:
0
and1
.0
: indicates that the domain name is not filed.1
: indicates that the domain name is filed. - Id string
- The ID of the Domain.
- Mx
Auth stringStatus - Indicates whether the MX record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - Mx
Record string - The MX verification record provided by Alibaba Cloud DNS.
- Spf
Auth stringStatus - Indicates whether the SPF record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - Spf
Record string - The SPF verification record provided by Alibaba Cloud DNS.
- Status string
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed. - Tl
Domain stringName - The primary domain name.
- Tracef
Record string - The CNAME verification record provided by Alibaba Cloud DNS.
- Cname
Auth stringStatus - Track verification.
- Cname
Confirm stringStatus - Indicates whether the CNAME record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - Cname
Record string - The value of the CNAME record.
- Create
Time string - The time when the DNS record was created.
- Default
Domain string - The default domain name.
- Dns
Mx string - The value of the MX record.
- Dns
Spf string - The value of the SPF record.
- Dns
Txt string - The value of the TXT ownership record.
- Domain
Id string - The ID of the domain name.
- Domain
Name string - The domain name.
- Domain
Type string - The type of the domain.
- Icp
Status string - The status of ICP filing. Valid values:
0
and1
.0
: indicates that the domain name is not filed.1
: indicates that the domain name is filed. - Id string
- The ID of the Domain.
- Mx
Auth stringStatus - Indicates whether the MX record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - Mx
Record string - The MX verification record provided by Alibaba Cloud DNS.
- Spf
Auth stringStatus - Indicates whether the SPF record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - Spf
Record string - The SPF verification record provided by Alibaba Cloud DNS.
- Status string
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed. - Tl
Domain stringName - The primary domain name.
- Tracef
Record string - The CNAME verification record provided by Alibaba Cloud DNS.
- cname
Auth StringStatus - Track verification.
- cname
Confirm StringStatus - Indicates whether the CNAME record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - cname
Record String - The value of the CNAME record.
- create
Time String - The time when the DNS record was created.
- default
Domain String - The default domain name.
- dns
Mx String - The value of the MX record.
- dns
Spf String - The value of the SPF record.
- dns
Txt String - The value of the TXT ownership record.
- domain
Id String - The ID of the domain name.
- domain
Name String - The domain name.
- domain
Type String - The type of the domain.
- icp
Status String - The status of ICP filing. Valid values:
0
and1
.0
: indicates that the domain name is not filed.1
: indicates that the domain name is filed. - id String
- The ID of the Domain.
- mx
Auth StringStatus - Indicates whether the MX record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - mx
Record String - The MX verification record provided by Alibaba Cloud DNS.
- spf
Auth StringStatus - Indicates whether the SPF record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - spf
Record String - The SPF verification record provided by Alibaba Cloud DNS.
- status String
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed. - tl
Domain StringName - The primary domain name.
- tracef
Record String - The CNAME verification record provided by Alibaba Cloud DNS.
- cname
Auth stringStatus - Track verification.
- cname
Confirm stringStatus - Indicates whether the CNAME record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - cname
Record string - The value of the CNAME record.
- create
Time string - The time when the DNS record was created.
- default
Domain string - The default domain name.
- dns
Mx string - The value of the MX record.
- dns
Spf string - The value of the SPF record.
- dns
Txt string - The value of the TXT ownership record.
- domain
Id string - The ID of the domain name.
- domain
Name string - The domain name.
- domain
Type string - The type of the domain.
- icp
Status string - The status of ICP filing. Valid values:
0
and1
.0
: indicates that the domain name is not filed.1
: indicates that the domain name is filed. - id string
- The ID of the Domain.
- mx
Auth stringStatus - Indicates whether the MX record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - mx
Record string - The MX verification record provided by Alibaba Cloud DNS.
- spf
Auth stringStatus - Indicates whether the SPF record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - spf
Record string - The SPF verification record provided by Alibaba Cloud DNS.
- status string
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed. - tl
Domain stringName - The primary domain name.
- tracef
Record string - The CNAME verification record provided by Alibaba Cloud DNS.
- cname_
auth_ strstatus - Track verification.
- cname_
confirm_ strstatus - Indicates whether the CNAME record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - cname_
record str - The value of the CNAME record.
- create_
time str - The time when the DNS record was created.
- default_
domain str - The default domain name.
- dns_
mx str - The value of the MX record.
- dns_
spf str - The value of the SPF record.
- dns_
txt str - The value of the TXT ownership record.
- domain_
id str - The ID of the domain name.
- domain_
name str - The domain name.
- domain_
type str - The type of the domain.
- icp_
status str - The status of ICP filing. Valid values:
0
and1
.0
: indicates that the domain name is not filed.1
: indicates that the domain name is filed. - id str
- The ID of the Domain.
- mx_
auth_ strstatus - Indicates whether the MX record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - mx_
record str - The MX verification record provided by Alibaba Cloud DNS.
- spf_
auth_ strstatus - Indicates whether the SPF record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - spf_
record str - The SPF verification record provided by Alibaba Cloud DNS.
- status str
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed. - tl_
domain_ strname - The primary domain name.
- tracef_
record str - The CNAME verification record provided by Alibaba Cloud DNS.
- cname
Auth StringStatus - Track verification.
- cname
Confirm StringStatus - Indicates whether the CNAME record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - cname
Record String - The value of the CNAME record.
- create
Time String - The time when the DNS record was created.
- default
Domain String - The default domain name.
- dns
Mx String - The value of the MX record.
- dns
Spf String - The value of the SPF record.
- dns
Txt String - The value of the TXT ownership record.
- domain
Id String - The ID of the domain name.
- domain
Name String - The domain name.
- domain
Type String - The type of the domain.
- icp
Status String - The status of ICP filing. Valid values:
0
and1
.0
: indicates that the domain name is not filed.1
: indicates that the domain name is filed. - id String
- The ID of the Domain.
- mx
Auth StringStatus - Indicates whether the MX record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - mx
Record String - The MX verification record provided by Alibaba Cloud DNS.
- spf
Auth StringStatus - Indicates whether the SPF record is successfully verified. Valid values:
0
and1
.0
: indicates the verification is successful.1
: indicates that the verification fails. - spf
Record String - The SPF verification record provided by Alibaba Cloud DNS.
- status String
- The status of the domain name. Valid values:
0
to4
.0
:Available, Passed.1
: Unavailable, No passed.2
: Available, cname no passed, icp no passed.3
: Available, icp no passed.4
: Available, cname no passed. - tl
Domain StringName - The primary domain name.
- tracef
Record String - The CNAME verification record provided by Alibaba Cloud DNS.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.