1. Packages
  2. Volcengine
  3. API Docs
  4. vmp
  5. getContacts
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.vmp.getContacts

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Use this data source to query detailed information of vmp contacts

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooContact = new volcengine.vmp.Contact("fooContact", {
        email: "acctest1@tftest.com",
        webhook: {
            address: "https://www.acctest1.com",
        },
        larkBotWebhook: {
            address: "https://www.acctest1.com",
        },
        dingTalkBotWebhook: {
            address: "https://www.dingacctest1.com",
            atMobiles: ["18046891812"],
        },
        phoneNumber: {
            countryCode: "+86",
            number: "18310101010",
        },
    });
    const fooContacts = volcengine.vmp.getContactsOutput({
        ids: [fooContact.id],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_contact = volcengine.vmp.Contact("fooContact",
        email="acctest1@tftest.com",
        webhook=volcengine.vmp.ContactWebhookArgs(
            address="https://www.acctest1.com",
        ),
        lark_bot_webhook=volcengine.vmp.ContactLarkBotWebhookArgs(
            address="https://www.acctest1.com",
        ),
        ding_talk_bot_webhook=volcengine.vmp.ContactDingTalkBotWebhookArgs(
            address="https://www.dingacctest1.com",
            at_mobiles=["18046891812"],
        ),
        phone_number=volcengine.vmp.ContactPhoneNumberArgs(
            country_code="+86",
            number="18310101010",
        ))
    foo_contacts = volcengine.vmp.get_contacts_output(ids=[foo_contact.id])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vmp"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooContact, err := vmp.NewContact(ctx, "fooContact", &vmp.ContactArgs{
    			Email: pulumi.String("acctest1@tftest.com"),
    			Webhook: &vmp.ContactWebhookArgs{
    				Address: pulumi.String("https://www.acctest1.com"),
    			},
    			LarkBotWebhook: &vmp.ContactLarkBotWebhookArgs{
    				Address: pulumi.String("https://www.acctest1.com"),
    			},
    			DingTalkBotWebhook: &vmp.ContactDingTalkBotWebhookArgs{
    				Address: pulumi.String("https://www.dingacctest1.com"),
    				AtMobiles: pulumi.StringArray{
    					pulumi.String("18046891812"),
    				},
    			},
    			PhoneNumber: &vmp.ContactPhoneNumberArgs{
    				CountryCode: pulumi.String("+86"),
    				Number:      pulumi.String("18310101010"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = vmp.GetContactsOutput(ctx, vmp.GetContactsOutputArgs{
    			Ids: pulumi.StringArray{
    				fooContact.ID(),
    			},
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooContact = new Volcengine.Vmp.Contact("fooContact", new()
        {
            Email = "acctest1@tftest.com",
            Webhook = new Volcengine.Vmp.Inputs.ContactWebhookArgs
            {
                Address = "https://www.acctest1.com",
            },
            LarkBotWebhook = new Volcengine.Vmp.Inputs.ContactLarkBotWebhookArgs
            {
                Address = "https://www.acctest1.com",
            },
            DingTalkBotWebhook = new Volcengine.Vmp.Inputs.ContactDingTalkBotWebhookArgs
            {
                Address = "https://www.dingacctest1.com",
                AtMobiles = new[]
                {
                    "18046891812",
                },
            },
            PhoneNumber = new Volcengine.Vmp.Inputs.ContactPhoneNumberArgs
            {
                CountryCode = "+86",
                Number = "18310101010",
            },
        });
    
        var fooContacts = Volcengine.Vmp.GetContacts.Invoke(new()
        {
            Ids = new[]
            {
                fooContact.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vmp.Contact;
    import com.pulumi.volcengine.vmp.ContactArgs;
    import com.pulumi.volcengine.vmp.inputs.ContactWebhookArgs;
    import com.pulumi.volcengine.vmp.inputs.ContactLarkBotWebhookArgs;
    import com.pulumi.volcengine.vmp.inputs.ContactDingTalkBotWebhookArgs;
    import com.pulumi.volcengine.vmp.inputs.ContactPhoneNumberArgs;
    import com.pulumi.volcengine.vmp.VmpFunctions;
    import com.pulumi.volcengine.vmp.inputs.GetContactsArgs;
    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) {
            var fooContact = new Contact("fooContact", ContactArgs.builder()        
                .email("acctest1@tftest.com")
                .webhook(ContactWebhookArgs.builder()
                    .address("https://www.acctest1.com")
                    .build())
                .larkBotWebhook(ContactLarkBotWebhookArgs.builder()
                    .address("https://www.acctest1.com")
                    .build())
                .dingTalkBotWebhook(ContactDingTalkBotWebhookArgs.builder()
                    .address("https://www.dingacctest1.com")
                    .atMobiles("18046891812")
                    .build())
                .phoneNumber(ContactPhoneNumberArgs.builder()
                    .countryCode("+86")
                    .number("18310101010")
                    .build())
                .build());
    
            final var fooContacts = VmpFunctions.getContacts(GetContactsArgs.builder()
                .ids(fooContact.id())
                .build());
    
        }
    }
    
    resources:
      fooContact:
        type: volcengine:vmp:Contact
        properties:
          email: acctest1@tftest.com
          webhook:
            address: https://www.acctest1.com
          larkBotWebhook:
            address: https://www.acctest1.com
          dingTalkBotWebhook:
            address: https://www.dingacctest1.com
            atMobiles:
              - '18046891812'
          phoneNumber:
            countryCode: '+86'
            number: '18310101010'
    variables:
      fooContacts:
        fn::invoke:
          Function: volcengine:vmp:getContacts
          Arguments:
            ids:
              - ${fooContact.id}
    

    Using getContacts

    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 getContacts(args: GetContactsArgs, opts?: InvokeOptions): Promise<GetContactsResult>
    function getContactsOutput(args: GetContactsOutputArgs, opts?: InvokeOptions): Output<GetContactsResult>
    def get_contacts(email: Optional[str] = None,
                     ids: Optional[Sequence[str]] = None,
                     name: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetContactsResult
    def get_contacts_output(email: Optional[pulumi.Input[str]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetContactsResult]
    func GetContacts(ctx *Context, args *GetContactsArgs, opts ...InvokeOption) (*GetContactsResult, error)
    func GetContactsOutput(ctx *Context, args *GetContactsOutputArgs, opts ...InvokeOption) GetContactsResultOutput

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

    public static class GetContacts 
    {
        public static Task<GetContactsResult> InvokeAsync(GetContactsArgs args, InvokeOptions? opts = null)
        public static Output<GetContactsResult> Invoke(GetContactsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContactsResult> getContacts(GetContactsArgs args, InvokeOptions options)
    public static Output<GetContactsResult> getContacts(GetContactsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:vmp/getContacts:getContacts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Email string
    The email of contact.
    Ids List<string>
    A list of contact ids.
    Name string
    The name of contact.
    OutputFile string
    File name where to save data source results.
    Email string
    The email of contact.
    Ids []string
    A list of contact ids.
    Name string
    The name of contact.
    OutputFile string
    File name where to save data source results.
    email String
    The email of contact.
    ids List<String>
    A list of contact ids.
    name String
    The name of contact.
    outputFile String
    File name where to save data source results.
    email string
    The email of contact.
    ids string[]
    A list of contact ids.
    name string
    The name of contact.
    outputFile string
    File name where to save data source results.
    email str
    The email of contact.
    ids Sequence[str]
    A list of contact ids.
    name str
    The name of contact.
    output_file str
    File name where to save data source results.
    email String
    The email of contact.
    ids List<String>
    A list of contact ids.
    name String
    The name of contact.
    outputFile String
    File name where to save data source results.

    getContacts Result

    The following output properties are available:

    Contacts List<GetContactsContact>
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    Email string
    The email of contact.
    Ids List<string>
    Name string
    The name of contact.
    OutputFile string
    Contacts []GetContactsContact
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    Email string
    The email of contact.
    Ids []string
    Name string
    The name of contact.
    OutputFile string
    contacts List<GetContactsContact>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Integer
    The total count of query.
    email String
    The email of contact.
    ids List<String>
    name String
    The name of contact.
    outputFile String
    contacts GetContactsContact[]
    The collection of query.
    id string
    The provider-assigned unique ID for this managed resource.
    totalCount number
    The total count of query.
    email string
    The email of contact.
    ids string[]
    name string
    The name of contact.
    outputFile string
    contacts Sequence[GetContactsContact]
    The collection of query.
    id str
    The provider-assigned unique ID for this managed resource.
    total_count int
    The total count of query.
    email str
    The email of contact.
    ids Sequence[str]
    name str
    The name of contact.
    output_file str
    contacts List<Property Map>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Number
    The total count of query.
    email String
    The email of contact.
    ids List<String>
    name String
    The name of contact.
    outputFile String

    Supporting Types

    GetContactsContact

    ContactGroupIds List<string>
    A list of contact group ids.
    CreateTime string
    The create time of contact.
    DingTalkBotWebhooks List<GetContactsContactDingTalkBotWebhook>
    The ding talk bot webhook of contact.
    Email string
    The email of contact.
    EmailActive bool
    Whether the email of contact active.
    Id string
    The ID of contact.
    LarkBotWebhooks List<GetContactsContactLarkBotWebhook>
    The lark bot webhook of contact.
    Name string
    The name of contact.
    PhoneNumberActive bool
    Whether phone number is active.
    PhoneNumbers List<GetContactsContactPhoneNumber>
    The phone number of contact.
    WeComBotWebhooks List<GetContactsContactWeComBotWebhook>
    The we com bot webhook of contact.
    Webhooks List<GetContactsContactWebhook>
    The webhook of contact.
    ContactGroupIds []string
    A list of contact group ids.
    CreateTime string
    The create time of contact.
    DingTalkBotWebhooks []GetContactsContactDingTalkBotWebhook
    The ding talk bot webhook of contact.
    Email string
    The email of contact.
    EmailActive bool
    Whether the email of contact active.
    Id string
    The ID of contact.
    LarkBotWebhooks []GetContactsContactLarkBotWebhook
    The lark bot webhook of contact.
    Name string
    The name of contact.
    PhoneNumberActive bool
    Whether phone number is active.
    PhoneNumbers []GetContactsContactPhoneNumber
    The phone number of contact.
    WeComBotWebhooks []GetContactsContactWeComBotWebhook
    The we com bot webhook of contact.
    Webhooks []GetContactsContactWebhook
    The webhook of contact.
    contactGroupIds List<String>
    A list of contact group ids.
    createTime String
    The create time of contact.
    dingTalkBotWebhooks List<GetContactsContactDingTalkBotWebhook>
    The ding talk bot webhook of contact.
    email String
    The email of contact.
    emailActive Boolean
    Whether the email of contact active.
    id String
    The ID of contact.
    larkBotWebhooks List<GetContactsContactLarkBotWebhook>
    The lark bot webhook of contact.
    name String
    The name of contact.
    phoneNumberActive Boolean
    Whether phone number is active.
    phoneNumbers List<GetContactsContactPhoneNumber>
    The phone number of contact.
    weComBotWebhooks List<GetContactsContactWeComBotWebhook>
    The we com bot webhook of contact.
    webhooks List<GetContactsContactWebhook>
    The webhook of contact.
    contactGroupIds string[]
    A list of contact group ids.
    createTime string
    The create time of contact.
    dingTalkBotWebhooks GetContactsContactDingTalkBotWebhook[]
    The ding talk bot webhook of contact.
    email string
    The email of contact.
    emailActive boolean
    Whether the email of contact active.
    id string
    The ID of contact.
    larkBotWebhooks GetContactsContactLarkBotWebhook[]
    The lark bot webhook of contact.
    name string
    The name of contact.
    phoneNumberActive boolean
    Whether phone number is active.
    phoneNumbers GetContactsContactPhoneNumber[]
    The phone number of contact.
    weComBotWebhooks GetContactsContactWeComBotWebhook[]
    The we com bot webhook of contact.
    webhooks GetContactsContactWebhook[]
    The webhook of contact.
    contact_group_ids Sequence[str]
    A list of contact group ids.
    create_time str
    The create time of contact.
    ding_talk_bot_webhooks Sequence[GetContactsContactDingTalkBotWebhook]
    The ding talk bot webhook of contact.
    email str
    The email of contact.
    email_active bool
    Whether the email of contact active.
    id str
    The ID of contact.
    lark_bot_webhooks Sequence[GetContactsContactLarkBotWebhook]
    The lark bot webhook of contact.
    name str
    The name of contact.
    phone_number_active bool
    Whether phone number is active.
    phone_numbers Sequence[GetContactsContactPhoneNumber]
    The phone number of contact.
    we_com_bot_webhooks Sequence[GetContactsContactWeComBotWebhook]
    The we com bot webhook of contact.
    webhooks Sequence[GetContactsContactWebhook]
    The webhook of contact.
    contactGroupIds List<String>
    A list of contact group ids.
    createTime String
    The create time of contact.
    dingTalkBotWebhooks List<Property Map>
    The ding talk bot webhook of contact.
    email String
    The email of contact.
    emailActive Boolean
    Whether the email of contact active.
    id String
    The ID of contact.
    larkBotWebhooks List<Property Map>
    The lark bot webhook of contact.
    name String
    The name of contact.
    phoneNumberActive Boolean
    Whether phone number is active.
    phoneNumbers List<Property Map>
    The phone number of contact.
    weComBotWebhooks List<Property Map>
    The we com bot webhook of contact.
    webhooks List<Property Map>
    The webhook of contact.

    GetContactsContactDingTalkBotWebhook

    Address string
    The address of webhook.
    AtMobiles List<string>
    The mobiles of user.
    AtUserIds List<string>
    The ids of user.
    SecretKey string
    The secret key of webhook.
    Address string
    The address of webhook.
    AtMobiles []string
    The mobiles of user.
    AtUserIds []string
    The ids of user.
    SecretKey string
    The secret key of webhook.
    address String
    The address of webhook.
    atMobiles List<String>
    The mobiles of user.
    atUserIds List<String>
    The ids of user.
    secretKey String
    The secret key of webhook.
    address string
    The address of webhook.
    atMobiles string[]
    The mobiles of user.
    atUserIds string[]
    The ids of user.
    secretKey string
    The secret key of webhook.
    address str
    The address of webhook.
    at_mobiles Sequence[str]
    The mobiles of user.
    at_user_ids Sequence[str]
    The ids of user.
    secret_key str
    The secret key of webhook.
    address String
    The address of webhook.
    atMobiles List<String>
    The mobiles of user.
    atUserIds List<String>
    The ids of user.
    secretKey String
    The secret key of webhook.

    GetContactsContactLarkBotWebhook

    Address string
    The address of webhook.
    SecretKey string
    The secret key of webhook.
    Address string
    The address of webhook.
    SecretKey string
    The secret key of webhook.
    address String
    The address of webhook.
    secretKey String
    The secret key of webhook.
    address string
    The address of webhook.
    secretKey string
    The secret key of webhook.
    address str
    The address of webhook.
    secret_key str
    The secret key of webhook.
    address String
    The address of webhook.
    secretKey String
    The secret key of webhook.

    GetContactsContactPhoneNumber

    CountryCode string
    The country code of phone number.
    Number string
    The number of phone number.
    CountryCode string
    The country code of phone number.
    Number string
    The number of phone number.
    countryCode String
    The country code of phone number.
    number String
    The number of phone number.
    countryCode string
    The country code of phone number.
    number string
    The number of phone number.
    country_code str
    The country code of phone number.
    number str
    The number of phone number.
    countryCode String
    The country code of phone number.
    number String
    The number of phone number.

    GetContactsContactWeComBotWebhook

    Address string
    The address of webhook.
    AtUserIds List<string>
    The ids of user.
    Address string
    The address of webhook.
    AtUserIds []string
    The ids of user.
    address String
    The address of webhook.
    atUserIds List<String>
    The ids of user.
    address string
    The address of webhook.
    atUserIds string[]
    The ids of user.
    address str
    The address of webhook.
    at_user_ids Sequence[str]
    The ids of user.
    address String
    The address of webhook.
    atUserIds List<String>
    The ids of user.

    GetContactsContactWebhook

    Address string
    The address of webhook.
    Token string
    The token of webhook.
    Address string
    The address of webhook.
    Token string
    The token of webhook.
    address String
    The address of webhook.
    token String
    The token of webhook.
    address string
    The address of webhook.
    token string
    The token of webhook.
    address str
    The address of webhook.
    token str
    The token of webhook.
    address String
    The address of webhook.
    token String
    The token of webhook.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine