getClusterAlterRule
Use this data source to retrieve information about a Rancher v2 cluster alert rule.
Example Usage
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
class MyStack : Stack
{
public MyStack()
{
var foo = Output.Create(Rancher2.GetClusterAlterRule.InvokeAsync(new Rancher2.GetClusterAlterRuleArgs
{
ClusterId = "<cluster_id>",
Name = "<cluster_alert_rule_name>",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rancher2.LookupClusterAlterRule(ctx, &rancher2.LookupClusterAlterRuleArgs{
ClusterId: "<cluster_id>",
Name: "<cluster_alert_rule_name>",
}, nil)
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_rancher2 as rancher2
foo = rancher2.get_cluster_alter_rule(cluster_id="<cluster_id>",
name="<cluster_alert_rule_name>")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
const foo = pulumi.output(rancher2.getClusterAlterRule({
clusterId: "<cluster_id>",
name: "<cluster_alert_rule_name>",
}, { async: true }));
Using getClusterAlterRule
function getClusterAlterRule(args: GetClusterAlterRuleArgs, opts?: InvokeOptions): Promise<GetClusterAlterRuleResult>
def get_cluster_alter_rule(cluster_id: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetClusterAlterRuleResult
func LookupClusterAlterRule(ctx *Context, args *LookupClusterAlterRuleArgs, opts ...InvokeOption) (*LookupClusterAlterRuleResult, error)
Note: This function is named
LookupClusterAlterRule
in the Go SDK.
public static class GetClusterAlterRule {
public static Task<GetClusterAlterRuleResult> InvokeAsync(GetClusterAlterRuleArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- cluster_
id str The cluster id where create cluster alert rule (string)
- name str
The cluster alert rule name (string)
- labels Mapping[str, Any]
(Computed) The cluster alert rule labels (map)
getClusterAlterRule Result
The following output properties are available:
- Annotations Dictionary<string, object>
(Computed) The cluster alert rule annotations (map)
- Cluster
Id string - Event
Rule GetCluster Alter Rule Event Rule (Computed) The cluster alert rule event rule. ConflictsWith:
"metric_rule", "node_rule", "system_service_rule"
(list Maxitems:1)- Group
Id string (Computed) The cluster alert rule alert group ID (string)
- Group
Interval intSeconds (Computed) The cluster alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds (Computed) The cluster alert rule group wait seconds. Default:
180
(int)- Id string
The provider-assigned unique ID for this managed resource.
- Inherited bool
(Computed) The cluster alert rule inherited. Default:
true
(bool)- Metric
Rule GetCluster Alter Rule Metric Rule (Computed) The cluster alert rule metric rule. ConflictsWith:
"event_rule", "node_rule", "system_service_rule"
` (list Maxitems:1)- Name string
- Node
Rule GetCluster Alter Rule Node Rule (Computed) The cluster alert rule node rule. ConflictsWith:
"event_rule", "metric_rule", "system_service_rule"
` (list Maxitems:1)- Repeat
Interval intSeconds (Optional) The cluster alert rule wait seconds. Default:
3600
(int)- Severity string
(Computed) The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- System
Service GetRule Cluster Alter Rule System Service Rule (Computed) The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
` (list Maxitems:1)- Labels Dictionary<string, object>
(Computed) The cluster alert rule labels (map)
- Annotations map[string]interface{}
(Computed) The cluster alert rule annotations (map)
- Cluster
Id string - Event
Rule GetCluster Alter Rule Event Rule (Computed) The cluster alert rule event rule. ConflictsWith:
"metric_rule", "node_rule", "system_service_rule"
(list Maxitems:1)- Group
Id string (Computed) The cluster alert rule alert group ID (string)
- Group
Interval intSeconds (Computed) The cluster alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds (Computed) The cluster alert rule group wait seconds. Default:
180
(int)- Id string
The provider-assigned unique ID for this managed resource.
- Inherited bool
(Computed) The cluster alert rule inherited. Default:
true
(bool)- Metric
Rule GetCluster Alter Rule Metric Rule (Computed) The cluster alert rule metric rule. ConflictsWith:
"event_rule", "node_rule", "system_service_rule"
` (list Maxitems:1)- Name string
- Node
Rule GetCluster Alter Rule Node Rule (Computed) The cluster alert rule node rule. ConflictsWith:
"event_rule", "metric_rule", "system_service_rule"
` (list Maxitems:1)- Repeat
Interval intSeconds (Optional) The cluster alert rule wait seconds. Default:
3600
(int)- Severity string
(Computed) The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- System
Service GetRule Cluster Alter Rule System Service Rule (Computed) The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
` (list Maxitems:1)- Labels map[string]interface{}
(Computed) The cluster alert rule labels (map)
- annotations {[key: string]: any}
(Computed) The cluster alert rule annotations (map)
- cluster
Id string - event
Rule GetCluster Alter Rule Event Rule (Computed) The cluster alert rule event rule. ConflictsWith:
"metric_rule", "node_rule", "system_service_rule"
(list Maxitems:1)- group
Id string (Computed) The cluster alert rule alert group ID (string)
- group
Interval numberSeconds (Computed) The cluster alert rule group interval seconds. Default:
180
(int)- group
Wait numberSeconds (Computed) The cluster alert rule group wait seconds. Default:
180
(int)- id string
The provider-assigned unique ID for this managed resource.
- inherited boolean
(Computed) The cluster alert rule inherited. Default:
true
(bool)- metric
Rule GetCluster Alter Rule Metric Rule (Computed) The cluster alert rule metric rule. ConflictsWith:
"event_rule", "node_rule", "system_service_rule"
` (list Maxitems:1)- name string
- node
Rule GetCluster Alter Rule Node Rule (Computed) The cluster alert rule node rule. ConflictsWith:
"event_rule", "metric_rule", "system_service_rule"
` (list Maxitems:1)- repeat
Interval numberSeconds (Optional) The cluster alert rule wait seconds. Default:
3600
(int)- severity string
(Computed) The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system
Service GetRule Cluster Alter Rule System Service Rule (Computed) The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
` (list Maxitems:1)- labels {[key: string]: any}
(Computed) The cluster alert rule labels (map)
- annotations Mapping[str, Any]
(Computed) The cluster alert rule annotations (map)
- cluster_
id str - event_
rule GetCluster Alter Rule Event Rule (Computed) The cluster alert rule event rule. ConflictsWith:
"metric_rule", "node_rule", "system_service_rule"
(list Maxitems:1)- group_
id str (Computed) The cluster alert rule alert group ID (string)
- group_
interval_ intseconds (Computed) The cluster alert rule group interval seconds. Default:
180
(int)- group_
wait_ intseconds (Computed) The cluster alert rule group wait seconds. Default:
180
(int)- id str
The provider-assigned unique ID for this managed resource.
- inherited bool
(Computed) The cluster alert rule inherited. Default:
true
(bool)- metric_
rule GetCluster Alter Rule Metric Rule (Computed) The cluster alert rule metric rule. ConflictsWith:
"event_rule", "node_rule", "system_service_rule"
` (list Maxitems:1)- name str
- node_
rule GetCluster Alter Rule Node Rule (Computed) The cluster alert rule node rule. ConflictsWith:
"event_rule", "metric_rule", "system_service_rule"
` (list Maxitems:1)- repeat_
interval_ intseconds (Optional) The cluster alert rule wait seconds. Default:
3600
(int)- severity str
(Computed) The cluster alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- system_
service_ Getrule Cluster Alter Rule System Service Rule (Computed) The cluster alert rule system service rule. ConflictsWith:
"event_rule", "metric_rule", "node_rule"
` (list Maxitems:1)- labels Mapping[str, Any]
(Computed) The cluster alert rule labels (map)
Supporting Types
GetClusterAlterRuleEventRule
- Resource
Kind string - Event
Type string
- Resource
Kind string - Event
Type string
- resource
Kind string - event
Type string
- resource_
kind str - event_
type str
GetClusterAlterRuleMetricRule
- Duration string
- Expression string
- Threshold
Value double - Comparison string
- Description string
- Duration string
- Expression string
- Threshold
Value float64 - Comparison string
- Description string
- duration string
- expression string
- threshold
Value number - comparison string
- description string
- duration str
- expression str
- threshold_
value float - comparison str
- description str
GetClusterAlterRuleNodeRule
- Condition string
- Cpu
Threshold int - Mem
Threshold int - Node
Id string - Selector Dictionary<string, object>
- Condition string
- Cpu
Threshold int - Mem
Threshold int - Node
Id string - Selector map[string]interface{}
- condition string
- cpu
Threshold number - mem
Threshold number - node
Id string - selector {[key: string]: any}
- condition str
- cpu_
threshold int - mem_
threshold int - node_
id str - selector Mapping[str, Any]
GetClusterAlterRuleSystemServiceRule
- Condition string
- Condition string
- condition string
- condition str
Package Details
- Repository
- https://github.com/pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2
Terraform Provider.