Rancher2

v3.8.0 published on Tuesday, May 31, 2022 by Pulumi

ClusterAlterRule

Deprecated:

rancher2.ClusterAlterRule has been deprecated in favor of rancher2.ClusterAlertRule

Provides a Rancher v2 Cluster Alert Group resource. This can be used to create Cluster Alert Group for Rancher v2 environments and retrieve their information.

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new Rancher2 Cluster Alert Group
        var foo = new Rancher2.ClusterAlertGroup("foo", new Rancher2.ClusterAlertGroupArgs
        {
            ClusterId = "<cluster_id>",
            Description = "Terraform cluster alert group",
            GroupIntervalSeconds = 300,
            RepeatIntervalSeconds = 3600,
        });
    }

}
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.NewClusterAlertGroup(ctx, "foo", &rancher2.ClusterAlertGroupArgs{
			ClusterId:             pulumi.String("<cluster_id>"),
			Description:           pulumi.String("Terraform cluster alert group"),
			GroupIntervalSeconds:  pulumi.Int(300),
			RepeatIntervalSeconds: pulumi.Int(3600),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_rancher2 as rancher2

# Create a new Rancher2 Cluster Alert Group
foo = rancher2.ClusterAlertGroup("foo",
    cluster_id="<cluster_id>",
    description="Terraform cluster alert group",
    group_interval_seconds=300,
    repeat_interval_seconds=3600)
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

// Create a new Rancher2 Cluster Alert Group
const foo = new rancher2.ClusterAlertGroup("foo", {
    clusterId: "<cluster_id>",
    description: "Terraform cluster alert group",
    groupIntervalSeconds: 300,
    repeatIntervalSeconds: 3600,
});

Coming soon!

Create ClusterAlterRule Resource

new ClusterAlterRule(name: string, args: ClusterAlterRuleArgs, opts?: CustomResourceOptions);
@overload
def ClusterAlterRule(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     annotations: Optional[Mapping[str, Any]] = None,
                     cluster_id: Optional[str] = None,
                     event_rule: Optional[ClusterAlterRuleEventRuleArgs] = None,
                     group_id: Optional[str] = None,
                     group_interval_seconds: Optional[int] = None,
                     group_wait_seconds: Optional[int] = None,
                     inherited: Optional[bool] = None,
                     labels: Optional[Mapping[str, Any]] = None,
                     metric_rule: Optional[ClusterAlterRuleMetricRuleArgs] = None,
                     name: Optional[str] = None,
                     node_rule: Optional[ClusterAlterRuleNodeRuleArgs] = None,
                     repeat_interval_seconds: Optional[int] = None,
                     severity: Optional[str] = None,
                     system_service_rule: Optional[ClusterAlterRuleSystemServiceRuleArgs] = None)
@overload
def ClusterAlterRule(resource_name: str,
                     args: ClusterAlterRuleArgs,
                     opts: Optional[ResourceOptions] = None)
func NewClusterAlterRule(ctx *Context, name string, args ClusterAlterRuleArgs, opts ...ResourceOption) (*ClusterAlterRule, error)
public ClusterAlterRule(string name, ClusterAlterRuleArgs args, CustomResourceOptions? opts = null)
public ClusterAlterRule(String name, ClusterAlterRuleArgs args)
public ClusterAlterRule(String name, ClusterAlterRuleArgs args, CustomResourceOptions options)
type: rancher2:ClusterAlterRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ClusterAlterRuleArgs
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 ClusterAlterRuleArgs
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 ClusterAlterRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClusterAlterRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ClusterAlterRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ClusterAlterRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ClusterAlterRule resource accepts the following input properties:

ClusterId string

The cluster id where create cluster alert group (string)

GroupId string

Alert rule group ID

Annotations Dictionary<string, object>

The cluster alert group annotations (map)

EventRule ClusterAlterRuleEventRuleArgs

Alert event rule

GroupIntervalSeconds int

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

GroupWaitSeconds int

The cluster alert group wait seconds. Default: 180 (int)

Inherited bool

Alert rule inherited

Labels Dictionary<string, object>

The cluster alert group labels (map)

MetricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

Name string

The cluster alert group name (string)

NodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

RepeatIntervalSeconds int

The cluster alert group wait seconds. Default: 3600 (int)

Severity string

Alert rule severity

SystemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

ClusterId string

The cluster id where create cluster alert group (string)

GroupId string

Alert rule group ID

Annotations map[string]interface{}

The cluster alert group annotations (map)

EventRule ClusterAlterRuleEventRuleArgs

Alert event rule

GroupIntervalSeconds int

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

GroupWaitSeconds int

The cluster alert group wait seconds. Default: 180 (int)

Inherited bool

Alert rule inherited

Labels map[string]interface{}

The cluster alert group labels (map)

MetricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

Name string

The cluster alert group name (string)

NodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

RepeatIntervalSeconds int

The cluster alert group wait seconds. Default: 3600 (int)

Severity string

Alert rule severity

SystemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

clusterId String

The cluster id where create cluster alert group (string)

groupId String

Alert rule group ID

annotations Map<String,Object>

The cluster alert group annotations (map)

eventRule ClusterAlterRuleEventRuleArgs

Alert event rule

groupIntervalSeconds Integer

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

groupWaitSeconds Integer

The cluster alert group wait seconds. Default: 180 (int)

inherited Boolean

Alert rule inherited

labels Map<String,Object>

The cluster alert group labels (map)

metricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

name String

The cluster alert group name (string)

nodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

repeatIntervalSeconds Integer

The cluster alert group wait seconds. Default: 3600 (int)

severity String

Alert rule severity

systemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

clusterId string

The cluster id where create cluster alert group (string)

groupId string

Alert rule group ID

annotations {[key: string]: any}

The cluster alert group annotations (map)

eventRule ClusterAlterRuleEventRuleArgs

Alert event rule

groupIntervalSeconds number

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

groupWaitSeconds number

The cluster alert group wait seconds. Default: 180 (int)

inherited boolean

Alert rule inherited

labels {[key: string]: any}

The cluster alert group labels (map)

metricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

name string

The cluster alert group name (string)

nodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

repeatIntervalSeconds number

The cluster alert group wait seconds. Default: 3600 (int)

severity string

Alert rule severity

systemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

cluster_id str

The cluster id where create cluster alert group (string)

group_id str

Alert rule group ID

annotations Mapping[str, Any]

The cluster alert group annotations (map)

event_rule ClusterAlterRuleEventRuleArgs

Alert event rule

group_interval_seconds int

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

group_wait_seconds int

The cluster alert group wait seconds. Default: 180 (int)

inherited bool

Alert rule inherited

labels Mapping[str, Any]

The cluster alert group labels (map)

metric_rule ClusterAlterRuleMetricRuleArgs

Alert metric rule

name str

The cluster alert group name (string)

node_rule ClusterAlterRuleNodeRuleArgs

Alert node rule

repeat_interval_seconds int

The cluster alert group wait seconds. Default: 3600 (int)

severity str

Alert rule severity

system_service_rule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

clusterId String

The cluster id where create cluster alert group (string)

groupId String

Alert rule group ID

annotations Map<Any>

The cluster alert group annotations (map)

eventRule Property Map

Alert event rule

groupIntervalSeconds Number

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

groupWaitSeconds Number

The cluster alert group wait seconds. Default: 180 (int)

inherited Boolean

Alert rule inherited

labels Map<Any>

The cluster alert group labels (map)

metricRule Property Map

Alert metric rule

name String

The cluster alert group name (string)

nodeRule Property Map

Alert node rule

repeatIntervalSeconds Number

The cluster alert group wait seconds. Default: 3600 (int)

severity String

Alert rule severity

systemServiceRule Property Map

Alert system service rule

Outputs

All input properties are implicitly available as output properties. Additionally, the ClusterAlterRule resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing ClusterAlterRule Resource

Get an existing ClusterAlterRule 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?: ClusterAlterRuleState, opts?: CustomResourceOptions): ClusterAlterRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        annotations: Optional[Mapping[str, Any]] = None,
        cluster_id: Optional[str] = None,
        event_rule: Optional[ClusterAlterRuleEventRuleArgs] = None,
        group_id: Optional[str] = None,
        group_interval_seconds: Optional[int] = None,
        group_wait_seconds: Optional[int] = None,
        inherited: Optional[bool] = None,
        labels: Optional[Mapping[str, Any]] = None,
        metric_rule: Optional[ClusterAlterRuleMetricRuleArgs] = None,
        name: Optional[str] = None,
        node_rule: Optional[ClusterAlterRuleNodeRuleArgs] = None,
        repeat_interval_seconds: Optional[int] = None,
        severity: Optional[str] = None,
        system_service_rule: Optional[ClusterAlterRuleSystemServiceRuleArgs] = None) -> ClusterAlterRule
func GetClusterAlterRule(ctx *Context, name string, id IDInput, state *ClusterAlterRuleState, opts ...ResourceOption) (*ClusterAlterRule, error)
public static ClusterAlterRule Get(string name, Input<string> id, ClusterAlterRuleState? state, CustomResourceOptions? opts = null)
public static ClusterAlterRule get(String name, Output<String> id, ClusterAlterRuleState 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.
The following state arguments are supported:
Annotations Dictionary<string, object>

The cluster alert group annotations (map)

ClusterId string

The cluster id where create cluster alert group (string)

EventRule ClusterAlterRuleEventRuleArgs

Alert event rule

GroupId string

Alert rule group ID

GroupIntervalSeconds int

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

GroupWaitSeconds int

The cluster alert group wait seconds. Default: 180 (int)

Inherited bool

Alert rule inherited

Labels Dictionary<string, object>

The cluster alert group labels (map)

MetricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

Name string

The cluster alert group name (string)

NodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

RepeatIntervalSeconds int

The cluster alert group wait seconds. Default: 3600 (int)

Severity string

Alert rule severity

SystemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

Annotations map[string]interface{}

The cluster alert group annotations (map)

ClusterId string

The cluster id where create cluster alert group (string)

EventRule ClusterAlterRuleEventRuleArgs

Alert event rule

GroupId string

Alert rule group ID

GroupIntervalSeconds int

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

GroupWaitSeconds int

The cluster alert group wait seconds. Default: 180 (int)

Inherited bool

Alert rule inherited

Labels map[string]interface{}

The cluster alert group labels (map)

MetricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

Name string

The cluster alert group name (string)

NodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

RepeatIntervalSeconds int

The cluster alert group wait seconds. Default: 3600 (int)

Severity string

Alert rule severity

SystemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

annotations Map<String,Object>

The cluster alert group annotations (map)

clusterId String

The cluster id where create cluster alert group (string)

eventRule ClusterAlterRuleEventRuleArgs

Alert event rule

groupId String

Alert rule group ID

groupIntervalSeconds Integer

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

groupWaitSeconds Integer

The cluster alert group wait seconds. Default: 180 (int)

inherited Boolean

Alert rule inherited

labels Map<String,Object>

The cluster alert group labels (map)

metricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

name String

The cluster alert group name (string)

nodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

repeatIntervalSeconds Integer

The cluster alert group wait seconds. Default: 3600 (int)

severity String

Alert rule severity

systemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

annotations {[key: string]: any}

The cluster alert group annotations (map)

clusterId string

The cluster id where create cluster alert group (string)

eventRule ClusterAlterRuleEventRuleArgs

Alert event rule

groupId string

Alert rule group ID

groupIntervalSeconds number

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

groupWaitSeconds number

The cluster alert group wait seconds. Default: 180 (int)

inherited boolean

Alert rule inherited

labels {[key: string]: any}

The cluster alert group labels (map)

metricRule ClusterAlterRuleMetricRuleArgs

Alert metric rule

name string

The cluster alert group name (string)

nodeRule ClusterAlterRuleNodeRuleArgs

Alert node rule

repeatIntervalSeconds number

The cluster alert group wait seconds. Default: 3600 (int)

severity string

Alert rule severity

systemServiceRule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

annotations Mapping[str, Any]

The cluster alert group annotations (map)

cluster_id str

The cluster id where create cluster alert group (string)

event_rule ClusterAlterRuleEventRuleArgs

Alert event rule

group_id str

Alert rule group ID

group_interval_seconds int

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

group_wait_seconds int

The cluster alert group wait seconds. Default: 180 (int)

inherited bool

Alert rule inherited

labels Mapping[str, Any]

The cluster alert group labels (map)

metric_rule ClusterAlterRuleMetricRuleArgs

Alert metric rule

name str

The cluster alert group name (string)

node_rule ClusterAlterRuleNodeRuleArgs

Alert node rule

repeat_interval_seconds int

The cluster alert group wait seconds. Default: 3600 (int)

severity str

Alert rule severity

system_service_rule ClusterAlterRuleSystemServiceRuleArgs

Alert system service rule

annotations Map<Any>

The cluster alert group annotations (map)

clusterId String

The cluster id where create cluster alert group (string)

eventRule Property Map

Alert event rule

groupId String

Alert rule group ID

groupIntervalSeconds Number

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

groupWaitSeconds Number

The cluster alert group wait seconds. Default: 180 (int)

inherited Boolean

Alert rule inherited

labels Map<Any>

The cluster alert group labels (map)

metricRule Property Map

Alert metric rule

name String

The cluster alert group name (string)

nodeRule Property Map

Alert node rule

repeatIntervalSeconds Number

The cluster alert group wait seconds. Default: 3600 (int)

severity String

Alert rule severity

systemServiceRule Property Map

Alert system service rule

Supporting Types

ClusterAlterRuleEventRule

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

ClusterAlterRuleMetricRule

Duration string
Expression string
ThresholdValue double
Comparison string
Description string

The cluster alert group description (string)

Duration string
Expression string
ThresholdValue float64
Comparison string
Description string

The cluster alert group description (string)

duration String
expression String
thresholdValue Double
comparison String
description String

The cluster alert group description (string)

duration string
expression string
thresholdValue number
comparison string
description string

The cluster alert group description (string)

duration str
expression str
threshold_value float
comparison str
description str

The cluster alert group description (string)

duration String
expression String
thresholdValue Number
comparison String
description String

The cluster alert group description (string)

ClusterAlterRuleNodeRule

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>

ClusterAlterRuleSystemServiceRule

Condition string
Condition string
condition String
condition string
condition String

Import

Cluster Alert Group can be imported using the Rancher cluster alert group ID

 $ pulumi import rancher2:index/clusterAlterRule:ClusterAlterRule foo &lt;CLUSTER_ALERT_GROUP_ID&gt;

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes

This Pulumi package is based on the rancher2 Terraform Provider.