opentelekomcloud.WafAlarmNotificationV1
Explore with Pulumi AI
Up-to-date reference of API arguments for WAF alarm notification you can get at documentation portal
Manages a WAF alarm notification resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const topic1 = new opentelekomcloud.SmnTopicV2("topic1", {});
const notification1 = new opentelekomcloud.WafAlarmNotificationV1("notification1", {
enabled: true,
topicUrn: topic1.smnTopicV2Id,
sendFrequency: 30,
times: 200,
threats: [
"cc",
"cmdi",
],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
topic1 = opentelekomcloud.SmnTopicV2("topic1")
notification1 = opentelekomcloud.WafAlarmNotificationV1("notification1",
enabled=True,
topic_urn=topic1.smn_topic_v2_id,
send_frequency=30,
times=200,
threats=[
"cc",
"cmdi",
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
topic1, err := opentelekomcloud.NewSmnTopicV2(ctx, "topic1", nil)
if err != nil {
return err
}
_, err = opentelekomcloud.NewWafAlarmNotificationV1(ctx, "notification1", &opentelekomcloud.WafAlarmNotificationV1Args{
Enabled: pulumi.Bool(true),
TopicUrn: topic1.SmnTopicV2Id,
SendFrequency: pulumi.Float64(30),
Times: pulumi.Float64(200),
Threats: pulumi.StringArray{
pulumi.String("cc"),
pulumi.String("cmdi"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var topic1 = new Opentelekomcloud.SmnTopicV2("topic1");
var notification1 = new Opentelekomcloud.WafAlarmNotificationV1("notification1", new()
{
Enabled = true,
TopicUrn = topic1.SmnTopicV2Id,
SendFrequency = 30,
Times = 200,
Threats = new[]
{
"cc",
"cmdi",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.SmnTopicV2;
import com.pulumi.opentelekomcloud.WafAlarmNotificationV1;
import com.pulumi.opentelekomcloud.WafAlarmNotificationV1Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var topic1 = new SmnTopicV2("topic1");
var notification1 = new WafAlarmNotificationV1("notification1", WafAlarmNotificationV1Args.builder()
.enabled(true)
.topicUrn(topic1.smnTopicV2Id())
.sendFrequency(30)
.times(200)
.threats(
"cc",
"cmdi")
.build());
}
}
resources:
topic1:
type: opentelekomcloud:SmnTopicV2
notification1:
type: opentelekomcloud:WafAlarmNotificationV1
properties:
enabled: true
topicUrn: ${topic1.smnTopicV2Id}
sendFrequency: 30
times: 200
threats:
- cc
- cmdi
Create WafAlarmNotificationV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafAlarmNotificationV1(name: string, args: WafAlarmNotificationV1Args, opts?: CustomResourceOptions);
@overload
def WafAlarmNotificationV1(resource_name: str,
args: WafAlarmNotificationV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def WafAlarmNotificationV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
send_frequency: Optional[float] = None,
threats: Optional[Sequence[str]] = None,
times: Optional[float] = None,
topic_urn: Optional[str] = None,
locale: Optional[str] = None,
waf_alarm_notification_v1_id: Optional[str] = None)
func NewWafAlarmNotificationV1(ctx *Context, name string, args WafAlarmNotificationV1Args, opts ...ResourceOption) (*WafAlarmNotificationV1, error)
public WafAlarmNotificationV1(string name, WafAlarmNotificationV1Args args, CustomResourceOptions? opts = null)
public WafAlarmNotificationV1(String name, WafAlarmNotificationV1Args args)
public WafAlarmNotificationV1(String name, WafAlarmNotificationV1Args args, CustomResourceOptions options)
type: opentelekomcloud:WafAlarmNotificationV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WafAlarmNotificationV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WafAlarmNotificationV1Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WafAlarmNotificationV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafAlarmNotificationV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafAlarmNotificationV1Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var wafAlarmNotificationV1Resource = new Opentelekomcloud.WafAlarmNotificationV1("wafAlarmNotificationV1Resource", new()
{
Enabled = false,
SendFrequency = 0,
Threats = new[]
{
"string",
},
Times = 0,
TopicUrn = "string",
Locale = "string",
WafAlarmNotificationV1Id = "string",
});
example, err := opentelekomcloud.NewWafAlarmNotificationV1(ctx, "wafAlarmNotificationV1Resource", &opentelekomcloud.WafAlarmNotificationV1Args{
Enabled: pulumi.Bool(false),
SendFrequency: pulumi.Float64(0),
Threats: pulumi.StringArray{
pulumi.String("string"),
},
Times: pulumi.Float64(0),
TopicUrn: pulumi.String("string"),
Locale: pulumi.String("string"),
WafAlarmNotificationV1Id: pulumi.String("string"),
})
var wafAlarmNotificationV1Resource = new WafAlarmNotificationV1("wafAlarmNotificationV1Resource", WafAlarmNotificationV1Args.builder()
.enabled(false)
.sendFrequency(0)
.threats("string")
.times(0)
.topicUrn("string")
.locale("string")
.wafAlarmNotificationV1Id("string")
.build());
waf_alarm_notification_v1_resource = opentelekomcloud.WafAlarmNotificationV1("wafAlarmNotificationV1Resource",
enabled=False,
send_frequency=0,
threats=["string"],
times=0,
topic_urn="string",
locale="string",
waf_alarm_notification_v1_id="string")
const wafAlarmNotificationV1Resource = new opentelekomcloud.WafAlarmNotificationV1("wafAlarmNotificationV1Resource", {
enabled: false,
sendFrequency: 0,
threats: ["string"],
times: 0,
topicUrn: "string",
locale: "string",
wafAlarmNotificationV1Id: "string",
});
type: opentelekomcloud:WafAlarmNotificationV1
properties:
enabled: false
locale: string
sendFrequency: 0
threats:
- string
times: 0
topicUrn: string
wafAlarmNotificationV1Id: string
WafAlarmNotificationV1 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WafAlarmNotificationV1 resource accepts the following input properties:
- Enabled bool
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - Send
Frequency double - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - Threats List<string>
- Specifies the list of event types. Possible values are:
- Times double
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - Topic
Urn string Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- Locale string
- Waf
Alarm stringNotification V1Id
- Enabled bool
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - Send
Frequency float64 - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - Threats []string
- Specifies the list of event types. Possible values are:
- Times float64
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - Topic
Urn string Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- Locale string
- Waf
Alarm stringNotification V1Id
- enabled Boolean
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - send
Frequency Double - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats List<String>
- Specifies the list of event types. Possible values are:
- times Double
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic
Urn String Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- locale String
- waf
Alarm StringNotification V1Id
- enabled boolean
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - send
Frequency number - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats string[]
- Specifies the list of event types. Possible values are:
- times number
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic
Urn string Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- locale string
- waf
Alarm stringNotification V1Id
- enabled bool
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - send_
frequency float - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats Sequence[str]
- Specifies the list of event types. Possible values are:
- times float
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic_
urn str Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- locale str
- waf_
alarm_ strnotification_ v1_ id
- enabled Boolean
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - send
Frequency Number - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats List<String>
- Specifies the list of event types. Possible values are:
- times Number
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic
Urn String Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- locale String
- waf
Alarm StringNotification V1Id
Outputs
All input properties are implicitly available as output properties. Additionally, the WafAlarmNotificationV1 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing WafAlarmNotificationV1 Resource
Get an existing WafAlarmNotificationV1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WafAlarmNotificationV1State, opts?: CustomResourceOptions): WafAlarmNotificationV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
locale: Optional[str] = None,
send_frequency: Optional[float] = None,
threats: Optional[Sequence[str]] = None,
times: Optional[float] = None,
topic_urn: Optional[str] = None,
waf_alarm_notification_v1_id: Optional[str] = None) -> WafAlarmNotificationV1
func GetWafAlarmNotificationV1(ctx *Context, name string, id IDInput, state *WafAlarmNotificationV1State, opts ...ResourceOption) (*WafAlarmNotificationV1, error)
public static WafAlarmNotificationV1 Get(string name, Input<string> id, WafAlarmNotificationV1State? state, CustomResourceOptions? opts = null)
public static WafAlarmNotificationV1 get(String name, Output<String> id, WafAlarmNotificationV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:WafAlarmNotificationV1 get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Enabled bool
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - Locale string
- Send
Frequency double - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - Threats List<string>
- Specifies the list of event types. Possible values are:
- Times double
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - Topic
Urn string Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- Waf
Alarm stringNotification V1Id
- Enabled bool
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - Locale string
- Send
Frequency float64 - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - Threats []string
- Specifies the list of event types. Possible values are:
- Times float64
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - Topic
Urn string Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- Waf
Alarm stringNotification V1Id
- enabled Boolean
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - locale String
- send
Frequency Double - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats List<String>
- Specifies the list of event types. Possible values are:
- times Double
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic
Urn String Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- waf
Alarm StringNotification V1Id
- enabled boolean
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - locale string
- send
Frequency number - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats string[]
- Specifies the list of event types. Possible values are:
- times number
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic
Urn string Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- waf
Alarm stringNotification V1Id
- enabled bool
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - locale str
- send_
frequency float - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats Sequence[str]
- Specifies the list of event types. Possible values are:
- times float
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic_
urn str Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- waf_
alarm_ strnotification_ v1_ id
- enabled Boolean
- Specifies whether to send an alarm notification. The options are
true
andfalse
. - locale String
- send
Frequency Number - Specifies the minimum interval between two alarms in minutes.
The options are
5
,15
,30
, and60
. - threats List<String>
- Specifies the list of event types. Possible values are:
- times Number
- Specifies the alarm threshold. Alarm notifications are sent when the
number of attacks is greater than or equal to the threshold within the configured period.
This value is greater than or equal to
1
. - topic
Urn String Specifies the SMN topic to which an alarm is sent.
The selected topic must be a topic whose subscription information has been configured.
- waf
Alarm StringNotification V1Id
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.