alicloud.directmail.Receivers
Explore with Pulumi AI
Provides a Direct Mail Receivers resource.
For information about Direct Mail Receivers and how to use it, see What is Direct Mail Receivers.
NOTE: Available since v1.125.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as std from "@pulumi/std";
const config = new pulumi.Config();
const name = config.get("name") || "tfexample";
const example = new alicloud.directmail.Receivers("example", {
receiversAlias: std.format({
input: "%s@onaliyun.com",
args: [name],
}).then(invoke => invoke.result),
receiversName: name,
description: name,
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_std as std
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tfexample"
example = alicloud.directmail.Receivers("example",
receivers_alias=std.format(input="%s@onaliyun.com",
args=[name]).result,
receivers_name=name,
description=name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/directmail"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tfexample"
if param := cfg.Get("name"); param != "" {
name = param
}
invokeFormat, err := std.Format(ctx, &std.FormatArgs{
Input: "%s@onaliyun.com",
Args: []string{
name,
},
}, nil)
if err != nil {
return err
}
_, err = directmail.NewReceivers(ctx, "example", &directmail.ReceiversArgs{
ReceiversAlias: pulumi.String(invokeFormat.Result),
ReceiversName: pulumi.String(name),
Description: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tfexample";
var example = new AliCloud.DirectMail.Receivers("example", new()
{
ReceiversAlias = Std.Format.Invoke(new()
{
Input = "%s@onaliyun.com",
Args = new[]
{
name,
},
}).Apply(invoke => invoke.Result),
ReceiversName = name,
Description = name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.directmail.Receivers;
import com.pulumi.alicloud.directmail.ReceiversArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FormatArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tfexample");
var example = new Receivers("example", ReceiversArgs.builder()
.receiversAlias(StdFunctions.format(FormatArgs.builder()
.input("%s@onaliyun.com")
.args(name)
.build()).result())
.receiversName(name)
.description(name)
.build());
}
}
configuration:
name:
type: string
default: tfexample
resources:
example:
type: alicloud:directmail:Receivers
properties:
receiversAlias:
fn::invoke:
function: std:format
arguments:
input: '%s@onaliyun.com'
args:
- ${name}
return: result
receiversName: ${name}
description: ${name}
Create Receivers Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Receivers(name: string, args: ReceiversArgs, opts?: CustomResourceOptions);
@overload
def Receivers(resource_name: str,
args: ReceiversArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Receivers(resource_name: str,
opts: Optional[ResourceOptions] = None,
receivers_alias: Optional[str] = None,
receivers_name: Optional[str] = None,
description: Optional[str] = None)
func NewReceivers(ctx *Context, name string, args ReceiversArgs, opts ...ResourceOption) (*Receivers, error)
public Receivers(string name, ReceiversArgs args, CustomResourceOptions? opts = null)
public Receivers(String name, ReceiversArgs args)
public Receivers(String name, ReceiversArgs args, CustomResourceOptions options)
type: alicloud:directmail:Receivers
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ReceiversArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ReceiversArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ReceiversArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReceiversArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ReceiversArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var receiversResource = new AliCloud.DirectMail.Receivers("receiversResource", new()
{
ReceiversAlias = "string",
ReceiversName = "string",
Description = "string",
});
example, err := directmail.NewReceivers(ctx, "receiversResource", &directmail.ReceiversArgs{
ReceiversAlias: pulumi.String("string"),
ReceiversName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var receiversResource = new Receivers("receiversResource", ReceiversArgs.builder()
.receiversAlias("string")
.receiversName("string")
.description("string")
.build());
receivers_resource = alicloud.directmail.Receivers("receiversResource",
receivers_alias="string",
receivers_name="string",
description="string")
const receiversResource = new alicloud.directmail.Receivers("receiversResource", {
receiversAlias: "string",
receiversName: "string",
description: "string",
});
type: alicloud:directmail:Receivers
properties:
description: string
receiversAlias: string
receiversName: string
Receivers Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Receivers resource accepts the following input properties:
- Receivers
Alias string - The alias of receivers. Must email address and less than 30 characters in length.
- Receivers
Name string - The name of the resource. The length that cannot be repeated is 1-30 characters.
- Description string
- The description of receivers and 1-50 characters in length.
- Receivers
Alias string - The alias of receivers. Must email address and less than 30 characters in length.
- Receivers
Name string - The name of the resource. The length that cannot be repeated is 1-30 characters.
- Description string
- The description of receivers and 1-50 characters in length.
- receivers
Alias String - The alias of receivers. Must email address and less than 30 characters in length.
- receivers
Name String - The name of the resource. The length that cannot be repeated is 1-30 characters.
- description String
- The description of receivers and 1-50 characters in length.
- receivers
Alias string - The alias of receivers. Must email address and less than 30 characters in length.
- receivers
Name string - The name of the resource. The length that cannot be repeated is 1-30 characters.
- description string
- The description of receivers and 1-50 characters in length.
- receivers_
alias str - The alias of receivers. Must email address and less than 30 characters in length.
- receivers_
name str - The name of the resource. The length that cannot be repeated is 1-30 characters.
- description str
- The description of receivers and 1-50 characters in length.
- receivers
Alias String - The alias of receivers. Must email address and less than 30 characters in length.
- receivers
Name String - The name of the resource. The length that cannot be repeated is 1-30 characters.
- description String
- The description of receivers and 1-50 characters in length.
Outputs
All input properties are implicitly available as output properties. Additionally, the Receivers resource produces the following output properties:
Look up Existing Receivers Resource
Get an existing Receivers resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ReceiversState, opts?: CustomResourceOptions): Receivers
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
receivers_alias: Optional[str] = None,
receivers_name: Optional[str] = None,
status: Optional[int] = None) -> Receivers
func GetReceivers(ctx *Context, name string, id IDInput, state *ReceiversState, opts ...ResourceOption) (*Receivers, error)
public static Receivers Get(string name, Input<string> id, ReceiversState? state, CustomResourceOptions? opts = null)
public static Receivers get(String name, Output<String> id, ReceiversState state, CustomResourceOptions options)
resources: _: type: alicloud:directmail:Receivers get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- The description of receivers and 1-50 characters in length.
- Receivers
Alias string - The alias of receivers. Must email address and less than 30 characters in length.
- Receivers
Name string - The name of the resource. The length that cannot be repeated is 1-30 characters.
- Status int
- The status of the resource.
0
means uploading,1
means upload completed.
- Description string
- The description of receivers and 1-50 characters in length.
- Receivers
Alias string - The alias of receivers. Must email address and less than 30 characters in length.
- Receivers
Name string - The name of the resource. The length that cannot be repeated is 1-30 characters.
- Status int
- The status of the resource.
0
means uploading,1
means upload completed.
- description String
- The description of receivers and 1-50 characters in length.
- receivers
Alias String - The alias of receivers. Must email address and less than 30 characters in length.
- receivers
Name String - The name of the resource. The length that cannot be repeated is 1-30 characters.
- status Integer
- The status of the resource.
0
means uploading,1
means upload completed.
- description string
- The description of receivers and 1-50 characters in length.
- receivers
Alias string - The alias of receivers. Must email address and less than 30 characters in length.
- receivers
Name string - The name of the resource. The length that cannot be repeated is 1-30 characters.
- status number
- The status of the resource.
0
means uploading,1
means upload completed.
- description str
- The description of receivers and 1-50 characters in length.
- receivers_
alias str - The alias of receivers. Must email address and less than 30 characters in length.
- receivers_
name str - The name of the resource. The length that cannot be repeated is 1-30 characters.
- status int
- The status of the resource.
0
means uploading,1
means upload completed.
- description String
- The description of receivers and 1-50 characters in length.
- receivers
Alias String - The alias of receivers. Must email address and less than 30 characters in length.
- receivers
Name String - The name of the resource. The length that cannot be repeated is 1-30 characters.
- status Number
- The status of the resource.
0
means uploading,1
means upload completed.
Import
Direct Mail Receivers can be imported using the id, e.g.
$ pulumi import alicloud:directmail/receivers:Receivers example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.