rancher2 logo
Rancher 2 v3.9.0, Jan 18 23

rancher2.getClusterAlterRule

Use this data source to retrieve information about a Rancher v2 cluster alert rule.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;

return await Deployment.RunAsync(() => 
{
    var foo = Rancher2.GetClusterAlterRule.Invoke(new()
    {
        ClusterId = "<cluster_id>",
        Name = "<cluster_alert_rule_name>",
    });

});
package main

import (
	"github.com/pulumi/pulumi-rancher2/sdk/v3/go/rancher2"
	"github.com/pulumi/pulumi/sdk/v3/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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.Rancher2Functions;
import com.pulumi.rancher2.inputs.GetClusterAlterRuleArgs;
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) {
        final var foo = Rancher2Functions.getClusterAlterRule(GetClusterAlterRuleArgs.builder()
            .clusterId("<cluster_id>")
            .name("<cluster_alert_rule_name>")
            .build());

    }
}
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 = rancher2.getClusterAlterRule({
    clusterId: "<cluster_id>",
    name: "<cluster_alert_rule_name>",
});
variables:
  foo:
    fn::invoke:
      Function: rancher2:getClusterAlterRule
      Arguments:
        clusterId: <cluster_id>
        name: <cluster_alert_rule_name>

Using getClusterAlterRule

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getClusterAlterRule(args: GetClusterAlterRuleArgs, opts?: InvokeOptions): Promise<GetClusterAlterRuleResult>
function getClusterAlterRuleOutput(args: GetClusterAlterRuleOutputArgs, opts?: InvokeOptions): Output<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
def get_cluster_alter_rule_output(cluster_id: Optional[pulumi.Input[str]] = None,
                           labels: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetClusterAlterRuleResult]
func LookupClusterAlterRule(ctx *Context, args *LookupClusterAlterRuleArgs, opts ...InvokeOption) (*LookupClusterAlterRuleResult, error)
func LookupClusterAlterRuleOutput(ctx *Context, args *LookupClusterAlterRuleOutputArgs, opts ...InvokeOption) LookupClusterAlterRuleResultOutput

> Note: This function is named LookupClusterAlterRule in the Go SDK.

public static class GetClusterAlterRule 
{
    public static Task<GetClusterAlterRuleResult> InvokeAsync(GetClusterAlterRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetClusterAlterRuleResult> Invoke(GetClusterAlterRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClusterAlterRuleResult> getClusterAlterRule(GetClusterAlterRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: rancher2:index/getClusterAlterRule:getClusterAlterRule
  arguments:
    # arguments dictionary

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 Map<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 {[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 Mapping[str, Any]

(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<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 Map<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 Integer

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

groupWaitSeconds Integer

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

(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,Object>

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

(Computed) The cluster alert rule annotations (map)

cluster_id str
event_rule 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 int

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

group_wait_seconds int

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

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

name str
node_rule GetClusterAlterRuleNodeRule

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

repeat_interval_seconds int

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

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

annotations Map<Any>

(Computed) The cluster alert rule annotations (map)

clusterId String
eventRule Property Map

(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 Property Map

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

name String
nodeRule Property Map

(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 Property Map

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

labels Map<Any>

(Computed) The cluster alert rule labels (map)

Supporting Types

GetClusterAlterRuleEventRule

ResourceKind string
EventType string
ResourceKind string
EventType string
resourceKind String
eventType String
resourceKind string
eventType string
resourceKind String
eventType String

GetClusterAlterRuleMetricRule

Duration string
Expression string
ThresholdValue float64
Comparison string
Description string

GetClusterAlterRuleNodeRule

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 Integer
memThreshold Integer
nodeId String
selector Map<String,Object>
condition string
cpuThreshold number
memThreshold number
nodeId string
selector {[key: string]: any}
condition str
cpu_threshold int
mem_threshold int
node_id str
selector Mapping[str, Any]
condition String
cpuThreshold Number
memThreshold Number
nodeId String
selector Map<Any>

GetClusterAlterRuleSystemServiceRule

Condition string
Condition string
condition String
condition string
condition String

Package Details

Repository
Rancher2 pulumi/pulumi-rancher2
License
Apache-2.0
Notes

This Pulumi package is based on the rancher2 Terraform Provider.