1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. resourcemanager
  5. MessageContact
Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi

alicloud.resourcemanager.MessageContact

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi

    Provides a Resource Manager Message Contact resource.

    Message contact for Resource Directory account.

    For information about Resource Manager Message Contact and how to use it, see What is Message Contact.

    NOTE: Available since v1.259.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new alicloud.resourcemanager.MessageContact("default", {
        messageTypes: ["AccountExpenses"],
        phoneNumber: "86-18626811111",
        title: "TechnicalDirector",
        emailAddress: "resourceexample@126.com",
        messageContactName: "example",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.resourcemanager.MessageContact("default",
        message_types=["AccountExpenses"],
        phone_number="86-18626811111",
        title="TechnicalDirector",
        email_address="resourceexample@126.com",
        message_contact_name="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"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 := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := resourcemanager.NewMessageContact(ctx, "default", &resourcemanager.MessageContactArgs{
    			MessageTypes: pulumi.StringArray{
    				pulumi.String("AccountExpenses"),
    			},
    			PhoneNumber:        pulumi.String("86-18626811111"),
    			Title:              pulumi.String("TechnicalDirector"),
    			EmailAddress:       pulumi.String("resourceexample@126.com"),
    			MessageContactName: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new AliCloud.ResourceManager.MessageContact("default", new()
        {
            MessageTypes = new[]
            {
                "AccountExpenses",
            },
            PhoneNumber = "86-18626811111",
            Title = "TechnicalDirector",
            EmailAddress = "resourceexample@126.com",
            MessageContactName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.MessageContact;
    import com.pulumi.alicloud.resourcemanager.MessageContactArgs;
    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("terraform-example");
            var default_ = new MessageContact("default", MessageContactArgs.builder()
                .messageTypes("AccountExpenses")
                .phoneNumber("86-18626811111")
                .title("TechnicalDirector")
                .emailAddress("resourceexample@126.com")
                .messageContactName("example")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:resourcemanager:MessageContact
        properties:
          messageTypes:
            - AccountExpenses
          phoneNumber: 86-18626811111
          title: TechnicalDirector
          emailAddress: resourceexample@126.com
          messageContactName: example
    

    Create MessageContact Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MessageContact(name: string, args: MessageContactArgs, opts?: CustomResourceOptions);
    @overload
    def MessageContact(resource_name: str,
                       args: MessageContactArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def MessageContact(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       email_address: Optional[str] = None,
                       message_contact_name: Optional[str] = None,
                       message_types: Optional[Sequence[str]] = None,
                       title: Optional[str] = None,
                       phone_number: Optional[str] = None)
    func NewMessageContact(ctx *Context, name string, args MessageContactArgs, opts ...ResourceOption) (*MessageContact, error)
    public MessageContact(string name, MessageContactArgs args, CustomResourceOptions? opts = null)
    public MessageContact(String name, MessageContactArgs args)
    public MessageContact(String name, MessageContactArgs args, CustomResourceOptions options)
    
    type: alicloud:resourcemanager:MessageContact
    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 MessageContactArgs
    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 MessageContactArgs
    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 MessageContactArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MessageContactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MessageContactArgs
    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 messageContactResource = new AliCloud.ResourceManager.MessageContact("messageContactResource", new()
    {
        EmailAddress = "string",
        MessageContactName = "string",
        MessageTypes = new[]
        {
            "string",
        },
        Title = "string",
        PhoneNumber = "string",
    });
    
    example, err := resourcemanager.NewMessageContact(ctx, "messageContactResource", &resourcemanager.MessageContactArgs{
    	EmailAddress:       pulumi.String("string"),
    	MessageContactName: pulumi.String("string"),
    	MessageTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Title:       pulumi.String("string"),
    	PhoneNumber: pulumi.String("string"),
    })
    
    var messageContactResource = new MessageContact("messageContactResource", MessageContactArgs.builder()
        .emailAddress("string")
        .messageContactName("string")
        .messageTypes("string")
        .title("string")
        .phoneNumber("string")
        .build());
    
    message_contact_resource = alicloud.resourcemanager.MessageContact("messageContactResource",
        email_address="string",
        message_contact_name="string",
        message_types=["string"],
        title="string",
        phone_number="string")
    
    const messageContactResource = new alicloud.resourcemanager.MessageContact("messageContactResource", {
        emailAddress: "string",
        messageContactName: "string",
        messageTypes: ["string"],
        title: "string",
        phoneNumber: "string",
    });
    
    type: alicloud:resourcemanager:MessageContact
    properties:
        emailAddress: string
        messageContactName: string
        messageTypes:
            - string
        phoneNumber: string
        title: string
    

    MessageContact 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 MessageContact resource accepts the following input properties:

    EmailAddress string
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    MessageContactName string
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    MessageTypes List<string>
    The types of messages received by the contact.
    Title string
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    PhoneNumber string

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    EmailAddress string
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    MessageContactName string
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    MessageTypes []string
    The types of messages received by the contact.
    Title string
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    PhoneNumber string

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    emailAddress String
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    messageContactName String
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    messageTypes List<String>
    The types of messages received by the contact.
    title String
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    phoneNumber String

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    emailAddress string
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    messageContactName string
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    messageTypes string[]
    The types of messages received by the contact.
    title string
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    phoneNumber string

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    email_address str
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    message_contact_name str
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    message_types Sequence[str]
    The types of messages received by the contact.
    title str
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    phone_number str

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    emailAddress String
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    messageContactName String
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    messageTypes List<String>
    The types of messages received by the contact.
    title String
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    phoneNumber String

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MessageContact resource produces the following output properties:

    CreateTime string
    The time when the contact was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the contact.
    CreateTime string
    The time when the contact was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the contact.
    createTime String
    The time when the contact was created.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the contact.
    createTime string
    The time when the contact was created.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the contact.
    create_time str
    The time when the contact was created.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the contact.
    createTime String
    The time when the contact was created.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the contact.

    Look up Existing MessageContact Resource

    Get an existing MessageContact 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?: MessageContactState, opts?: CustomResourceOptions): MessageContact
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            email_address: Optional[str] = None,
            message_contact_name: Optional[str] = None,
            message_types: Optional[Sequence[str]] = None,
            phone_number: Optional[str] = None,
            status: Optional[str] = None,
            title: Optional[str] = None) -> MessageContact
    func GetMessageContact(ctx *Context, name string, id IDInput, state *MessageContactState, opts ...ResourceOption) (*MessageContact, error)
    public static MessageContact Get(string name, Input<string> id, MessageContactState? state, CustomResourceOptions? opts = null)
    public static MessageContact get(String name, Output<String> id, MessageContactState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:resourcemanager:MessageContact    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.
    The following state arguments are supported:
    CreateTime string
    The time when the contact was created.
    EmailAddress string
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    MessageContactName string
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    MessageTypes List<string>
    The types of messages received by the contact.
    PhoneNumber string

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    Status string
    The status of the contact.
    Title string
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    CreateTime string
    The time when the contact was created.
    EmailAddress string
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    MessageContactName string
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    MessageTypes []string
    The types of messages received by the contact.
    PhoneNumber string

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    Status string
    The status of the contact.
    Title string
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    createTime String
    The time when the contact was created.
    emailAddress String
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    messageContactName String
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    messageTypes List<String>
    The types of messages received by the contact.
    phoneNumber String

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    status String
    The status of the contact.
    title String
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    createTime string
    The time when the contact was created.
    emailAddress string
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    messageContactName string
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    messageTypes string[]
    The types of messages received by the contact.
    phoneNumber string

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    status string
    The status of the contact.
    title string
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    create_time str
    The time when the contact was created.
    email_address str
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    message_contact_name str
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    message_types Sequence[str]
    The types of messages received by the contact.
    phone_number str

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    status str
    The status of the contact.
    title str
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other
    createTime String
    The time when the contact was created.
    emailAddress String
    The email address of the contact. After you specify an email address, you need to call SendEmailVerificationForMessageContact to send verification information to the email address. After the verification is passed, the email address takes effect.
    messageContactName String
    The name of the contact. The name must be unique in your resource directory. The name must be 2 to 12 characters in length and can contain only letters.
    messageTypes List<String>
    The types of messages received by the contact.
    phoneNumber String

    The mobile phone number of the contact.

    Specify the mobile phone number in the - format.

    NOTE: Only mobile phone numbers in the 86- format in the Chinese mainland are supported.

    After you specify a mobile phone number, you need to call SendPhoneVerificationForMessageContact to send verification information to the mobile phone number. After the verification is passed, the mobile phone number takes effect.

    status String
    The status of the contact.
    title String
    The job title of the contact.Valid values:

    • FinanceDirector
    • TechnicalDirector
    • MaintenanceDirector
    • CEO
    • ProjectDirector
    • Other

    Import

    Resource Manager Message Contact can be imported using the id, e.g.

    $ pulumi import alicloud:resourcemanager/messageContact:MessageContact 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.
    alicloud logo
    Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi