ProjectAlertRule
Create a ProjectAlertRule Resource
new ProjectAlertRule(name: string, args: ProjectAlertRuleArgs, opts?: CustomResourceOptions);def ProjectAlertRule(resource_name, opts=None, annotations=None, group_id=None, group_interval_seconds=None, group_wait_seconds=None, inherited=None, labels=None, metric_rule=None, name=None, pod_rule=None, project_id=None, repeat_interval_seconds=None, severity=None, workload_rule=None, __props__=None);func NewProjectAlertRule(ctx *Context, name string, args ProjectAlertRuleArgs, opts ...ResourceOption) (*ProjectAlertRule, error)public ProjectAlertRule(string name, ProjectAlertRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ProjectAlertRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectAlertRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectAlertRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ProjectAlertRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ProjectAlertRule resource accepts the following input properties:
- Group
Id string The project alert rule alert group ID (string)
- Project
Id string The project id where create project alert rule (string)
- Annotations Dictionary<string, object>
The project alert rule annotations (map)
- Group
Interval intSeconds The project alert rule group interval seconds. Default:
180(int)- Group
Wait intSeconds The project alert rule group wait seconds. Default:
180(int)- Inherited bool
The project alert rule inherited. Default:
true(bool)- Labels Dictionary<string, object>
The project alert rule labels (map)
- Metric
Rule ProjectAlert Rule Metric Rule Args The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- Name string
The project alert rule name (string)
- Pod
Rule ProjectAlert Rule Pod Rule Args The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- Repeat
Interval intSeconds The project alert rule wait seconds. Default:
3600(int)- Severity string
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- Workload
Rule ProjectAlert Rule Workload Rule Args The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
- Group
Id string The project alert rule alert group ID (string)
- Project
Id string The project id where create project alert rule (string)
- Annotations map[string]interface{}
The project alert rule annotations (map)
- Group
Interval intSeconds The project alert rule group interval seconds. Default:
180(int)- Group
Wait intSeconds The project alert rule group wait seconds. Default:
180(int)- Inherited bool
The project alert rule inherited. Default:
true(bool)- Labels map[string]interface{}
The project alert rule labels (map)
- Metric
Rule ProjectAlert Rule Metric Rule The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- Name string
The project alert rule name (string)
- Pod
Rule ProjectAlert Rule Pod Rule The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- Repeat
Interval intSeconds The project alert rule wait seconds. Default:
3600(int)- Severity string
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- Workload
Rule ProjectAlert Rule Workload Rule The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
- group
Id string The project alert rule alert group ID (string)
- project
Id string The project id where create project alert rule (string)
- annotations {[key: string]: any}
The project alert rule annotations (map)
- group
Interval numberSeconds The project alert rule group interval seconds. Default:
180(int)- group
Wait numberSeconds The project alert rule group wait seconds. Default:
180(int)- inherited boolean
The project alert rule inherited. Default:
true(bool)- labels {[key: string]: any}
The project alert rule labels (map)
- metric
Rule ProjectAlert Rule Metric Rule The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- name string
The project alert rule name (string)
- pod
Rule ProjectAlert Rule Pod Rule The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- repeat
Interval numberSeconds The project alert rule wait seconds. Default:
3600(int)- severity string
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- workload
Rule ProjectAlert Rule Workload Rule The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
- group_
id str The project alert rule alert group ID (string)
- project_
id str The project id where create project alert rule (string)
- annotations Dict[str, Any]
The project alert rule annotations (map)
- group_
interval_ floatseconds The project alert rule group interval seconds. Default:
180(int)- group_
wait_ floatseconds The project alert rule group wait seconds. Default:
180(int)- inherited bool
The project alert rule inherited. Default:
true(bool)- labels Dict[str, Any]
The project alert rule labels (map)
- metric_
rule Dict[ProjectAlert Rule Metric Rule] The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- name str
The project alert rule name (string)
- pod_
rule Dict[ProjectAlert Rule Pod Rule] The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- repeat_
interval_ floatseconds The project alert rule wait seconds. Default:
3600(int)- severity str
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- workload_
rule Dict[ProjectAlert Rule Workload Rule] The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectAlertRule resource produces the following output properties:
Look up an Existing ProjectAlertRule Resource
Get an existing ProjectAlertRule 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?: ProjectAlertRuleState, opts?: CustomResourceOptions): ProjectAlertRulestatic get(resource_name, id, opts=None, annotations=None, group_id=None, group_interval_seconds=None, group_wait_seconds=None, inherited=None, labels=None, metric_rule=None, name=None, pod_rule=None, project_id=None, repeat_interval_seconds=None, severity=None, workload_rule=None, __props__=None);func GetProjectAlertRule(ctx *Context, name string, id IDInput, state *ProjectAlertRuleState, opts ...ResourceOption) (*ProjectAlertRule, error)public static ProjectAlertRule Get(string name, Input<string> id, ProjectAlertRuleState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Annotations Dictionary<string, object>
The project alert rule annotations (map)
- Group
Id string The project alert rule alert group ID (string)
- Group
Interval intSeconds The project alert rule group interval seconds. Default:
180(int)- Group
Wait intSeconds The project alert rule group wait seconds. Default:
180(int)- Inherited bool
The project alert rule inherited. Default:
true(bool)- Labels Dictionary<string, object>
The project alert rule labels (map)
- Metric
Rule ProjectAlert Rule Metric Rule Args The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- Name string
The project alert rule name (string)
- Pod
Rule ProjectAlert Rule Pod Rule Args The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- Project
Id string The project id where create project alert rule (string)
- Repeat
Interval intSeconds The project alert rule wait seconds. Default:
3600(int)- Severity string
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- Workload
Rule ProjectAlert Rule Workload Rule Args The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
- Annotations map[string]interface{}
The project alert rule annotations (map)
- Group
Id string The project alert rule alert group ID (string)
- Group
Interval intSeconds The project alert rule group interval seconds. Default:
180(int)- Group
Wait intSeconds The project alert rule group wait seconds. Default:
180(int)- Inherited bool
The project alert rule inherited. Default:
true(bool)- Labels map[string]interface{}
The project alert rule labels (map)
- Metric
Rule ProjectAlert Rule Metric Rule The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- Name string
The project alert rule name (string)
- Pod
Rule ProjectAlert Rule Pod Rule The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- Project
Id string The project id where create project alert rule (string)
- Repeat
Interval intSeconds The project alert rule wait seconds. Default:
3600(int)- Severity string
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- Workload
Rule ProjectAlert Rule Workload Rule The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
- annotations {[key: string]: any}
The project alert rule annotations (map)
- group
Id string The project alert rule alert group ID (string)
- group
Interval numberSeconds The project alert rule group interval seconds. Default:
180(int)- group
Wait numberSeconds The project alert rule group wait seconds. Default:
180(int)- inherited boolean
The project alert rule inherited. Default:
true(bool)- labels {[key: string]: any}
The project alert rule labels (map)
- metric
Rule ProjectAlert Rule Metric Rule The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- name string
The project alert rule name (string)
- pod
Rule ProjectAlert Rule Pod Rule The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- project
Id string The project id where create project alert rule (string)
- repeat
Interval numberSeconds The project alert rule wait seconds. Default:
3600(int)- severity string
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- workload
Rule ProjectAlert Rule Workload Rule The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
- annotations Dict[str, Any]
The project alert rule annotations (map)
- group_
id str The project alert rule alert group ID (string)
- group_
interval_ floatseconds The project alert rule group interval seconds. Default:
180(int)- group_
wait_ floatseconds The project alert rule group wait seconds. Default:
180(int)- inherited bool
The project alert rule inherited. Default:
true(bool)- labels Dict[str, Any]
The project alert rule labels (map)
- metric_
rule Dict[ProjectAlert Rule Metric Rule] The project alert rule metric rule. ConflictsWith:
"pod_rule", "workload_rule"` (list Maxitems:1)- name str
The project alert rule name (string)
- pod_
rule Dict[ProjectAlert Rule Pod Rule] The project alert rule pod rule. ConflictsWith:
"metric_rule", "workload_rule"` (list Maxitems:1)- project_
id str The project id where create project alert rule (string)
- repeat_
interval_ floatseconds The project alert rule wait seconds. Default:
3600(int)- severity str
The project alert rule severity. Supported values :
"critical" | "info" | "warning". Default:critical(string)- workload_
rule Dict[ProjectAlert Rule Workload Rule] The project alert rule workload rule. ConflictsWith:
"metric_rule", "pod_rule"` (list Maxitems:1)
Supporting Types
ProjectAlertRuleMetricRule
- Duration string
Metric rule duration (string)
- Expression string
Metric rule expression (string)
- Threshold
Value double Metric rule threshold value (float64)
- Comparison string
Metric rule comparison. Supported values :
"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default:equal(string)- Description string
Metric rule description (string)
- Duration string
Metric rule duration (string)
- Expression string
Metric rule expression (string)
- Threshold
Value float64 Metric rule threshold value (float64)
- Comparison string
Metric rule comparison. Supported values :
"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default:equal(string)- Description string
Metric rule description (string)
- duration string
Metric rule duration (string)
- expression string
Metric rule expression (string)
- threshold
Value number Metric rule threshold value (float64)
- comparison string
Metric rule comparison. Supported values :
"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default:equal(string)- description string
Metric rule description (string)
- duration str
Metric rule duration (string)
- expression str
Metric rule expression (string)
- threshold
Value float Metric rule threshold value (float64)
- comparison str
Metric rule comparison. Supported values :
"equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default:equal(string)- description str
Metric rule description (string)
ProjectAlertRulePodRule
- Pod
Id string Pod ID (string)
- Condition string
Pod rule condition. Supported values :
"notrunning" | "notscheduled" | "restarts". Default:notrunning(string)- Restart
Interval intSeconds Pod rule restart interval seconds. Default:
300(int)- Restart
Times int Pod rule restart times. Default:
3(int)
- Pod
Id string Pod ID (string)
- Condition string
Pod rule condition. Supported values :
"notrunning" | "notscheduled" | "restarts". Default:notrunning(string)- Restart
Interval intSeconds Pod rule restart interval seconds. Default:
300(int)- Restart
Times int Pod rule restart times. Default:
3(int)
- pod
Id string Pod ID (string)
- condition string
Pod rule condition. Supported values :
"notrunning" | "notscheduled" | "restarts". Default:notrunning(string)- restart
Interval numberSeconds Pod rule restart interval seconds. Default:
300(int)- restart
Times number Pod rule restart times. Default:
3(int)
- pod
Id str Pod ID (string)
- condition str
Pod rule condition. Supported values :
"notrunning" | "notscheduled" | "restarts". Default:notrunning(string)- restart
Interval floatSeconds Pod rule restart interval seconds. Default:
300(int)- restart
Times float Pod rule restart times. Default:
3(int)
ProjectAlertRuleWorkloadRule
- Available
Percentage int Workload rule available percentage. Default:
70(int)- Selector Dictionary<string, object>
Workload rule selector (map)
- Workload
Id string Workload ID (string)
- Available
Percentage int Workload rule available percentage. Default:
70(int)- Selector map[string]interface{}
Workload rule selector (map)
- Workload
Id string Workload ID (string)
- available
Percentage number Workload rule available percentage. Default:
70(int)- selector {[key: string]: any}
Workload rule selector (map)
- workload
Id string Workload ID (string)
- available
Percentage float Workload rule available percentage. Default:
70(int)- selector Dict[str, Any]
Workload rule selector (map)
- workload
Id str Workload ID (string)
Package Details
- Repository
- https://github.com/pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2Terraform Provider.