volcengine.cloud_monitor.Rule
Explore with Pulumi AI
Provides a resource to manage cloud monitor rule
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Cloud_monitor.Rule("foo", new()
{
AlertMethods = new[]
{
"Email",
"Webhook",
},
ConditionOperator = "||",
Conditions = new[]
{
new Volcengine.Cloud_monitor.Inputs.RuleConditionArgs
{
ComparisonOperator = ">",
MetricName = "DiskUsageAvail",
MetricUnit = "Megabytes",
Statistics = "avg",
Threshold = "100",
},
new Volcengine.Cloud_monitor.Inputs.RuleConditionArgs
{
ComparisonOperator = ">",
MetricName = "DiskUsageUtilization",
MetricUnit = "Percent",
Statistics = "avg",
Threshold = "90",
},
},
ContactGroupIds = new[]
{
"174284616403161****",
},
Description = "acc-test",
EffectEndAt = "22:55",
EffectStartAt = "00:15",
EnableState = "disable",
EvaluationCount = 5,
Level = "warning",
MultipleConditions = true,
Namespace = "VCM_ECS",
OriginalDimensions = new[]
{
new Volcengine.Cloud_monitor.Inputs.RuleOriginalDimensionArgs
{
Key = "ResourceID",
Values = new[]
{
"*",
},
},
new Volcengine.Cloud_monitor.Inputs.RuleOriginalDimensionArgs
{
Key = "DiskName",
Values = new[]
{
"vda",
"vda1",
},
},
},
RecoveryNotify = new Volcengine.Cloud_monitor.Inputs.RuleRecoveryNotifyArgs
{
Enable = true,
},
Regions = "cn-beijing",
RuleName = "acc-test-rule",
SilenceTime = 5,
SubNamespace = "Storage",
WebHook = "http://alert.volc.com/callback",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_monitor"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloud_monitor.NewRule(ctx, "foo", &cloud_monitor.RuleArgs{
AlertMethods: pulumi.StringArray{
pulumi.String("Email"),
pulumi.String("Webhook"),
},
ConditionOperator: pulumi.String("||"),
Conditions: cloud_monitor.RuleConditionArray{
&cloud_monitor.RuleConditionArgs{
ComparisonOperator: pulumi.String(">"),
MetricName: pulumi.String("DiskUsageAvail"),
MetricUnit: pulumi.String("Megabytes"),
Statistics: pulumi.String("avg"),
Threshold: pulumi.String("100"),
},
&cloud_monitor.RuleConditionArgs{
ComparisonOperator: pulumi.String(">"),
MetricName: pulumi.String("DiskUsageUtilization"),
MetricUnit: pulumi.String("Percent"),
Statistics: pulumi.String("avg"),
Threshold: pulumi.String("90"),
},
},
ContactGroupIds: pulumi.StringArray{
pulumi.String("174284616403161****"),
},
Description: pulumi.String("acc-test"),
EffectEndAt: pulumi.String("22:55"),
EffectStartAt: pulumi.String("00:15"),
EnableState: pulumi.String("disable"),
EvaluationCount: pulumi.Int(5),
Level: pulumi.String("warning"),
MultipleConditions: pulumi.Bool(true),
Namespace: pulumi.String("VCM_ECS"),
OriginalDimensions: cloud_monitor.RuleOriginalDimensionArray{
&cloud_monitor.RuleOriginalDimensionArgs{
Key: pulumi.String("ResourceID"),
Values: pulumi.StringArray{
pulumi.String("*"),
},
},
&cloud_monitor.RuleOriginalDimensionArgs{
Key: pulumi.String("DiskName"),
Values: pulumi.StringArray{
pulumi.String("vda"),
pulumi.String("vda1"),
},
},
},
RecoveryNotify: &cloud_monitor.RuleRecoveryNotifyArgs{
Enable: pulumi.Bool(true),
},
Regions: pulumi.String("cn-beijing"),
RuleName: pulumi.String("acc-test-rule"),
SilenceTime: pulumi.Int(5),
SubNamespace: pulumi.String("Storage"),
WebHook: pulumi.String("http://alert.volc.com/callback"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cloud_monitor.Rule;
import com.pulumi.volcengine.cloud_monitor.RuleArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.RuleConditionArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.RuleOriginalDimensionArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.RuleRecoveryNotifyArgs;
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 foo = new Rule("foo", RuleArgs.builder()
.alertMethods(
"Email",
"Webhook")
.conditionOperator("||")
.conditions(
RuleConditionArgs.builder()
.comparisonOperator(">")
.metricName("DiskUsageAvail")
.metricUnit("Megabytes")
.statistics("avg")
.threshold("100")
.build(),
RuleConditionArgs.builder()
.comparisonOperator(">")
.metricName("DiskUsageUtilization")
.metricUnit("Percent")
.statistics("avg")
.threshold("90")
.build())
.contactGroupIds("174284616403161****")
.description("acc-test")
.effectEndAt("22:55")
.effectStartAt("00:15")
.enableState("disable")
.evaluationCount(5)
.level("warning")
.multipleConditions(true)
.namespace("VCM_ECS")
.originalDimensions(
RuleOriginalDimensionArgs.builder()
.key("ResourceID")
.values("*")
.build(),
RuleOriginalDimensionArgs.builder()
.key("DiskName")
.values(
"vda",
"vda1")
.build())
.recoveryNotify(RuleRecoveryNotifyArgs.builder()
.enable(true)
.build())
.regions("cn-beijing")
.ruleName("acc-test-rule")
.silenceTime(5)
.subNamespace("Storage")
.webHook("http://alert.volc.com/callback")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.cloud_monitor.Rule("foo",
alert_methods=[
"Email",
"Webhook",
],
condition_operator="||",
conditions=[
volcengine.cloud_monitor.RuleConditionArgs(
comparison_operator=">",
metric_name="DiskUsageAvail",
metric_unit="Megabytes",
statistics="avg",
threshold="100",
),
volcengine.cloud_monitor.RuleConditionArgs(
comparison_operator=">",
metric_name="DiskUsageUtilization",
metric_unit="Percent",
statistics="avg",
threshold="90",
),
],
contact_group_ids=["174284616403161****"],
description="acc-test",
effect_end_at="22:55",
effect_start_at="00:15",
enable_state="disable",
evaluation_count=5,
level="warning",
multiple_conditions=True,
namespace="VCM_ECS",
original_dimensions=[
volcengine.cloud_monitor.RuleOriginalDimensionArgs(
key="ResourceID",
values=["*"],
),
volcengine.cloud_monitor.RuleOriginalDimensionArgs(
key="DiskName",
values=[
"vda",
"vda1",
],
),
],
recovery_notify=volcengine.cloud_monitor.RuleRecoveryNotifyArgs(
enable=True,
),
regions="cn-beijing",
rule_name="acc-test-rule",
silence_time=5,
sub_namespace="Storage",
web_hook="http://alert.volc.com/callback")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.cloud_monitor.Rule("foo", {
alertMethods: [
"Email",
"Webhook",
],
conditionOperator: "||",
conditions: [
{
comparisonOperator: ">",
metricName: "DiskUsageAvail",
metricUnit: "Megabytes",
statistics: "avg",
threshold: "100",
},
{
comparisonOperator: ">",
metricName: "DiskUsageUtilization",
metricUnit: "Percent",
statistics: "avg",
threshold: "90",
},
],
contactGroupIds: ["174284616403161****"],
description: "acc-test",
effectEndAt: "22:55",
effectStartAt: "00:15",
enableState: "disable",
evaluationCount: 5,
level: "warning",
multipleConditions: true,
namespace: "VCM_ECS",
originalDimensions: [
{
key: "ResourceID",
values: ["*"],
},
{
key: "DiskName",
values: [
"vda",
"vda1",
],
},
],
recoveryNotify: {
enable: true,
},
regions: "cn-beijing",
ruleName: "acc-test-rule",
silenceTime: 5,
subNamespace: "Storage",
webHook: "http://alert.volc.com/callback",
});
resources:
foo:
type: volcengine:cloud_monitor:Rule
properties:
alertMethods:
- Email
- Webhook
conditionOperator: '||'
conditions:
- comparisonOperator: '>'
metricName: DiskUsageAvail
metricUnit: Megabytes
statistics: avg
threshold: '100'
- comparisonOperator: '>'
metricName: DiskUsageUtilization
metricUnit: Percent
statistics: avg
threshold: '90'
contactGroupIds:
- 174284616403161****
description: acc-test
effectEndAt: 22:55
effectStartAt: 00:15
enableState: disable
evaluationCount: 5
level: warning
multipleConditions: true
namespace: VCM_ECS
originalDimensions:
- key: ResourceID
values:
- '*'
- key: DiskName
values:
- vda
- vda1
recoveryNotify:
enable: true
regions: cn-beijing
ruleName: acc-test-rule
silenceTime: 5
subNamespace: Storage
webHook: http://alert.volc.com/callback
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
@overload
def Rule(resource_name: str,
args: RuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
opts: Optional[ResourceOptions] = None,
original_dimensions: Optional[Sequence[RuleOriginalDimensionArgs]] = None,
regions: Optional[str] = None,
evaluation_count: Optional[int] = None,
level: Optional[str] = None,
sub_namespace: Optional[str] = None,
effect_end_at: Optional[str] = None,
effect_start_at: Optional[str] = None,
enable_state: Optional[str] = None,
conditions: Optional[Sequence[RuleConditionArgs]] = None,
silence_time: Optional[int] = None,
namespace: Optional[str] = None,
rule_name: Optional[str] = None,
alert_methods: Optional[Sequence[str]] = None,
web_hook: Optional[str] = None,
recovery_notify: Optional[RuleRecoveryNotifyArgs] = None,
multiple_conditions: Optional[bool] = None,
condition_operator: Optional[str] = None,
description: Optional[str] = None,
contact_group_ids: Optional[Sequence[str]] = None)
func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
type: volcengine:cloud_monitor:Rule
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 RuleArgs
- 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 RuleArgs
- 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 RuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleArgs
- 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 exampleruleResourceResourceFromCloud_monitorrule = new Volcengine.Cloud_monitor.Rule("exampleruleResourceResourceFromCloud_monitorrule", new()
{
OriginalDimensions = new[]
{
new Volcengine.Cloud_monitor.Inputs.RuleOriginalDimensionArgs
{
Key = "string",
Values = new[]
{
"string",
},
},
},
Regions = "string",
EvaluationCount = 0,
Level = "string",
SubNamespace = "string",
EffectEndAt = "string",
EffectStartAt = "string",
EnableState = "string",
Conditions = new[]
{
new Volcengine.Cloud_monitor.Inputs.RuleConditionArgs
{
ComparisonOperator = "string",
MetricName = "string",
MetricUnit = "string",
Statistics = "string",
Threshold = "string",
Period = "string",
},
},
SilenceTime = 0,
Namespace = "string",
RuleName = "string",
AlertMethods = new[]
{
"string",
},
WebHook = "string",
RecoveryNotify = new Volcengine.Cloud_monitor.Inputs.RuleRecoveryNotifyArgs
{
Enable = false,
},
MultipleConditions = false,
ConditionOperator = "string",
Description = "string",
ContactGroupIds = new[]
{
"string",
},
});
example, err := cloud_monitor.NewRule(ctx, "exampleruleResourceResourceFromCloud_monitorrule", &cloud_monitor.RuleArgs{
OriginalDimensions: cloud_monitor.RuleOriginalDimensionArray{
&cloud_monitor.RuleOriginalDimensionArgs{
Key: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Regions: pulumi.String("string"),
EvaluationCount: pulumi.Int(0),
Level: pulumi.String("string"),
SubNamespace: pulumi.String("string"),
EffectEndAt: pulumi.String("string"),
EffectStartAt: pulumi.String("string"),
EnableState: pulumi.String("string"),
Conditions: cloud_monitor.RuleConditionArray{
&cloud_monitor.RuleConditionArgs{
ComparisonOperator: pulumi.String("string"),
MetricName: pulumi.String("string"),
MetricUnit: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
Period: pulumi.String("string"),
},
},
SilenceTime: pulumi.Int(0),
Namespace: pulumi.String("string"),
RuleName: pulumi.String("string"),
AlertMethods: pulumi.StringArray{
pulumi.String("string"),
},
WebHook: pulumi.String("string"),
RecoveryNotify: &cloud_monitor.RuleRecoveryNotifyArgs{
Enable: pulumi.Bool(false),
},
MultipleConditions: pulumi.Bool(false),
ConditionOperator: pulumi.String("string"),
Description: pulumi.String("string"),
ContactGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var exampleruleResourceResourceFromCloud_monitorrule = new Rule("exampleruleResourceResourceFromCloud_monitorrule", RuleArgs.builder()
.originalDimensions(RuleOriginalDimensionArgs.builder()
.key("string")
.values("string")
.build())
.regions("string")
.evaluationCount(0)
.level("string")
.subNamespace("string")
.effectEndAt("string")
.effectStartAt("string")
.enableState("string")
.conditions(RuleConditionArgs.builder()
.comparisonOperator("string")
.metricName("string")
.metricUnit("string")
.statistics("string")
.threshold("string")
.period("string")
.build())
.silenceTime(0)
.namespace("string")
.ruleName("string")
.alertMethods("string")
.webHook("string")
.recoveryNotify(RuleRecoveryNotifyArgs.builder()
.enable(false)
.build())
.multipleConditions(false)
.conditionOperator("string")
.description("string")
.contactGroupIds("string")
.build());
examplerule_resource_resource_from_cloud_monitorrule = volcengine.cloud_monitor.Rule("exampleruleResourceResourceFromCloud_monitorrule",
original_dimensions=[{
"key": "string",
"values": ["string"],
}],
regions="string",
evaluation_count=0,
level="string",
sub_namespace="string",
effect_end_at="string",
effect_start_at="string",
enable_state="string",
conditions=[{
"comparison_operator": "string",
"metric_name": "string",
"metric_unit": "string",
"statistics": "string",
"threshold": "string",
"period": "string",
}],
silence_time=0,
namespace="string",
rule_name="string",
alert_methods=["string"],
web_hook="string",
recovery_notify={
"enable": False,
},
multiple_conditions=False,
condition_operator="string",
description="string",
contact_group_ids=["string"])
const exampleruleResourceResourceFromCloud_monitorrule = new volcengine.cloud_monitor.Rule("exampleruleResourceResourceFromCloud_monitorrule", {
originalDimensions: [{
key: "string",
values: ["string"],
}],
regions: "string",
evaluationCount: 0,
level: "string",
subNamespace: "string",
effectEndAt: "string",
effectStartAt: "string",
enableState: "string",
conditions: [{
comparisonOperator: "string",
metricName: "string",
metricUnit: "string",
statistics: "string",
threshold: "string",
period: "string",
}],
silenceTime: 0,
namespace: "string",
ruleName: "string",
alertMethods: ["string"],
webHook: "string",
recoveryNotify: {
enable: false,
},
multipleConditions: false,
conditionOperator: "string",
description: "string",
contactGroupIds: ["string"],
});
type: volcengine:cloud_monitor:Rule
properties:
alertMethods:
- string
conditionOperator: string
conditions:
- comparisonOperator: string
metricName: string
metricUnit: string
period: string
statistics: string
threshold: string
contactGroupIds:
- string
description: string
effectEndAt: string
effectStartAt: string
enableState: string
evaluationCount: 0
level: string
multipleConditions: false
namespace: string
originalDimensions:
- key: string
values:
- string
recoveryNotify:
enable: false
regions: string
ruleName: string
silenceTime: 0
subNamespace: string
webHook: string
Rule 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 Rule resource accepts the following input properties:
- Alert
Methods List<string> - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - Conditions
List<Rule
Condition> - The conditions of the cloud monitor rule.
- Effect
End stringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - Effect
Start stringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - Enable
State string - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - Evaluation
Count int - The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - Namespace string
- The namespace of the cloud monitor rule.
- Original
Dimensions List<RuleOriginal Dimension> - The original dimensions of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- Rule
Name string - The name of the cloud monitor rule.
- Silence
Time int - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- Sub
Namespace string - The sub namespace of the cloud monitor rule.
- Condition
Operator string - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - Contact
Group List<string>Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - Description string
- The description of the cloud monitor rule.
- Multiple
Conditions bool - Whether to enable the multiple conditions function of the cloud monitor rule.
- Recovery
Notify RuleRecovery Notify - The recovery notify of the cloud monitor rule.
- Web
Hook string - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- Alert
Methods []string - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - Conditions
[]Rule
Condition Args - The conditions of the cloud monitor rule.
- Effect
End stringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - Effect
Start stringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - Enable
State string - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - Evaluation
Count int - The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - Namespace string
- The namespace of the cloud monitor rule.
- Original
Dimensions []RuleOriginal Dimension Args - The original dimensions of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- Rule
Name string - The name of the cloud monitor rule.
- Silence
Time int - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- Sub
Namespace string - The sub namespace of the cloud monitor rule.
- Condition
Operator string - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - Contact
Group []stringIds - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - Description string
- The description of the cloud monitor rule.
- Multiple
Conditions bool - Whether to enable the multiple conditions function of the cloud monitor rule.
- Recovery
Notify RuleRecovery Notify Args - The recovery notify of the cloud monitor rule.
- Web
Hook string - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert
Methods List<String> - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - conditions
List<Rule
Condition> - The conditions of the cloud monitor rule.
- effect
End StringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect
Start StringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable
State String - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation
Count Integer - The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - namespace String
- The namespace of the cloud monitor rule.
- original
Dimensions List<RuleOriginal Dimension> - The original dimensions of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule
Name String - The name of the cloud monitor rule.
- silence
Time Integer - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub
Namespace String - The sub namespace of the cloud monitor rule.
- condition
Operator String - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - contact
Group List<String>Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - description String
- The description of the cloud monitor rule.
- multiple
Conditions Boolean - Whether to enable the multiple conditions function of the cloud monitor rule.
- recovery
Notify RuleRecovery Notify - The recovery notify of the cloud monitor rule.
- web
Hook String - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert
Methods string[] - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - conditions
Rule
Condition[] - The conditions of the cloud monitor rule.
- effect
End stringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect
Start stringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable
State string - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation
Count number - The evaluation count of the cloud monitor rule.
- level string
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - namespace string
- The namespace of the cloud monitor rule.
- original
Dimensions RuleOriginal Dimension[] - The original dimensions of the cloud monitor rule.
- regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule
Name string - The name of the cloud monitor rule.
- silence
Time number - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub
Namespace string - The sub namespace of the cloud monitor rule.
- condition
Operator string - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - contact
Group string[]Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - description string
- The description of the cloud monitor rule.
- multiple
Conditions boolean - Whether to enable the multiple conditions function of the cloud monitor rule.
- recovery
Notify RuleRecovery Notify - The recovery notify of the cloud monitor rule.
- web
Hook string - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert_
methods Sequence[str] - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - conditions
Sequence[Rule
Condition Args] - The conditions of the cloud monitor rule.
- effect_
end_ strat - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect_
start_ strat - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable_
state str - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation_
count int - The evaluation count of the cloud monitor rule.
- level str
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - namespace str
- The namespace of the cloud monitor rule.
- original_
dimensions Sequence[RuleOriginal Dimension Args] - The original dimensions of the cloud monitor rule.
- regions str
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule_
name str - The name of the cloud monitor rule.
- silence_
time int - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub_
namespace str - The sub namespace of the cloud monitor rule.
- condition_
operator str - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - contact_
group_ Sequence[str]ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - description str
- The description of the cloud monitor rule.
- multiple_
conditions bool - Whether to enable the multiple conditions function of the cloud monitor rule.
- recovery_
notify RuleRecovery Notify Args - The recovery notify of the cloud monitor rule.
- web_
hook str - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert
Methods List<String> - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - conditions List<Property Map>
- The conditions of the cloud monitor rule.
- effect
End StringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect
Start StringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable
State String - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation
Count Number - The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - namespace String
- The namespace of the cloud monitor rule.
- original
Dimensions List<Property Map> - The original dimensions of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule
Name String - The name of the cloud monitor rule.
- silence
Time Number - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub
Namespace String - The sub namespace of the cloud monitor rule.
- condition
Operator String - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - contact
Group List<String>Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - description String
- The description of the cloud monitor rule.
- multiple
Conditions Boolean - Whether to enable the multiple conditions function of the cloud monitor rule.
- recovery
Notify Property Map - The recovery notify of the cloud monitor rule.
- web
Hook String - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
- Alert
State string - The alert state of the cloud monitor rule.
- Created
At string - The created time of the cloud monitor rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - The updated time of the cloud monitor rule.
- Alert
State string - The alert state of the cloud monitor rule.
- Created
At string - The created time of the cloud monitor rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - The updated time of the cloud monitor rule.
- alert
State String - The alert state of the cloud monitor rule.
- created
At String - The created time of the cloud monitor rule.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - The updated time of the cloud monitor rule.
- alert
State string - The alert state of the cloud monitor rule.
- created
At string - The created time of the cloud monitor rule.
- id string
- The provider-assigned unique ID for this managed resource.
- updated
At string - The updated time of the cloud monitor rule.
- alert_
state str - The alert state of the cloud monitor rule.
- created_
at str - The created time of the cloud monitor rule.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - The updated time of the cloud monitor rule.
- alert
State String - The alert state of the cloud monitor rule.
- created
At String - The created time of the cloud monitor rule.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - The updated time of the cloud monitor rule.
Look up Existing Rule Resource
Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_methods: Optional[Sequence[str]] = None,
alert_state: Optional[str] = None,
condition_operator: Optional[str] = None,
conditions: Optional[Sequence[RuleConditionArgs]] = None,
contact_group_ids: Optional[Sequence[str]] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
effect_end_at: Optional[str] = None,
effect_start_at: Optional[str] = None,
enable_state: Optional[str] = None,
evaluation_count: Optional[int] = None,
level: Optional[str] = None,
multiple_conditions: Optional[bool] = None,
namespace: Optional[str] = None,
original_dimensions: Optional[Sequence[RuleOriginalDimensionArgs]] = None,
recovery_notify: Optional[RuleRecoveryNotifyArgs] = None,
regions: Optional[str] = None,
rule_name: Optional[str] = None,
silence_time: Optional[int] = None,
sub_namespace: Optional[str] = None,
updated_at: Optional[str] = None,
web_hook: Optional[str] = None) -> Rule
func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Alert
Methods List<string> - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - Alert
State string - The alert state of the cloud monitor rule.
- Condition
Operator string - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - Conditions
List<Rule
Condition> - The conditions of the cloud monitor rule.
- Contact
Group List<string>Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - Created
At string - The created time of the cloud monitor rule.
- Description string
- The description of the cloud monitor rule.
- Effect
End stringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - Effect
Start stringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - Enable
State string - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - Evaluation
Count int - The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - Multiple
Conditions bool - Whether to enable the multiple conditions function of the cloud monitor rule.
- Namespace string
- The namespace of the cloud monitor rule.
- Original
Dimensions List<RuleOriginal Dimension> - The original dimensions of the cloud monitor rule.
- Recovery
Notify RuleRecovery Notify - The recovery notify of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- Rule
Name string - The name of the cloud monitor rule.
- Silence
Time int - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- Sub
Namespace string - The sub namespace of the cloud monitor rule.
- Updated
At string - The updated time of the cloud monitor rule.
- Web
Hook string - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- Alert
Methods []string - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - Alert
State string - The alert state of the cloud monitor rule.
- Condition
Operator string - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - Conditions
[]Rule
Condition Args - The conditions of the cloud monitor rule.
- Contact
Group []stringIds - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - Created
At string - The created time of the cloud monitor rule.
- Description string
- The description of the cloud monitor rule.
- Effect
End stringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - Effect
Start stringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - Enable
State string - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - Evaluation
Count int - The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - Multiple
Conditions bool - Whether to enable the multiple conditions function of the cloud monitor rule.
- Namespace string
- The namespace of the cloud monitor rule.
- Original
Dimensions []RuleOriginal Dimension Args - The original dimensions of the cloud monitor rule.
- Recovery
Notify RuleRecovery Notify Args - The recovery notify of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- Rule
Name string - The name of the cloud monitor rule.
- Silence
Time int - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- Sub
Namespace string - The sub namespace of the cloud monitor rule.
- Updated
At string - The updated time of the cloud monitor rule.
- Web
Hook string - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert
Methods List<String> - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - alert
State String - The alert state of the cloud monitor rule.
- condition
Operator String - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - conditions
List<Rule
Condition> - The conditions of the cloud monitor rule.
- contact
Group List<String>Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - created
At String - The created time of the cloud monitor rule.
- description String
- The description of the cloud monitor rule.
- effect
End StringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect
Start StringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable
State String - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation
Count Integer - The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - multiple
Conditions Boolean - Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace String
- The namespace of the cloud monitor rule.
- original
Dimensions List<RuleOriginal Dimension> - The original dimensions of the cloud monitor rule.
- recovery
Notify RuleRecovery Notify - The recovery notify of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule
Name String - The name of the cloud monitor rule.
- silence
Time Integer - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub
Namespace String - The sub namespace of the cloud monitor rule.
- updated
At String - The updated time of the cloud monitor rule.
- web
Hook String - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert
Methods string[] - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - alert
State string - The alert state of the cloud monitor rule.
- condition
Operator string - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - conditions
Rule
Condition[] - The conditions of the cloud monitor rule.
- contact
Group string[]Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - created
At string - The created time of the cloud monitor rule.
- description string
- The description of the cloud monitor rule.
- effect
End stringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect
Start stringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable
State string - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation
Count number - The evaluation count of the cloud monitor rule.
- level string
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - multiple
Conditions boolean - Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace string
- The namespace of the cloud monitor rule.
- original
Dimensions RuleOriginal Dimension[] - The original dimensions of the cloud monitor rule.
- recovery
Notify RuleRecovery Notify - The recovery notify of the cloud monitor rule.
- regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule
Name string - The name of the cloud monitor rule.
- silence
Time number - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub
Namespace string - The sub namespace of the cloud monitor rule.
- updated
At string - The updated time of the cloud monitor rule.
- web
Hook string - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert_
methods Sequence[str] - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - alert_
state str - The alert state of the cloud monitor rule.
- condition_
operator str - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - conditions
Sequence[Rule
Condition Args] - The conditions of the cloud monitor rule.
- contact_
group_ Sequence[str]ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - created_
at str - The created time of the cloud monitor rule.
- description str
- The description of the cloud monitor rule.
- effect_
end_ strat - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect_
start_ strat - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable_
state str - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation_
count int - The evaluation count of the cloud monitor rule.
- level str
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - multiple_
conditions bool - Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace str
- The namespace of the cloud monitor rule.
- original_
dimensions Sequence[RuleOriginal Dimension Args] - The original dimensions of the cloud monitor rule.
- recovery_
notify RuleRecovery Notify Args - The recovery notify of the cloud monitor rule.
- regions str
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule_
name str - The name of the cloud monitor rule.
- silence_
time int - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub_
namespace str - The sub namespace of the cloud monitor rule.
- updated_
at str - The updated time of the cloud monitor rule.
- web_
hook str - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
- alert
Methods List<String> - The alert methods of the cloud monitor rule. Valid values:
Email
,Phone
,SMS
,Webhook
. - alert
State String - The alert state of the cloud monitor rule.
- condition
Operator String - The condition operator of the cloud monitor rule. Valid values:
&&
,||
. - conditions List<Property Map>
- The conditions of the cloud monitor rule.
- contact
Group List<String>Ids - The contact group ids of the cloud monitor rule. When the alert method is
Email
,SMS
, orPhone
, This field must be specified. - created
At String - The created time of the cloud monitor rule.
- description String
- The description of the cloud monitor rule.
- effect
End StringAt - The effect end time of the cloud monitor rule. The expression is
HH:MM
. - effect
Start StringAt - The effect start time of the cloud monitor rule. The expression is
HH:MM
. - enable
State String - The enable state of the cloud monitor rule. Valid values:
enable
,disable
. - evaluation
Count Number - The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values:
critical
,warning
,notice
. - multiple
Conditions Boolean - Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace String
- The namespace of the cloud monitor rule.
- original
Dimensions List<Property Map> - The original dimensions of the cloud monitor rule.
- recovery
Notify Property Map - The recovery notify of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule
Name String - The name of the cloud monitor rule.
- silence
Time Number - The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub
Namespace String - The sub namespace of the cloud monitor rule.
- updated
At String - The updated time of the cloud monitor rule.
- web
Hook String - The web hook of the cloud monitor rule. When the alert method is
Webhook
, This field must be specified.
Supporting Types
RuleCondition, RuleConditionArgs
- Comparison
Operator string - The comparison operation of the cloud monitor rule. Valid values:
>
,>=
,<
,<=
,!=
,=
. - Metric
Name string - The metric name of the cloud monitor rule.
- Metric
Unit string - The metric unit of the cloud monitor rule.
- Statistics string
- The statistics of the cloud monitor rule. Valid values:
avg
,max
,min
. - Threshold string
- The threshold of the cloud monitor rule.
- Period string
- Comparison
Operator string - The comparison operation of the cloud monitor rule. Valid values:
>
,>=
,<
,<=
,!=
,=
. - Metric
Name string - The metric name of the cloud monitor rule.
- Metric
Unit string - The metric unit of the cloud monitor rule.
- Statistics string
- The statistics of the cloud monitor rule. Valid values:
avg
,max
,min
. - Threshold string
- The threshold of the cloud monitor rule.
- Period string
- comparison
Operator String - The comparison operation of the cloud monitor rule. Valid values:
>
,>=
,<
,<=
,!=
,=
. - metric
Name String - The metric name of the cloud monitor rule.
- metric
Unit String - The metric unit of the cloud monitor rule.
- statistics String
- The statistics of the cloud monitor rule. Valid values:
avg
,max
,min
. - threshold String
- The threshold of the cloud monitor rule.
- period String
- comparison
Operator string - The comparison operation of the cloud monitor rule. Valid values:
>
,>=
,<
,<=
,!=
,=
. - metric
Name string - The metric name of the cloud monitor rule.
- metric
Unit string - The metric unit of the cloud monitor rule.
- statistics string
- The statistics of the cloud monitor rule. Valid values:
avg
,max
,min
. - threshold string
- The threshold of the cloud monitor rule.
- period string
- comparison_
operator str - The comparison operation of the cloud monitor rule. Valid values:
>
,>=
,<
,<=
,!=
,=
. - metric_
name str - The metric name of the cloud monitor rule.
- metric_
unit str - The metric unit of the cloud monitor rule.
- statistics str
- The statistics of the cloud monitor rule. Valid values:
avg
,max
,min
. - threshold str
- The threshold of the cloud monitor rule.
- period str
- comparison
Operator String - The comparison operation of the cloud monitor rule. Valid values:
>
,>=
,<
,<=
,!=
,=
. - metric
Name String - The metric name of the cloud monitor rule.
- metric
Unit String - The metric unit of the cloud monitor rule.
- statistics String
- The statistics of the cloud monitor rule. Valid values:
avg
,max
,min
. - threshold String
- The threshold of the cloud monitor rule.
- period String
RuleOriginalDimension, RuleOriginalDimensionArgs
RuleRecoveryNotify, RuleRecoveryNotifyArgs
- Enable bool
- Whether to enable the recovery notify function.
- Enable bool
- Whether to enable the recovery notify function.
- enable Boolean
- Whether to enable the recovery notify function.
- enable boolean
- Whether to enable the recovery notify function.
- enable bool
- Whether to enable the recovery notify function.
- enable Boolean
- Whether to enable the recovery notify function.
Import
CloudMonitorRule can be imported using the id, e.g.
$ pulumi import volcengine:cloud_monitor/rule:Rule default 174284623567451****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.