@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
159 lines (158 loc) • 5.27 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage vmp notify policy
* ## Example Usage
*
* ```typescript
* 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 foo1Contact = new volcengine.vmp.Contact("foo1Contact", {
* 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]});
* const foo1ContactGroup = new volcengine.vmp.ContactGroup("foo1ContactGroup", {contactIds: [foo1Contact.id]});
* const fooNotifyPolicy = new volcengine.vmp.NotifyPolicy("fooNotifyPolicy", {
* description: "acc-test-1",
* levels: [
* {
* level: "P1",
* contactGroupIds: [fooContactGroup.id],
* channels: [
* "Email",
* "Webhook",
* ],
* },
* {
* level: "P0",
* contactGroupIds: [foo1ContactGroup.id],
* channels: ["LarkBotWebhook"],
* },
* ],
* });
* ```
*
* ## Import
*
* VMP Notify Policy can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:vmp/notifyPolicy:NotifyPolicy default 60dde3ca-951c-4c05-8777-e5a7caa07ad6
* ```
*/
export declare class NotifyPolicy extends pulumi.CustomResource {
/**
* Get an existing NotifyPolicy resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotifyPolicyState, opts?: pulumi.CustomResourceOptions): NotifyPolicy;
/**
* Returns true if the given object is an instance of NotifyPolicy. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is NotifyPolicy;
/**
* The channel notify template for the alarm notification policy.
*/
readonly channelNotifyTemplateIds: pulumi.Output<string[] | undefined>;
/**
* The description of the notify policy.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The levels of the notify policy.
*/
readonly levels: pulumi.Output<outputs.vmp.NotifyPolicyLevel[]>;
/**
* The name of the notify policy.
*/
readonly name: pulumi.Output<string>;
/**
* Create a NotifyPolicy resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: NotifyPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering NotifyPolicy resources.
*/
export interface NotifyPolicyState {
/**
* The channel notify template for the alarm notification policy.
*/
channelNotifyTemplateIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The description of the notify policy.
*/
description?: pulumi.Input<string>;
/**
* The levels of the notify policy.
*/
levels?: pulumi.Input<pulumi.Input<inputs.vmp.NotifyPolicyLevel>[]>;
/**
* The name of the notify policy.
*/
name?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a NotifyPolicy resource.
*/
export interface NotifyPolicyArgs {
/**
* The channel notify template for the alarm notification policy.
*/
channelNotifyTemplateIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The description of the notify policy.
*/
description?: pulumi.Input<string>;
/**
* The levels of the notify policy.
*/
levels: pulumi.Input<pulumi.Input<inputs.vmp.NotifyPolicyLevel>[]>;
/**
* The name of the notify policy.
*/
name?: pulumi.Input<string>;
}