UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

239 lines (238 loc) 9.04 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a CFW alarm configuration resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const fwInstanceId = config.requireObject("fwInstanceId"); * const alarmType = config.requireObject("alarmType"); * const alarmTimePeriod = config.requireObject("alarmTimePeriod"); * const severity = config.requireObject("severity"); * const frequencyCount = config.requireObject("frequencyCount"); * const frequencyTime = config.requireObject("frequencyTime"); * const topicUrn = config.requireObject("topicUrn"); * const test = new huaweicloud.cfw.AlarmConfig("test", { * fwInstanceId: fwInstanceId, * alarmType: alarmType, * alarmTimePeriod: alarmTimePeriod, * frequencyCount: frequencyCount, * frequencyTime: frequencyTime, * severity: severity, * topicUrn: topicUrn, * }); * ``` * * ## Import * * The alarm configuration can be imported using `fw_instance_id`, `alarm_type`, separated by a slash, e.g. bash * * ```sh * $ pulumi import huaweicloud:Cfw/alarmConfig:AlarmConfig test <fw_instance_id>/<alarm_type> * ``` */ export declare class AlarmConfig extends pulumi.CustomResource { /** * Get an existing AlarmConfig 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?: AlarmConfigState, opts?: pulumi.CustomResourceOptions): AlarmConfig; /** * Returns true if the given object is an instance of AlarmConfig. 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 AlarmConfig; /** * Specifies the alarm period. * The valid values are as follows: * + **0**: 8:00 to 22:00; * + **1**: all day; */ readonly alarmTimePeriod: pulumi.Output<number>; /** * Specifies the alarm type. * The valid values are as follows. * + **0**: attack; * + **1**: traffic threshold crossing; * + **2**: EIP unprotected; * + **3**: threat intelligence; */ readonly alarmType: pulumi.Output<number>; readonly enableForceNew: pulumi.Output<string | undefined>; /** * Specifies the alarm triggering frequency. * + If `alarmType` is **0** or **3**, the value of `frequencyCount` must be between **1** and **2000**. * + If `alarmType` is **1** or **2**, the value of `frequencyCount` should be **1**. */ readonly frequencyCount: pulumi.Output<number>; /** * Specifies the alarm frequency time range. * + If `alarmType` is **0** or **3**, the value of `frequencyTime` must be between **1** and **60**. * + If `alarmType` is **1** or **2**, the value of `frequencyTime` should be **1**. */ readonly frequencyTime: pulumi.Output<number>; /** * Specifies the firewall ID. */ readonly fwInstanceId: pulumi.Output<string>; /** * The language. */ readonly language: pulumi.Output<string>; /** * Specifies the region in which to create the resource. * If omitted, the provider-level region will be used. Changing this will create new resource. */ readonly region: pulumi.Output<string>; /** * Specifies the alarm severity. * + If `alarmType` is **0** or **3**, the value of `severity` can be a combination of **CRITICAL**, **HIGH**, * **MEDIUM**, and **LOW**, separated by commas. * + If `alarmType` is **1**, the value of `severity` can be **0** (70%), **1** (80%), or **2** (90%). * + If `alarmType` is **2**, the value of `severity` must be **3** (EIP). */ readonly severity: pulumi.Output<string>; /** * Specifies the alarm URN. */ readonly topicUrn: pulumi.Output<string>; /** * The username. */ readonly username: pulumi.Output<string>; /** * Create a AlarmConfig 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: AlarmConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AlarmConfig resources. */ export interface AlarmConfigState { /** * Specifies the alarm period. * The valid values are as follows: * + **0**: 8:00 to 22:00; * + **1**: all day; */ alarmTimePeriod?: pulumi.Input<number>; /** * Specifies the alarm type. * The valid values are as follows. * + **0**: attack; * + **1**: traffic threshold crossing; * + **2**: EIP unprotected; * + **3**: threat intelligence; */ alarmType?: pulumi.Input<number>; enableForceNew?: pulumi.Input<string>; /** * Specifies the alarm triggering frequency. * + If `alarmType` is **0** or **3**, the value of `frequencyCount` must be between **1** and **2000**. * + If `alarmType` is **1** or **2**, the value of `frequencyCount` should be **1**. */ frequencyCount?: pulumi.Input<number>; /** * Specifies the alarm frequency time range. * + If `alarmType` is **0** or **3**, the value of `frequencyTime` must be between **1** and **60**. * + If `alarmType` is **1** or **2**, the value of `frequencyTime` should be **1**. */ frequencyTime?: pulumi.Input<number>; /** * Specifies the firewall ID. */ fwInstanceId?: pulumi.Input<string>; /** * The language. */ language?: pulumi.Input<string>; /** * Specifies the region in which to create the resource. * If omitted, the provider-level region will be used. Changing this will create new resource. */ region?: pulumi.Input<string>; /** * Specifies the alarm severity. * + If `alarmType` is **0** or **3**, the value of `severity` can be a combination of **CRITICAL**, **HIGH**, * **MEDIUM**, and **LOW**, separated by commas. * + If `alarmType` is **1**, the value of `severity` can be **0** (70%), **1** (80%), or **2** (90%). * + If `alarmType` is **2**, the value of `severity` must be **3** (EIP). */ severity?: pulumi.Input<string>; /** * Specifies the alarm URN. */ topicUrn?: pulumi.Input<string>; /** * The username. */ username?: pulumi.Input<string>; } /** * The set of arguments for constructing a AlarmConfig resource. */ export interface AlarmConfigArgs { /** * Specifies the alarm period. * The valid values are as follows: * + **0**: 8:00 to 22:00; * + **1**: all day; */ alarmTimePeriod: pulumi.Input<number>; /** * Specifies the alarm type. * The valid values are as follows. * + **0**: attack; * + **1**: traffic threshold crossing; * + **2**: EIP unprotected; * + **3**: threat intelligence; */ alarmType: pulumi.Input<number>; enableForceNew?: pulumi.Input<string>; /** * Specifies the alarm triggering frequency. * + If `alarmType` is **0** or **3**, the value of `frequencyCount` must be between **1** and **2000**. * + If `alarmType` is **1** or **2**, the value of `frequencyCount` should be **1**. */ frequencyCount: pulumi.Input<number>; /** * Specifies the alarm frequency time range. * + If `alarmType` is **0** or **3**, the value of `frequencyTime` must be between **1** and **60**. * + If `alarmType` is **1** or **2**, the value of `frequencyTime` should be **1**. */ frequencyTime: pulumi.Input<number>; /** * Specifies the firewall ID. */ fwInstanceId: pulumi.Input<string>; /** * Specifies the region in which to create the resource. * If omitted, the provider-level region will be used. Changing this will create new resource. */ region?: pulumi.Input<string>; /** * Specifies the alarm severity. * + If `alarmType` is **0** or **3**, the value of `severity` can be a combination of **CRITICAL**, **HIGH**, * **MEDIUM**, and **LOW**, separated by commas. * + If `alarmType` is **1**, the value of `severity` can be **0** (70%), **1** (80%), or **2** (90%). * + If `alarmType` is **2**, the value of `severity` must be **3** (EIP). */ severity: pulumi.Input<string>; /** * Specifies the alarm URN. */ topicUrn: pulumi.Input<string>; }