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>",
        }));
    }

}

Coming soon!

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>
function  get_cluster_alter_rule(cluster_id=None, labels=None, name=None, opts=None)
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:

ClusterId string

The cluster id where create cluster alert rule (string)

Name string

The cluster alert rule name (string)

Labels Dictionary<string, object>

(Computed) The cluster alert rule labels (map)

ClusterId string

The cluster id where create cluster alert rule (string)

Name string

The cluster alert rule name (string)

Labels map[string]interface{}

(Computed) The cluster alert rule labels (map)

clusterId string

The cluster id where create cluster alert rule (string)

name string

The cluster alert rule name (string)

labels {[key: string]: any}

(Computed) The cluster alert rule labels (map)

cluster_id str

The cluster id where create cluster alert rule (string)

name str

The cluster alert rule name (string)

labels Dict[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)

ClusterId string
EventRule GetClusterAlterRuleEventRule

(Computed) The cluster alert rule event rule. ConflictsWith: "metric_rule", "node_rule", "system_service_rule"` (list Maxitems:1)

GroupId string

(Computed) The cluster alert rule alert group ID (string)

GroupIntervalSeconds int

(Computed) The cluster alert rule group interval seconds. Default: 180 (int)

GroupWaitSeconds int

(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)

MetricRule GetClusterAlterRuleMetricRule

(Computed) The cluster alert rule metric rule. ConflictsWith: "event_rule", "node_rule", "system_service_rule"` (list Maxitems:1)

Name string
NodeRule GetClusterAlterRuleNodeRule

(Computed) The cluster alert rule node rule. ConflictsWith: "event_rule", "metric_rule", "system_service_rule"` (list Maxitems:1)

RepeatIntervalSeconds int

(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)

SystemServiceRule GetClusterAlterRuleSystemServiceRule

(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)

ClusterId string
EventRule GetClusterAlterRuleEventRule

(Computed) The cluster alert rule event rule. ConflictsWith: "metric_rule", "node_rule", "system_service_rule"` (list Maxitems:1)

GroupId string

(Computed) The cluster alert rule alert group ID (string)

GroupIntervalSeconds int

(Computed) The cluster alert rule group interval seconds. Default: 180 (int)

GroupWaitSeconds int

(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)

MetricRule GetClusterAlterRuleMetricRule

(Computed) The cluster alert rule metric rule. ConflictsWith: "event_rule", "node_rule", "system_service_rule"` (list Maxitems:1)

Name string
NodeRule GetClusterAlterRuleNodeRule

(Computed) The cluster alert rule node rule. ConflictsWith: "event_rule", "metric_rule", "system_service_rule"` (list Maxitems:1)

RepeatIntervalSeconds int

(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)

SystemServiceRule GetClusterAlterRuleSystemServiceRule

(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)

clusterId string
eventRule GetClusterAlterRuleEventRule

(Computed) The cluster alert rule event rule. ConflictsWith: "metric_rule", "node_rule", "system_service_rule"` (list Maxitems:1)

groupId string

(Computed) The cluster alert rule alert group ID (string)

groupIntervalSeconds number

(Computed) The cluster alert rule group interval seconds. Default: 180 (int)

groupWaitSeconds number

(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)

metricRule GetClusterAlterRuleMetricRule

(Computed) The cluster alert rule metric rule. ConflictsWith: "event_rule", "node_rule", "system_service_rule"` (list Maxitems:1)

name string
nodeRule GetClusterAlterRuleNodeRule

(Computed) The cluster alert rule node rule. ConflictsWith: "event_rule", "metric_rule", "system_service_rule"` (list Maxitems:1)

repeatIntervalSeconds number

(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)

systemServiceRule GetClusterAlterRuleSystemServiceRule

(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 Dict[str, Any]

(Computed) The cluster alert rule annotations (map)

cluster_id str
event_rule Dict[GetClusterAlterRuleEventRule]

(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_seconds float

(Computed) The cluster alert rule group interval seconds. Default: 180 (int)

group_wait_seconds float

(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 Dict[GetClusterAlterRuleMetricRule]

(Computed) The cluster alert rule metric rule. ConflictsWith: "event_rule", "node_rule", "system_service_rule"` (list Maxitems:1)

name str
node_rule Dict[GetClusterAlterRuleNodeRule]

(Computed) The cluster alert rule node rule. ConflictsWith: "event_rule", "metric_rule", "system_service_rule"` (list Maxitems:1)

repeat_interval_seconds float

(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_rule Dict[GetClusterAlterRuleSystemServiceRule]

(Computed) The cluster alert rule system service rule. ConflictsWith: "event_rule", "metric_rule", "node_rule"` (list Maxitems:1)

labels Dict[str, Any]

(Computed) The cluster alert rule labels (map)

Supporting Types

GetClusterAlterRuleEventRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ResourceKind string
EventType string
ResourceKind string
EventType string
resourceKind string
eventType string
resourceKind str
eventType str

GetClusterAlterRuleMetricRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Duration string
Expression string
ThresholdValue double
Comparison string
Description string
Duration string
Expression string
ThresholdValue float64
Comparison string
Description string
duration string
expression string
thresholdValue number
comparison string
description string
duration str
expression str
thresholdValue float
comparison str
description str

GetClusterAlterRuleNodeRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Condition string
CpuThreshold int
MemThreshold int
NodeId string
Selector Dictionary<string, object>
Condition string
CpuThreshold int
MemThreshold int
NodeId string
Selector map[string]interface{}
condition string
cpuThreshold number
memThreshold number
nodeId string
selector {[key: string]: any}
condition str
cpuThreshold float
memThreshold float
nodeId str
selector Dict[str, Any]

GetClusterAlterRuleSystemServiceRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

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.