UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

220 lines (219 loc) 8.64 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage tls alarm content template * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.AlarmContentTemplate("foo", { * alarmContentTemplateName: "test-alarm-content-template", * dingTalks: [{ * content: `修改-尊敬的用户,您好! * 您的账号(主账户ID:{{AccountID}} )的日志服务{%if NotifyType==1%}触发告警{%else%}告警恢复{%endif%} * 告警策略:{{Alarm}} * 告警日志主题:{{AlarmTopicName}} * 触发时间:{{StartTime}} * 触发条件:{{Condition}} * 当前查询结果:[{%-for x in TriggerParams-%}{{-x-}} {%-endfor-%}] * 通知内容:{{NotifyMsg|escapejs}} * 日志检索详情:[查看详情]({{QueryUrl}}) * 告警详情:[查看详情]({{SignInUrl}}) * * 感谢对火山引擎的支持 * `, * locale: "zh-CN", * title: "修改-告警通知", * }], * emails: [{ * content: "修改-告警策略:{{Alarm}}<br> 告警日志项目:{{ProjectName}}<br>", * locale: "zh-CN", * subject: "修改-告警通知", * }], * larks: [{ * content: `修改-尊敬的用户,您好! * 您的账号(主账户ID:{{AccountID}} )的日志服务{%if NotifyType==1%}触发告警{%else%}告警恢复{%endif%} * 告警策略:{{Alarm}} * 告警日志主题:{{AlarmTopicName}} * 触发时间:{{StartTime}} * 触发条件:{{Condition}} * 当前查询结果:[{%-for x in TriggerParams-%}{{-x-}} {%-endfor-%}] * 通知内容:{{NotifyMsg|escapejs}} * 日志检索详情:[查看详情]({{QueryUrl}}) * 告警详情:[查看详情]({{SignInUrl}}) * * 感谢对火山引擎的支持 * `, * locale: "zh-CN", * title: "修改-告警通知", * }], * needValidContent: true, * sms: [{ * content: "修改-告警策略{{Alarm}}, 告警日志项目:{{ProjectName}}, 告警日志主题:{{AlarmTopicName}}, 告警级别:{{Severity}}, 通知类型:{%if NotifyType==1%}触发告警{%else%}告警恢复{%endif%},触发时间:{{StartTime}}, 触发条件:{{Condition}}, 当前查询结果:[{%-for x in TriggerParams-%}{{-x-}} {%-endfor-%}], 通知内容:{{NotifyMsg}}", * locale: "zh-CN", * }], * }); * ``` * * ## Import * * tls alarm content template can be imported using the alarm_content_template_id, e.g. * * ```sh * $ pulumi import volcengine:tls/alarmContentTemplate:AlarmContentTemplate default alarm-content-template-123456 * ``` */ export declare class AlarmContentTemplate extends pulumi.CustomResource { /** * Get an existing AlarmContentTemplate 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?: AlarmContentTemplateState, opts?: pulumi.CustomResourceOptions): AlarmContentTemplate; /** * Returns true if the given object is an instance of AlarmContentTemplate. 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 AlarmContentTemplate; /** * The ID of the alarm content template. */ readonly alarmContentTemplateId: pulumi.Output<string>; /** * The name of the alarm content template. */ readonly alarmContentTemplateName: pulumi.Output<string>; /** * The dingTalk content of the alarm content template. */ readonly dingTalks: pulumi.Output<outputs.tls.AlarmContentTemplateDingTalk[] | undefined>; /** * The email content of the alarm content template. */ readonly emails: pulumi.Output<outputs.tls.AlarmContentTemplateEmail[] | undefined>; /** * The lark content of the alarm content template. */ readonly larks: pulumi.Output<outputs.tls.AlarmContentTemplateLark[] | undefined>; /** * Whether to validate the content template. */ readonly needValidContent: pulumi.Output<boolean | undefined>; /** * The sms content of the alarm content template. */ readonly sms: pulumi.Output<outputs.tls.AlarmContentTemplateSm[] | undefined>; /** * The vms content of the alarm content template. */ readonly vms: pulumi.Output<outputs.tls.AlarmContentTemplateVm[] | undefined>; /** * The webhook content of the alarm content template. */ readonly webhooks: pulumi.Output<outputs.tls.AlarmContentTemplateWebhook[] | undefined>; /** * The wechat content of the alarm content template. */ readonly wechats: pulumi.Output<outputs.tls.AlarmContentTemplateWechat[] | undefined>; /** * Create a AlarmContentTemplate 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: AlarmContentTemplateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AlarmContentTemplate resources. */ export interface AlarmContentTemplateState { /** * The ID of the alarm content template. */ alarmContentTemplateId?: pulumi.Input<string>; /** * The name of the alarm content template. */ alarmContentTemplateName?: pulumi.Input<string>; /** * The dingTalk content of the alarm content template. */ dingTalks?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateDingTalk>[]>; /** * The email content of the alarm content template. */ emails?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateEmail>[]>; /** * The lark content of the alarm content template. */ larks?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateLark>[]>; /** * Whether to validate the content template. */ needValidContent?: pulumi.Input<boolean>; /** * The sms content of the alarm content template. */ sms?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateSm>[]>; /** * The vms content of the alarm content template. */ vms?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateVm>[]>; /** * The webhook content of the alarm content template. */ webhooks?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateWebhook>[]>; /** * The wechat content of the alarm content template. */ wechats?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateWechat>[]>; } /** * The set of arguments for constructing a AlarmContentTemplate resource. */ export interface AlarmContentTemplateArgs { /** * The name of the alarm content template. */ alarmContentTemplateName: pulumi.Input<string>; /** * The dingTalk content of the alarm content template. */ dingTalks?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateDingTalk>[]>; /** * The email content of the alarm content template. */ emails?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateEmail>[]>; /** * The lark content of the alarm content template. */ larks?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateLark>[]>; /** * Whether to validate the content template. */ needValidContent?: pulumi.Input<boolean>; /** * The sms content of the alarm content template. */ sms?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateSm>[]>; /** * The vms content of the alarm content template. */ vms?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateVm>[]>; /** * The webhook content of the alarm content template. */ webhooks?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateWebhook>[]>; /** * The wechat content of the alarm content template. */ wechats?: pulumi.Input<pulumi.Input<inputs.tls.AlarmContentTemplateWechat>[]>; }