volcengine.vmp.ContactGroup
Explore with Pulumi AI
Provides a resource to manage vmp contact group
Example Usage
import * as pulumi from "@pulumi/pulumi";
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 foo1 = new volcengine.vmp.Contact("foo1", {
email: "acctest2@tftest.com",
webhook: {
address: "https://www.acctest2.com",
},
larkBotWebhook: {
address: "https://www.acctest2.com",
},
dingTalkBotWebhook: {
address: "https://www.dingacctest2.com",
atMobiles: ["18046891813"],
},
phoneNumber: {
countryCode: "+86",
number: "18310101011",
},
});
const fooContactGroup = new volcengine.vmp.ContactGroup("fooContactGroup", {contactIds: [
fooContact.id,
foo1.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",
))
foo1 = volcengine.vmp.Contact("foo1",
email="acctest2@tftest.com",
webhook=volcengine.vmp.ContactWebhookArgs(
address="https://www.acctest2.com",
),
lark_bot_webhook=volcengine.vmp.ContactLarkBotWebhookArgs(
address="https://www.acctest2.com",
),
ding_talk_bot_webhook=volcengine.vmp.ContactDingTalkBotWebhookArgs(
address="https://www.dingacctest2.com",
at_mobiles=["18046891813"],
),
phone_number=volcengine.vmp.ContactPhoneNumberArgs(
country_code="+86",
number="18310101011",
))
foo_contact_group = volcengine.vmp.ContactGroup("fooContactGroup", contact_ids=[
foo_contact.id,
foo1.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
}
foo1, err := vmp.NewContact(ctx, "foo1", &vmp.ContactArgs{
Email: pulumi.String("acctest2@tftest.com"),
Webhook: &vmp.ContactWebhookArgs{
Address: pulumi.String("https://www.acctest2.com"),
},
LarkBotWebhook: &vmp.ContactLarkBotWebhookArgs{
Address: pulumi.String("https://www.acctest2.com"),
},
DingTalkBotWebhook: &vmp.ContactDingTalkBotWebhookArgs{
Address: pulumi.String("https://www.dingacctest2.com"),
AtMobiles: pulumi.StringArray{
pulumi.String("18046891813"),
},
},
PhoneNumber: &vmp.ContactPhoneNumberArgs{
CountryCode: pulumi.String("+86"),
Number: pulumi.String("18310101011"),
},
})
if err != nil {
return err
}
_, err = vmp.NewContactGroup(ctx, "fooContactGroup", &vmp.ContactGroupArgs{
ContactIds: pulumi.StringArray{
fooContact.ID(),
foo1.ID(),
},
})
if err != nil {
return err
}
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 foo1 = new Volcengine.Vmp.Contact("foo1", new()
{
Email = "acctest2@tftest.com",
Webhook = new Volcengine.Vmp.Inputs.ContactWebhookArgs
{
Address = "https://www.acctest2.com",
},
LarkBotWebhook = new Volcengine.Vmp.Inputs.ContactLarkBotWebhookArgs
{
Address = "https://www.acctest2.com",
},
DingTalkBotWebhook = new Volcengine.Vmp.Inputs.ContactDingTalkBotWebhookArgs
{
Address = "https://www.dingacctest2.com",
AtMobiles = new[]
{
"18046891813",
},
},
PhoneNumber = new Volcengine.Vmp.Inputs.ContactPhoneNumberArgs
{
CountryCode = "+86",
Number = "18310101011",
},
});
var fooContactGroup = new Volcengine.Vmp.ContactGroup("fooContactGroup", new()
{
ContactIds = new[]
{
fooContact.Id,
foo1.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.ContactGroup;
import com.pulumi.volcengine.vmp.ContactGroupArgs;
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());
var foo1 = new Contact("foo1", ContactArgs.builder()
.email("acctest2@tftest.com")
.webhook(ContactWebhookArgs.builder()
.address("https://www.acctest2.com")
.build())
.larkBotWebhook(ContactLarkBotWebhookArgs.builder()
.address("https://www.acctest2.com")
.build())
.dingTalkBotWebhook(ContactDingTalkBotWebhookArgs.builder()
.address("https://www.dingacctest2.com")
.atMobiles("18046891813")
.build())
.phoneNumber(ContactPhoneNumberArgs.builder()
.countryCode("+86")
.number("18310101011")
.build())
.build());
var fooContactGroup = new ContactGroup("fooContactGroup", ContactGroupArgs.builder()
.contactIds(
fooContact.id(),
foo1.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'
foo1:
type: volcengine:vmp:Contact
properties:
email: acctest2@tftest.com
webhook:
address: https://www.acctest2.com
larkBotWebhook:
address: https://www.acctest2.com
dingTalkBotWebhook:
address: https://www.dingacctest2.com
atMobiles:
- '18046891813'
phoneNumber:
countryCode: '+86'
number: '18310101011'
fooContactGroup:
type: volcengine:vmp:ContactGroup
properties:
contactIds:
- ${fooContact.id}
- ${foo1.id}
Create ContactGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ContactGroup(name: string, args?: ContactGroupArgs, opts?: CustomResourceOptions);
@overload
def ContactGroup(resource_name: str,
args: Optional[ContactGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ContactGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
contact_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None)
func NewContactGroup(ctx *Context, name string, args *ContactGroupArgs, opts ...ResourceOption) (*ContactGroup, error)
public ContactGroup(string name, ContactGroupArgs? args = null, CustomResourceOptions? opts = null)
public ContactGroup(String name, ContactGroupArgs args)
public ContactGroup(String name, ContactGroupArgs args, CustomResourceOptions options)
type: volcengine:vmp:ContactGroup
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 ContactGroupArgs
- 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 ContactGroupArgs
- 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 ContactGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContactGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContactGroupArgs
- 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 volcengineContactGroupResource = new Volcengine.Vmp.ContactGroup("volcengineContactGroupResource", new()
{
ContactIds = new[]
{
"string",
},
Name = "string",
});
example, err := vmp.NewContactGroup(ctx, "volcengineContactGroupResource", &vmp.ContactGroupArgs{
ContactIds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var volcengineContactGroupResource = new com.pulumi.volcengine.vmp.ContactGroup("volcengineContactGroupResource", com.pulumi.volcengine.vmp.ContactGroupArgs.builder()
.contactIds("string")
.name("string")
.build());
volcengine_contact_group_resource = volcengine.vmp.ContactGroup("volcengineContactGroupResource",
contact_ids=["string"],
name="string")
const volcengineContactGroupResource = new volcengine.vmp.ContactGroup("volcengineContactGroupResource", {
contactIds: ["string"],
name: "string",
});
type: volcengine:vmp:ContactGroup
properties:
contactIds:
- string
name: string
ContactGroup 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 ContactGroup resource accepts the following input properties:
- Contact
Ids List<string> - A list of contact IDs.
- Name string
- The name of the contact group.
- Contact
Ids []string - A list of contact IDs.
- Name string
- The name of the contact group.
- contact
Ids List<String> - A list of contact IDs.
- name String
- The name of the contact group.
- contact
Ids string[] - A list of contact IDs.
- name string
- The name of the contact group.
- contact_
ids Sequence[str] - A list of contact IDs.
- name str
- The name of the contact group.
- contact
Ids List<String> - A list of contact IDs.
- name String
- The name of the contact group.
Outputs
All input properties are implicitly available as output properties. Additionally, the ContactGroup resource produces the following output properties:
- Create
Time string - The create time of contact group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The create time of contact group.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The create time of contact group.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - The create time of contact group.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - The create time of contact group.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - The create time of contact group.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ContactGroup Resource
Get an existing ContactGroup 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?: ContactGroupState, opts?: CustomResourceOptions): ContactGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
contact_ids: Optional[Sequence[str]] = None,
create_time: Optional[str] = None,
name: Optional[str] = None) -> ContactGroup
func GetContactGroup(ctx *Context, name string, id IDInput, state *ContactGroupState, opts ...ResourceOption) (*ContactGroup, error)
public static ContactGroup Get(string name, Input<string> id, ContactGroupState? state, CustomResourceOptions? opts = null)
public static ContactGroup get(String name, Output<String> id, ContactGroupState state, CustomResourceOptions options)
resources: _: type: volcengine:vmp:ContactGroup 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.
- Contact
Ids List<string> - A list of contact IDs.
- Create
Time string - The create time of contact group.
- Name string
- The name of the contact group.
- Contact
Ids []string - A list of contact IDs.
- Create
Time string - The create time of contact group.
- Name string
- The name of the contact group.
- contact
Ids List<String> - A list of contact IDs.
- create
Time String - The create time of contact group.
- name String
- The name of the contact group.
- contact
Ids string[] - A list of contact IDs.
- create
Time string - The create time of contact group.
- name string
- The name of the contact group.
- contact_
ids Sequence[str] - A list of contact IDs.
- create_
time str - The create time of contact group.
- name str
- The name of the contact group.
- contact
Ids List<String> - A list of contact IDs.
- create
Time String - The create time of contact group.
- name String
- The name of the contact group.
Import
VMP Contact Group can be imported using the id, e.g.
$ pulumi import volcengine:vmp/contactGroup:ContactGroup default 60dde3ca-951c-4c05-8777-e5a7caa07ad6
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.