Alibaba Cloud

v3.10.0 published on Wednesday, Nov 24, 2021 by Pulumi

getMscSubContacts

This data source provides the Message Center Contacts of the current Alibaba Cloud user.

NOTE: Available in v1.132.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.GetMscSubContacts.InvokeAsync());
        this.MscSubContactId1 = ids.Apply(ids => ids.Contacts?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.GetMscSubContacts.InvokeAsync(new AliCloud.GetMscSubContactsArgs
        {
            NameRegex = "^my-Contact",
        }));
        this.MscSubContactId2 = nameRegex.Apply(nameRegex => nameRegex.Contacts?[0]?.Id);
    }

    [Output("mscSubContactId1")]
    public Output<string> MscSubContactId1 { get; set; }
    [Output("mscSubContactId2")]
    public Output<string> MscSubContactId2 { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := alicloud.GetMscSubContacts(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("mscSubContactId1", ids.Contacts[0].Id)
		opt0 := "^my-Contact"
		nameRegex, err := alicloud.GetMscSubContacts(ctx, &GetMscSubContactsArgs{
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("mscSubContactId2", nameRegex.Contacts[0].Id)
		return nil
	})
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.get_msc_sub_contacts()
pulumi.export("mscSubContactId1", ids.contacts[0].id)
name_regex = alicloud.get_msc_sub_contacts(name_regex="^my-Contact")
pulumi.export("mscSubContactId2", name_regex.contacts[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.getMscSubContacts({});
export const mscSubContactId1 = ids.then(ids => ids.contacts?[0]?.id);
const nameRegex = alicloud.getMscSubContacts({
    nameRegex: "^my-Contact",
});
export const mscSubContactId2 = nameRegex.then(nameRegex => nameRegex.contacts?[0]?.id);

Using getMscSubContacts

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 getMscSubContacts(args: GetMscSubContactsArgs, opts?: InvokeOptions): Promise<GetMscSubContactsResult>
function getMscSubContactsOutput(args: GetMscSubContactsOutputArgs, opts?: InvokeOptions): Output<GetMscSubContactsResult>
def get_msc_sub_contacts(ids: Optional[Sequence[str]] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetMscSubContactsResult
def get_msc_sub_contacts_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetMscSubContactsResult]
func GetMscSubContacts(ctx *Context, args *GetMscSubContactsArgs, opts ...InvokeOption) (*GetMscSubContactsResult, error)
func GetMscSubContactsOutput(ctx *Context, args *GetMscSubContactsOutputArgs, opts ...InvokeOption) GetMscSubContactsResultOutput

> Note: This function is named GetMscSubContacts in the Go SDK.

public static class GetMscSubContacts 
{
    public static Task<GetMscSubContactsResult> InvokeAsync(GetMscSubContactsArgs args, InvokeOptions? opts = null)
    public static Output<GetMscSubContactsResult> Invoke(GetMscSubContactsInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Ids List<string>
A list of Contact IDs.
NameRegex string
A regex string to filter results by Contact name.
OutputFile string
Ids []string
A list of Contact IDs.
NameRegex string
A regex string to filter results by Contact name.
OutputFile string
ids string[]
A list of Contact IDs.
nameRegex string
A regex string to filter results by Contact name.
outputFile string
ids Sequence[str]
A list of Contact IDs.
name_regex str
A regex string to filter results by Contact name.
output_file str

getMscSubContacts Result

The following output properties are available:

Contacts List<Pulumi.AliCloud.Outputs.GetMscSubContactsContact>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
NameRegex string
OutputFile string
Contacts []GetMscSubContactsContact
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
NameRegex string
OutputFile string
contacts GetMscSubContactsContact[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
nameRegex string
outputFile string
contacts Sequence[GetMscSubContactsContact]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
name_regex str
output_file str

Supporting Types

GetMscSubContactsContact

AccountUid string
UID.
ContactId string
The first ID of the resource.
ContactName string
The User’s Contact Name. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
Email string
The User’s Contact Email Address.
Id string
The ID of the Contact.
IsAccount bool
Indicates Whether the BGP Group Is the Account Itself.
IsObsolete bool
Whether They Have Expired Or Not.
IsVerifiedEmail bool
Email Validation for.
IsVerifiedMobile bool
If the Phone Verification.
LastEmailVerificationTimeStamp string
Last Verification Email Transmission Time.
LastMobileVerificationTimeStamp string
The Pieces of Authentication SMS Sending Time.
Mobile string
The User’s Telephone.
Position string
The User’s Position. Valid values: CEO, Technical Director, Maintenance Director, Project Director,Finance Director and Other.
AccountUid string
UID.
ContactId string
The first ID of the resource.
ContactName string
The User’s Contact Name. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
Email string
The User’s Contact Email Address.
Id string
The ID of the Contact.
IsAccount bool
Indicates Whether the BGP Group Is the Account Itself.
IsObsolete bool
Whether They Have Expired Or Not.
IsVerifiedEmail bool
Email Validation for.
IsVerifiedMobile bool
If the Phone Verification.
LastEmailVerificationTimeStamp string
Last Verification Email Transmission Time.
LastMobileVerificationTimeStamp string
The Pieces of Authentication SMS Sending Time.
Mobile string
The User’s Telephone.
Position string
The User’s Position. Valid values: CEO, Technical Director, Maintenance Director, Project Director,Finance Director and Other.
accountUid string
UID.
contactId string
The first ID of the resource.
contactName string
The User’s Contact Name. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
email string
The User’s Contact Email Address.
id string
The ID of the Contact.
isAccount boolean
Indicates Whether the BGP Group Is the Account Itself.
isObsolete boolean
Whether They Have Expired Or Not.
isVerifiedEmail boolean
Email Validation for.
isVerifiedMobile boolean
If the Phone Verification.
lastEmailVerificationTimeStamp string
Last Verification Email Transmission Time.
lastMobileVerificationTimeStamp string
The Pieces of Authentication SMS Sending Time.
mobile string
The User’s Telephone.
position string
The User’s Position. Valid values: CEO, Technical Director, Maintenance Director, Project Director,Finance Director and Other.
account_uid str
UID.
contact_id str
The first ID of the resource.
contact_name str
The User’s Contact Name. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
email str
The User’s Contact Email Address.
id str
The ID of the Contact.
is_account bool
Indicates Whether the BGP Group Is the Account Itself.
is_obsolete bool
Whether They Have Expired Or Not.
is_verified_email bool
Email Validation for.
is_verified_mobile bool
If the Phone Verification.
last_email_verification_time_stamp str
Last Verification Email Transmission Time.
last_mobile_verification_time_stamp str
The Pieces of Authentication SMS Sending Time.
mobile str
The User’s Telephone.
position str
The User’s Position. Valid values: CEO, Technical Director, Maintenance Director, Project Director,Finance Director and Other.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.