Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.directmail.getMailAddresses
Explore with Pulumi AI
This data source provides the Direct Mail Mail Addresses 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.getMailAddresses({
ids: ["example_id"],
});
export const directMailMailAddressId1 = ids.then(ids => ids.addresses?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.directmail.get_mail_addresses(ids=["example_id"])
pulumi.export("directMailMailAddressId1", ids.addresses[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.GetMailAddresses(ctx, &directmail.GetMailAddressesArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("directMailMailAddressId1", ids.Addresses[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.GetMailAddresses.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
return new Dictionary<string, object?>
{
["directMailMailAddressId1"] = ids.Apply(getMailAddressesResult => getMailAddressesResult.Addresses[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.GetMailAddressesArgs;
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.getMailAddresses(GetMailAddressesArgs.builder()
.ids("example_id")
.build());
ctx.export("directMailMailAddressId1", ids.applyValue(getMailAddressesResult -> getMailAddressesResult.addresses()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:directmail:getMailAddresses
Arguments:
ids:
- example_id
outputs:
directMailMailAddressId1: ${ids.addresses[0].id}
Using getMailAddresses
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 getMailAddresses(args: GetMailAddressesArgs, opts?: InvokeOptions): Promise<GetMailAddressesResult>
function getMailAddressesOutput(args: GetMailAddressesOutputArgs, opts?: InvokeOptions): Output<GetMailAddressesResult>
def get_mail_addresses(ids: Optional[Sequence[str]] = None,
key_word: Optional[str] = None,
output_file: Optional[str] = None,
sendtype: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMailAddressesResult
def get_mail_addresses_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
key_word: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
sendtype: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMailAddressesResult]
func GetMailAddresses(ctx *Context, args *GetMailAddressesArgs, opts ...InvokeOption) (*GetMailAddressesResult, error)
func GetMailAddressesOutput(ctx *Context, args *GetMailAddressesOutputArgs, opts ...InvokeOption) GetMailAddressesResultOutput
> Note: This function is named GetMailAddresses
in the Go SDK.
public static class GetMailAddresses
{
public static Task<GetMailAddressesResult> InvokeAsync(GetMailAddressesArgs args, InvokeOptions? opts = null)
public static Output<GetMailAddressesResult> Invoke(GetMailAddressesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMailAddressesResult> getMailAddresses(GetMailAddressesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:directmail/getMailAddresses:getMailAddresses
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Mail Address IDs.
- Key
Word string - The key word about account email address.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Sendtype string
- Account type. Valid values:
batch
,trigger
. - Status string
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- Ids []string
- A list of Mail Address IDs.
- Key
Word string - The key word about account email address.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Sendtype string
- Account type. Valid values:
batch
,trigger
. - Status string
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- ids List<String>
- A list of Mail Address IDs.
- key
Word String - The key word about account email address.
- output
File String - File name where to save data source results (after running
pulumi preview
). - sendtype String
- Account type. Valid values:
batch
,trigger
. - status String
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- ids string[]
- A list of Mail Address IDs.
- key
Word string - The key word about account email address.
- output
File string - File name where to save data source results (after running
pulumi preview
). - sendtype string
- Account type. Valid values:
batch
,trigger
. - status string
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- ids Sequence[str]
- A list of Mail Address IDs.
- key_
word str - The key word about account email address.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - sendtype str
- Account type. Valid values:
batch
,trigger
. - status str
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- ids List<String>
- A list of Mail Address IDs.
- key
Word String - The key word about account email address.
- output
File String - File name where to save data source results (after running
pulumi preview
). - sendtype String
- Account type. Valid values:
batch
,trigger
. - status String
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
getMailAddresses Result
The following output properties are available:
- Addresses
List<Pulumi.
Ali Cloud. Direct Mail. Outputs. Get Mail Addresses Address> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Key
Word string - Output
File string - Sendtype string
- Status string
- Addresses
[]Get
Mail Addresses Address - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Key
Word string - Output
File string - Sendtype string
- Status string
- addresses
List<Get
Mail Addresses Address> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- key
Word String - output
File String - sendtype String
- status String
- addresses
Get
Mail Addresses Address[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- key
Word string - output
File string - sendtype string
- status string
- addresses
Sequence[Get
Mail Addresses Address] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- key_
word str - output_
file str - sendtype str
- status str
- addresses List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- key
Word String - output
File String - sendtype String
- status String
Supporting Types
GetMailAddressesAddress
- Account
Name string - The sender address.
- Create
Time string - The creation of the record time.
- Daily
Count string - On the quota limit.
- Daily
Req stringCount - On the quota.
- Domain
Status string - Domain name status. Valid values:
0
,1
. - Id string
- The ID of the Mail Address.
- Mail
Address stringId - The sender address ID.
- Month
Count string - Monthly quota limit.
- Month
Req stringCount - Months amount.
- Reply
Address string - Return address.
- Reply
Status string - If using STMP address status.
- Sendtype string
- Account type.
- Status string
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- Account
Name string - The sender address.
- Create
Time string - The creation of the record time.
- Daily
Count string - On the quota limit.
- Daily
Req stringCount - On the quota.
- Domain
Status string - Domain name status. Valid values:
0
,1
. - Id string
- The ID of the Mail Address.
- Mail
Address stringId - The sender address ID.
- Month
Count string - Monthly quota limit.
- Month
Req stringCount - Months amount.
- Reply
Address string - Return address.
- Reply
Status string - If using STMP address status.
- Sendtype string
- Account type.
- Status string
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- account
Name String - The sender address.
- create
Time String - The creation of the record time.
- daily
Count String - On the quota limit.
- daily
Req StringCount - On the quota.
- domain
Status String - Domain name status. Valid values:
0
,1
. - id String
- The ID of the Mail Address.
- mail
Address StringId - The sender address ID.
- month
Count String - Monthly quota limit.
- month
Req StringCount - Months amount.
- reply
Address String - Return address.
- reply
Status String - If using STMP address status.
- sendtype String
- Account type.
- status String
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- account
Name string - The sender address.
- create
Time string - The creation of the record time.
- daily
Count string - On the quota limit.
- daily
Req stringCount - On the quota.
- domain
Status string - Domain name status. Valid values:
0
,1
. - id string
- The ID of the Mail Address.
- mail
Address stringId - The sender address ID.
- month
Count string - Monthly quota limit.
- month
Req stringCount - Months amount.
- reply
Address string - Return address.
- reply
Status string - If using STMP address status.
- sendtype string
- Account type.
- status string
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- account_
name str - The sender address.
- create_
time str - The creation of the record time.
- daily_
count str - On the quota limit.
- daily_
req_ strcount - On the quota.
- domain_
status str - Domain name status. Valid values:
0
,1
. - id str
- The ID of the Mail Address.
- mail_
address_ strid - The sender address ID.
- month_
count str - Monthly quota limit.
- month_
req_ strcount - Months amount.
- reply_
address str - Return address.
- reply_
status str - If using STMP address status.
- sendtype str
- Account type.
- status str
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
- account
Name String - The sender address.
- create
Time String - The creation of the record time.
- daily
Count String - On the quota limit.
- daily
Req StringCount - On the quota.
- domain
Status String - Domain name status. Valid values:
0
,1
. - id String
- The ID of the Mail Address.
- mail
Address StringId - The sender address ID.
- month
Count String - Monthly quota limit.
- month
Req StringCount - Months amount.
- reply
Address String - Return address.
- reply
Status String - If using STMP address status.
- sendtype String
- Account type.
- status String
- Account Status. Valid values:
0
,1
. Freeze: 1, normal: 0.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.