UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

222 lines (221 loc) 6.73 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of vmp notify policies * ## Example Usage * * ```typescript * 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 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"], * }, * ], * }); * const fooNotifyPolicies = volcengine.vmp.getNotifyPoliciesOutput({ * ids: [fooNotifyPolicy.id], * }); * ``` */ export declare function getNotifyPolicies(args?: GetNotifyPoliciesArgs, opts?: pulumi.InvokeOptions): Promise<GetNotifyPoliciesResult>; /** * A collection of arguments for invoking getNotifyPolicies. */ export interface GetNotifyPoliciesArgs { /** * The channel notify template for the alarm notification policy. */ channelNotifyTemplateIds?: string[]; /** * The contact group for the alarm notification policy. */ contactGroupIds?: string[]; /** * A list of notify policy ids. */ ids?: string[]; /** * The name of notify policy. */ name?: string; /** * File name where to save data source results. */ outputFile?: string; } /** * A collection of values returned by getNotifyPolicies. */ export interface GetNotifyPoliciesResult { /** * The channel notify template for the alarm notification policy. */ readonly channelNotifyTemplateIds?: string[]; /** * The contact group for the alarm notification policy. */ readonly contactGroupIds?: string[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly ids?: string[]; /** * The name of notify policy. */ readonly name?: string; /** * The list of notify policies. */ readonly notifyPolicies: outputs.vmp.GetNotifyPoliciesNotifyPolicy[]; readonly outputFile?: string; /** * The total count of query. */ readonly totalCount: number; } /** * Use this data source to query detailed information of vmp notify policies * ## Example Usage * * ```typescript * 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 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"], * }, * ], * }); * const fooNotifyPolicies = volcengine.vmp.getNotifyPoliciesOutput({ * ids: [fooNotifyPolicy.id], * }); * ``` */ export declare function getNotifyPoliciesOutput(args?: GetNotifyPoliciesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetNotifyPoliciesResult>; /** * A collection of arguments for invoking getNotifyPolicies. */ export interface GetNotifyPoliciesOutputArgs { /** * The channel notify template for the alarm notification policy. */ channelNotifyTemplateIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The contact group for the alarm notification policy. */ contactGroupIds?: pulumi.Input<pulumi.Input<string>[]>; /** * A list of notify policy ids. */ ids?: pulumi.Input<pulumi.Input<string>[]>; /** * The name of notify policy. */ name?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; }