Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.directmail.getReceivers
Explore with Pulumi AI
This data source provides the Direct Mail Receiverses of the current Alibaba Cloud user.
NOTE: Available in v1.125.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.directmail.getReceivers({
ids: ["ca73b1e4fb0df7c935a5097a****"],
nameRegex: "the_resource_name",
});
export const firstDirectMailReceiversId = example.then(example => example.receiverses?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.directmail.get_receivers(ids=["ca73b1e4fb0df7c935a5097a****"],
name_regex="the_resource_name")
pulumi.export("firstDirectMailReceiversId", example.receiverses[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 {
example, err := directmail.LookupReceivers(ctx, &directmail.LookupReceiversArgs{
Ids: []string{
"ca73b1e4fb0df7c935a5097a****",
},
NameRegex: pulumi.StringRef("the_resource_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstDirectMailReceiversId", example.Receiverses[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.DirectMail.GetReceivers.Invoke(new()
{
Ids = new[]
{
"ca73b1e4fb0df7c935a5097a****",
},
NameRegex = "the_resource_name",
});
return new Dictionary<string, object?>
{
["firstDirectMailReceiversId"] = example.Apply(getReceiversResult => getReceiversResult.Receiverses[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.GetReceiversArgs;
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 example = DirectmailFunctions.getReceivers(GetReceiversArgs.builder()
.ids("ca73b1e4fb0df7c935a5097a****")
.nameRegex("the_resource_name")
.build());
ctx.export("firstDirectMailReceiversId", example.applyValue(getReceiversResult -> getReceiversResult.receiverses()[0].id()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:directmail:getReceivers
Arguments:
ids:
- ca73b1e4fb0df7c935a5097a****
nameRegex: the_resource_name
outputs:
firstDirectMailReceiversId: ${example.receiverses[0].id}
Using getReceivers
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 getReceivers(args: GetReceiversArgs, opts?: InvokeOptions): Promise<GetReceiversResult>
function getReceiversOutput(args: GetReceiversOutputArgs, opts?: InvokeOptions): Output<GetReceiversResult>
def get_receivers(ids: Optional[Sequence[str]] = None,
key_word: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetReceiversResult
def get_receivers_output(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[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetReceiversResult]
func LookupReceivers(ctx *Context, args *LookupReceiversArgs, opts ...InvokeOption) (*LookupReceiversResult, error)
func LookupReceiversOutput(ctx *Context, args *LookupReceiversOutputArgs, opts ...InvokeOption) LookupReceiversResultOutput
> Note: This function is named LookupReceivers
in the Go SDK.
public static class GetReceivers
{
public static Task<GetReceiversResult> InvokeAsync(GetReceiversArgs args, InvokeOptions? opts = null)
public static Output<GetReceiversResult> Invoke(GetReceiversInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetReceiversResult> getReceivers(GetReceiversArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:directmail/getReceivers:getReceivers
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Receivers IDs.
- Key
Word string - The key word.
- Name
Regex string - A regex string to filter results by Receivers name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status int
- The status of the resource. Valid Values:
0
means uploading,1
means upload completed.
- Ids []string
- A list of Receivers IDs.
- Key
Word string - The key word.
- Name
Regex string - A regex string to filter results by Receivers name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status int
- The status of the resource. Valid Values:
0
means uploading,1
means upload completed.
- ids List<String>
- A list of Receivers IDs.
- key
Word String - The key word.
- name
Regex String - A regex string to filter results by Receivers name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status Integer
- The status of the resource. Valid Values:
0
means uploading,1
means upload completed.
- ids string[]
- A list of Receivers IDs.
- key
Word string - The key word.
- name
Regex string - A regex string to filter results by Receivers name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status number
- The status of the resource. Valid Values:
0
means uploading,1
means upload completed.
- ids Sequence[str]
- A list of Receivers IDs.
- key_
word str - The key word.
- name_
regex str - A regex string to filter results by Receivers name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status int
- The status of the resource. Valid Values:
0
means uploading,1
means upload completed.
- ids List<String>
- A list of Receivers IDs.
- key
Word String - The key word.
- name
Regex String - A regex string to filter results by Receivers name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status Number
- The status of the resource. Valid Values:
0
means uploading,1
means upload completed.
getReceivers Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Receiverses
List<Pulumi.
Ali Cloud. Direct Mail. Outputs. Get Receivers Receiverse> - Key
Word string - Name
Regex string - Output
File string - Status int
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Receiverses
[]Get
Receivers Receiverse - Key
Word string - Name
Regex string - Output
File string - Status int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- receiverses
List<Get
Receivers Receiverse> - key
Word String - name
Regex String - output
File String - status Integer
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- receiverses
Get
Receivers Receiverse[] - key
Word string - name
Regex string - output
File string - status number
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- receiverses
Sequence[Get
Receivers Receiverse] - key_
word str - name_
regex str - output_
file str - status int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- receiverses List<Property Map>
- key
Word String - name
Regex String - output
File String - status Number
Supporting Types
GetReceiversReceiverse
- Create
Time string - The creation time of the resource.
- Description string
- The description.
- Id string
- The ID of the Receivers.
- Receivers
Alias string - The Receivers Alias.
- Receivers
Id string - The first ID of the resource.
- Receivers
Name string - The name of the resource.
- Status int
- The status of the resource.
- Create
Time string - The creation time of the resource.
- Description string
- The description.
- Id string
- The ID of the Receivers.
- Receivers
Alias string - The Receivers Alias.
- Receivers
Id string - The first ID of the resource.
- Receivers
Name string - The name of the resource.
- Status int
- The status of the resource.
- create
Time String - The creation time of the resource.
- description String
- The description.
- id String
- The ID of the Receivers.
- receivers
Alias String - The Receivers Alias.
- receivers
Id String - The first ID of the resource.
- receivers
Name String - The name of the resource.
- status Integer
- The status of the resource.
- create
Time string - The creation time of the resource.
- description string
- The description.
- id string
- The ID of the Receivers.
- receivers
Alias string - The Receivers Alias.
- receivers
Id string - The first ID of the resource.
- receivers
Name string - The name of the resource.
- status number
- The status of the resource.
- create_
time str - The creation time of the resource.
- description str
- The description.
- id str
- The ID of the Receivers.
- receivers_
alias str - The Receivers Alias.
- receivers_
id str - The first ID of the resource.
- receivers_
name str - The name of the resource.
- status int
- The status of the resource.
- create
Time String - The creation time of the resource.
- description String
- The description.
- id String
- The ID of the Receivers.
- receivers
Alias String - The Receivers Alias.
- receivers
Id String - The first ID of the resource.
- receivers
Name String - The name of the resource.
- status Number
- The status of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.