UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

221 lines (220 loc) 8.24 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 * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.Alarm("foo", { * alarmName: "test", * alarmNotifyGroups: ["3019107f-28a2-4208-a2b6-c33fcb97ac3a"], * alarmPeriodDetail: { * email: 2, * generalWebhook: 3, * phone: 10, * sms: 10, * }, * condition: "$1.errNum>0", * projectId: "cc44f8b6-0328-4622-b043-023fca735cd4", * queryRequests: [{ * endTimeOffset: 0, * number: 1, * query: "Failed | select count(*) as errNum", * startTimeOffset: -15, * topicId: "af1a2240-ba62-4f18-b421-bde2f9684e57", * }], * requestCycle: { * time: 11, * type: "Period", * }, * userDefineMsg: "test for terraform", * }); * ``` * * ## Import * * tls alarm can be imported using the id and project id, e.g. * * ```sh * $ pulumi import volcengine:tls/alarm:Alarm default projectId:fc************ * ``` */ export declare class Alarm extends pulumi.CustomResource { /** * Get an existing Alarm 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?: AlarmState, opts?: pulumi.CustomResourceOptions): Alarm; /** * Returns true if the given object is an instance of Alarm. 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 Alarm; /** * The alarm id. */ readonly alarmId: pulumi.Output<string>; /** * The name of the alarm. */ readonly alarmName: pulumi.Output<string>; /** * List of notification groups corresponding to the alarm. */ readonly alarmNotifyGroups: pulumi.Output<string[]>; /** * Period for sending alarm notifications. When the number of continuous alarm triggers reaches the specified limit (TriggerPeriod), Log Service will send alarm notifications according to the specified period. */ readonly alarmPeriod: pulumi.Output<number | undefined>; /** * Period for sending alarm notifications. When the number of continuous alarm triggers reaches the specified limit (TriggerPeriod), Log Service will send alarm notifications according to the specified period. */ readonly alarmPeriodDetail: pulumi.Output<outputs.tls.AlarmAlarmPeriodDetail | undefined>; /** * Alarm trigger condition. */ readonly condition: pulumi.Output<string>; /** * The project id. */ readonly projectId: pulumi.Output<string>; /** * Search and analyze sentences, 1~3 can be configured. */ readonly queryRequests: pulumi.Output<outputs.tls.AlarmQueryRequest[]>; /** * The execution period of the alarm task. */ readonly requestCycle: pulumi.Output<outputs.tls.AlarmRequestCycle>; /** * Whether to enable the alert policy. The default value is true, that is, on. */ readonly status: pulumi.Output<boolean | undefined>; /** * Continuous cycle. The alarm will be issued after the trigger condition is continuously met for TriggerPeriod periods; the minimum value is 1, the maximum value is 10, and the default value is 1. */ readonly triggerPeriod: pulumi.Output<number | undefined>; /** * Customize the alarm notification content. */ readonly userDefineMsg: pulumi.Output<string | undefined>; /** * Create a Alarm 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: AlarmArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Alarm resources. */ export interface AlarmState { /** * The alarm id. */ alarmId?: pulumi.Input<string>; /** * The name of the alarm. */ alarmName?: pulumi.Input<string>; /** * List of notification groups corresponding to the alarm. */ alarmNotifyGroups?: pulumi.Input<pulumi.Input<string>[]>; /** * Period for sending alarm notifications. When the number of continuous alarm triggers reaches the specified limit (TriggerPeriod), Log Service will send alarm notifications according to the specified period. */ alarmPeriod?: pulumi.Input<number>; /** * Period for sending alarm notifications. When the number of continuous alarm triggers reaches the specified limit (TriggerPeriod), Log Service will send alarm notifications according to the specified period. */ alarmPeriodDetail?: pulumi.Input<inputs.tls.AlarmAlarmPeriodDetail>; /** * Alarm trigger condition. */ condition?: pulumi.Input<string>; /** * The project id. */ projectId?: pulumi.Input<string>; /** * Search and analyze sentences, 1~3 can be configured. */ queryRequests?: pulumi.Input<pulumi.Input<inputs.tls.AlarmQueryRequest>[]>; /** * The execution period of the alarm task. */ requestCycle?: pulumi.Input<inputs.tls.AlarmRequestCycle>; /** * Whether to enable the alert policy. The default value is true, that is, on. */ status?: pulumi.Input<boolean>; /** * Continuous cycle. The alarm will be issued after the trigger condition is continuously met for TriggerPeriod periods; the minimum value is 1, the maximum value is 10, and the default value is 1. */ triggerPeriod?: pulumi.Input<number>; /** * Customize the alarm notification content. */ userDefineMsg?: pulumi.Input<string>; } /** * The set of arguments for constructing a Alarm resource. */ export interface AlarmArgs { /** * The name of the alarm. */ alarmName: pulumi.Input<string>; /** * List of notification groups corresponding to the alarm. */ alarmNotifyGroups: pulumi.Input<pulumi.Input<string>[]>; /** * Period for sending alarm notifications. When the number of continuous alarm triggers reaches the specified limit (TriggerPeriod), Log Service will send alarm notifications according to the specified period. */ alarmPeriod?: pulumi.Input<number>; /** * Period for sending alarm notifications. When the number of continuous alarm triggers reaches the specified limit (TriggerPeriod), Log Service will send alarm notifications according to the specified period. */ alarmPeriodDetail?: pulumi.Input<inputs.tls.AlarmAlarmPeriodDetail>; /** * Alarm trigger condition. */ condition: pulumi.Input<string>; /** * The project id. */ projectId: pulumi.Input<string>; /** * Search and analyze sentences, 1~3 can be configured. */ queryRequests: pulumi.Input<pulumi.Input<inputs.tls.AlarmQueryRequest>[]>; /** * The execution period of the alarm task. */ requestCycle: pulumi.Input<inputs.tls.AlarmRequestCycle>; /** * Whether to enable the alert policy. The default value is true, that is, on. */ status?: pulumi.Input<boolean>; /** * Continuous cycle. The alarm will be issued after the trigger condition is continuously met for TriggerPeriod periods; the minimum value is 1, the maximum value is 10, and the default value is 1. */ triggerPeriod?: pulumi.Input<number>; /** * Customize the alarm notification content. */ userDefineMsg?: pulumi.Input<string>; }