Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.getMscSubContacts
Explore with Pulumi AI
This data source provides the Message Center Contacts of the current Alibaba Cloud user.
NOTE: Available in v1.132.0+.
Example Usage
Basic Usage
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);
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)
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, &alicloud.GetMscSubContactsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("mscSubContactId1", ids.Contacts[0].Id)
nameRegex, err := alicloud.GetMscSubContacts(ctx, &alicloud.GetMscSubContactsArgs{
NameRegex: pulumi.StringRef("^my-Contact"),
}, nil)
if err != nil {
return err
}
ctx.Export("mscSubContactId2", nameRegex.Contacts[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.GetMscSubContacts.Invoke();
var nameRegex = AliCloud.GetMscSubContacts.Invoke(new()
{
NameRegex = "^my-Contact",
});
return new Dictionary<string, object?>
{
["mscSubContactId1"] = ids.Apply(getMscSubContactsResult => getMscSubContactsResult.Contacts[0]?.Id),
["mscSubContactId2"] = nameRegex.Apply(getMscSubContactsResult => getMscSubContactsResult.Contacts[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetMscSubContactsArgs;
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 = AlicloudFunctions.getMscSubContacts();
ctx.export("mscSubContactId1", ids.applyValue(getMscSubContactsResult -> getMscSubContactsResult.contacts()[0].id()));
final var nameRegex = AlicloudFunctions.getMscSubContacts(GetMscSubContactsArgs.builder()
.nameRegex("^my-Contact")
.build());
ctx.export("mscSubContactId2", nameRegex.applyValue(getMscSubContactsResult -> getMscSubContactsResult.contacts()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:getMscSubContacts
Arguments: {}
nameRegex:
fn::invoke:
Function: alicloud:getMscSubContacts
Arguments:
nameRegex: ^my-Contact
outputs:
mscSubContactId1: ${ids.contacts[0].id}
mscSubContactId2: ${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)
}
public static CompletableFuture<GetMscSubContactsResult> getMscSubContacts(GetMscSubContactsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:index/getMscSubContacts:getMscSubContacts
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Contact IDs.
- Name
Regex string - A regex string to filter results by Contact name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids []string
- A list of Contact IDs.
- Name
Regex string - A regex string to filter results by Contact name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Contact IDs.
- name
Regex String - A regex string to filter results by Contact name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string[]
- A list of Contact IDs.
- name
Regex string - A regex string to filter results by Contact name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids Sequence[str]
- A list of Contact IDs.
- name_
regex str - A regex string to filter results by Contact name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Contact IDs.
- name
Regex String - A regex string to filter results by Contact name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getMscSubContacts Result
The following output properties are available:
- Contacts
List<Pulumi.
Ali Cloud. Outputs. Get Msc Sub Contacts Contact> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Name
Regex string - Output
File string
- Contacts
[]Get
Msc Sub Contacts Contact - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Name
Regex string - Output
File string
- contacts
List<Get
Msc Sub Contacts Contact> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - output
File String
- contacts
Get
Msc Sub Contacts Contact[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- name
Regex string - output
File string
- contacts
Sequence[Get
Msc Sub Contacts Contact] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- name_
regex str - output_
file str
- contacts List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - output
File String
Supporting Types
GetMscSubContactsContact
- Account
Uid string - UID.
- Contact
Id string - The first ID of the resource.
- Contact
Name 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.
- Is
Account bool - Indicates Whether the BGP Group Is the Account Itself.
- Is
Obsolete bool - Whether They Have Expired Or Not.
- Is
Verified boolEmail - Email Validation for.
- Is
Verified boolMobile - If the Phone Verification.
- Last
Email stringVerification Time Stamp - Last Verification Email Transmission Time.
- Last
Mobile stringVerification Time Stamp - 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
andOther
.
- Account
Uid string - UID.
- Contact
Id string - The first ID of the resource.
- Contact
Name 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.
- Is
Account bool - Indicates Whether the BGP Group Is the Account Itself.
- Is
Obsolete bool - Whether They Have Expired Or Not.
- Is
Verified boolEmail - Email Validation for.
- Is
Verified boolMobile - If the Phone Verification.
- Last
Email stringVerification Time Stamp - Last Verification Email Transmission Time.
- Last
Mobile stringVerification Time Stamp - 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
andOther
.
- account
Uid String - UID.
- contact
Id String - The first ID of the resource.
- contact
Name 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.
- is
Account Boolean - Indicates Whether the BGP Group Is the Account Itself.
- is
Obsolete Boolean - Whether They Have Expired Or Not.
- is
Verified BooleanEmail - Email Validation for.
- is
Verified BooleanMobile - If the Phone Verification.
- last
Email StringVerification Time Stamp - Last Verification Email Transmission Time.
- last
Mobile StringVerification Time Stamp - 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
andOther
.
- account
Uid string - UID.
- contact
Id string - The first ID of the resource.
- contact
Name 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.
- is
Account boolean - Indicates Whether the BGP Group Is the Account Itself.
- is
Obsolete boolean - Whether They Have Expired Or Not.
- is
Verified booleanEmail - Email Validation for.
- is
Verified booleanMobile - If the Phone Verification.
- last
Email stringVerification Time Stamp - Last Verification Email Transmission Time.
- last
Mobile stringVerification Time Stamp - 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
andOther
.
- 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_ boolemail - Email Validation for.
- is_
verified_ boolmobile - If the Phone Verification.
- last_
email_ strverification_ time_ stamp - Last Verification Email Transmission Time.
- last_
mobile_ strverification_ time_ stamp - 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
andOther
.
- account
Uid String - UID.
- contact
Id String - The first ID of the resource.
- contact
Name 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.
- is
Account Boolean - Indicates Whether the BGP Group Is the Account Itself.
- is
Obsolete Boolean - Whether They Have Expired Or Not.
- is
Verified BooleanEmail - Email Validation for.
- is
Verified BooleanMobile - If the Phone Verification.
- last
Email StringVerification Time Stamp - Last Verification Email Transmission Time.
- last
Mobile StringVerification Time Stamp - 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
andOther
.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.