rancher2.ClusterAlterRule
Explore with Pulumi AI
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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new Rancher2 Cluster Alert Group
var foo = new Rancher2.ClusterAlertGroup("foo", new()
{
ClusterId = "<cluster_id>",
Description = "Terraform cluster alert group",
GroupIntervalSeconds = 300,
RepeatIntervalSeconds = 3600,
});
});
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v5/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.ClusterAlertGroup;
import com.pulumi.rancher2.ClusterAlertGroupArgs;
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) {
var foo = new ClusterAlertGroup("foo", ClusterAlertGroupArgs.builder()
.clusterId("<cluster_id>")
.description("Terraform cluster alert group")
.groupIntervalSeconds(300)
.repeatIntervalSeconds(3600)
.build());
}
}
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,
});
resources:
# Create a new Rancher2 Cluster Alert Group
foo:
type: rancher2:ClusterAlertGroup
properties:
clusterId: <cluster_id>
description: Terraform cluster alert group
groupIntervalSeconds: 300
repeatIntervalSeconds: 3600
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:
- Cluster
Id string The cluster id where create cluster alert group (string)
- Group
Id string Alert rule group ID
- Annotations Dictionary<string, object>
The cluster alert group annotations (map)
- Event
Rule ClusterAlter Rule Event Rule Alert event rule
- Group
Interval intSeconds The cluster alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The cluster alert group wait seconds. Default:
180
(int)- Inherited bool
Alert rule inherited
- Labels Dictionary<string, object>
The cluster alert group labels (map)
- Metric
Rule ClusterAlter Rule Metric Rule Alert metric rule
- Name string
The cluster alert group name (string)
- Node
Rule ClusterAlter Rule Node Rule Alert node rule
- Repeat
Interval intSeconds The cluster alert group wait seconds. Default:
3600
(int)- Severity string
Alert rule severity
- System
Service ClusterRule Alter Rule System Service Rule Alert system service rule
- Cluster
Id string The cluster id where create cluster alert group (string)
- Group
Id string Alert rule group ID
- Annotations map[string]interface{}
The cluster alert group annotations (map)
- Event
Rule ClusterAlter Rule Event Rule Args Alert event rule
- Group
Interval intSeconds The cluster alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The cluster alert group wait seconds. Default:
180
(int)- Inherited bool
Alert rule inherited
- Labels map[string]interface{}
The cluster alert group labels (map)
- Metric
Rule ClusterAlter Rule Metric Rule Args Alert metric rule
- Name string
The cluster alert group name (string)
- Node
Rule ClusterAlter Rule Node Rule Args Alert node rule
- Repeat
Interval intSeconds The cluster alert group wait seconds. Default:
3600
(int)- Severity string
Alert rule severity
- System
Service ClusterRule Alter Rule System Service Rule Args Alert system service rule
- cluster
Id String The cluster id where create cluster alert group (string)
- group
Id String Alert rule group ID
- annotations Map<String,Object>
The cluster alert group annotations (map)
- event
Rule ClusterAlter Rule Event Rule Alert event rule
- group
Interval IntegerSeconds The cluster alert group interval seconds. Default:
180
(int)- group
Wait IntegerSeconds The cluster alert group wait seconds. Default:
180
(int)- inherited Boolean
Alert rule inherited
- labels Map<String,Object>
The cluster alert group labels (map)
- metric
Rule ClusterAlter Rule Metric Rule Alert metric rule
- name String
The cluster alert group name (string)
- node
Rule ClusterAlter Rule Node Rule Alert node rule
- repeat
Interval IntegerSeconds The cluster alert group wait seconds. Default:
3600
(int)- severity String
Alert rule severity
- system
Service ClusterRule Alter Rule System Service Rule Alert system service rule
- cluster
Id string The cluster id where create cluster alert group (string)
- group
Id string Alert rule group ID
- annotations {[key: string]: any}
The cluster alert group annotations (map)
- event
Rule ClusterAlter Rule Event Rule Alert event rule
- group
Interval numberSeconds The cluster alert group interval seconds. Default:
180
(int)- group
Wait numberSeconds The cluster alert group wait seconds. Default:
180
(int)- inherited boolean
Alert rule inherited
- labels {[key: string]: any}
The cluster alert group labels (map)
- metric
Rule ClusterAlter Rule Metric Rule Alert metric rule
- name string
The cluster alert group name (string)
- node
Rule ClusterAlter Rule Node Rule Alert node rule
- repeat
Interval numberSeconds The cluster alert group wait seconds. Default:
3600
(int)- severity string
Alert rule severity
- system
Service ClusterRule Alter Rule System Service Rule 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 ClusterAlter Rule Event Rule Args Alert event rule
- group_
interval_ intseconds The cluster alert group interval seconds. Default:
180
(int)- group_
wait_ intseconds 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 ClusterAlter Rule Metric Rule Args Alert metric rule
- name str
The cluster alert group name (string)
- node_
rule ClusterAlter Rule Node Rule Args Alert node rule
- repeat_
interval_ intseconds The cluster alert group wait seconds. Default:
3600
(int)- severity str
Alert rule severity
- system_
service_ Clusterrule Alter Rule System Service Rule Args Alert system service rule
- cluster
Id String The cluster id where create cluster alert group (string)
- group
Id String Alert rule group ID
- annotations Map<Any>
The cluster alert group annotations (map)
- event
Rule Property Map Alert event rule
- group
Interval NumberSeconds The cluster alert group interval seconds. Default:
180
(int)- group
Wait NumberSeconds The cluster alert group wait seconds. Default:
180
(int)- inherited Boolean
Alert rule inherited
- labels Map<Any>
The cluster alert group labels (map)
- metric
Rule Property Map Alert metric rule
- name String
The cluster alert group name (string)
- node
Rule Property Map Alert node rule
- repeat
Interval NumberSeconds The cluster alert group wait seconds. Default:
3600
(int)- severity String
Alert rule severity
- system
Service Property MapRule 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.
- Annotations Dictionary<string, object>
The cluster alert group annotations (map)
- Cluster
Id string The cluster id where create cluster alert group (string)
- Event
Rule ClusterAlter Rule Event Rule Alert event rule
- Group
Id string Alert rule group ID
- Group
Interval intSeconds The cluster alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The cluster alert group wait seconds. Default:
180
(int)- Inherited bool
Alert rule inherited
- Labels Dictionary<string, object>
The cluster alert group labels (map)
- Metric
Rule ClusterAlter Rule Metric Rule Alert metric rule
- Name string
The cluster alert group name (string)
- Node
Rule ClusterAlter Rule Node Rule Alert node rule
- Repeat
Interval intSeconds The cluster alert group wait seconds. Default:
3600
(int)- Severity string
Alert rule severity
- System
Service ClusterRule Alter Rule System Service Rule Alert system service rule
- Annotations map[string]interface{}
The cluster alert group annotations (map)
- Cluster
Id string The cluster id where create cluster alert group (string)
- Event
Rule ClusterAlter Rule Event Rule Args Alert event rule
- Group
Id string Alert rule group ID
- Group
Interval intSeconds The cluster alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The cluster alert group wait seconds. Default:
180
(int)- Inherited bool
Alert rule inherited
- Labels map[string]interface{}
The cluster alert group labels (map)
- Metric
Rule ClusterAlter Rule Metric Rule Args Alert metric rule
- Name string
The cluster alert group name (string)
- Node
Rule ClusterAlter Rule Node Rule Args Alert node rule
- Repeat
Interval intSeconds The cluster alert group wait seconds. Default:
3600
(int)- Severity string
Alert rule severity
- System
Service ClusterRule Alter Rule System Service Rule Args Alert system service rule
- annotations Map<String,Object>
The cluster alert group annotations (map)
- cluster
Id String The cluster id where create cluster alert group (string)
- event
Rule ClusterAlter Rule Event Rule Alert event rule
- group
Id String Alert rule group ID
- group
Interval IntegerSeconds The cluster alert group interval seconds. Default:
180
(int)- group
Wait IntegerSeconds The cluster alert group wait seconds. Default:
180
(int)- inherited Boolean
Alert rule inherited
- labels Map<String,Object>
The cluster alert group labels (map)
- metric
Rule ClusterAlter Rule Metric Rule Alert metric rule
- name String
The cluster alert group name (string)
- node
Rule ClusterAlter Rule Node Rule Alert node rule
- repeat
Interval IntegerSeconds The cluster alert group wait seconds. Default:
3600
(int)- severity String
Alert rule severity
- system
Service ClusterRule Alter Rule System Service Rule Alert system service rule
- annotations {[key: string]: any}
The cluster alert group annotations (map)
- cluster
Id string The cluster id where create cluster alert group (string)
- event
Rule ClusterAlter Rule Event Rule Alert event rule
- group
Id string Alert rule group ID
- group
Interval numberSeconds The cluster alert group interval seconds. Default:
180
(int)- group
Wait numberSeconds The cluster alert group wait seconds. Default:
180
(int)- inherited boolean
Alert rule inherited
- labels {[key: string]: any}
The cluster alert group labels (map)
- metric
Rule ClusterAlter Rule Metric Rule Alert metric rule
- name string
The cluster alert group name (string)
- node
Rule ClusterAlter Rule Node Rule Alert node rule
- repeat
Interval numberSeconds The cluster alert group wait seconds. Default:
3600
(int)- severity string
Alert rule severity
- system
Service ClusterRule Alter Rule System Service Rule 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 ClusterAlter Rule Event Rule Args Alert event rule
- group_
id str Alert rule group ID
- group_
interval_ intseconds The cluster alert group interval seconds. Default:
180
(int)- group_
wait_ intseconds 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 ClusterAlter Rule Metric Rule Args Alert metric rule
- name str
The cluster alert group name (string)
- node_
rule ClusterAlter Rule Node Rule Args Alert node rule
- repeat_
interval_ intseconds The cluster alert group wait seconds. Default:
3600
(int)- severity str
Alert rule severity
- system_
service_ Clusterrule Alter Rule System Service Rule Args Alert system service rule
- annotations Map<Any>
The cluster alert group annotations (map)
- cluster
Id String The cluster id where create cluster alert group (string)
- event
Rule Property Map Alert event rule
- group
Id String Alert rule group ID
- group
Interval NumberSeconds The cluster alert group interval seconds. Default:
180
(int)- group
Wait NumberSeconds The cluster alert group wait seconds. Default:
180
(int)- inherited Boolean
Alert rule inherited
- labels Map<Any>
The cluster alert group labels (map)
- metric
Rule Property Map Alert metric rule
- name String
The cluster alert group name (string)
- node
Rule Property Map Alert node rule
- repeat
Interval NumberSeconds The cluster alert group wait seconds. Default:
3600
(int)- severity String
Alert rule severity
- system
Service Property MapRule Alert system service rule
Supporting Types
ClusterAlterRuleEventRule, ClusterAlterRuleEventRuleArgs
- Resource
Kind string - Event
Type string
- Resource
Kind string - Event
Type string
- resource
Kind String - event
Type String
- resource
Kind string - event
Type string
- resource_
kind str - event_
type str
- resource
Kind String - event
Type String
ClusterAlterRuleMetricRule, ClusterAlterRuleMetricRuleArgs
- Duration string
- Expression string
- Threshold
Value double - Comparison string
- Description string
The cluster alert group description (string)
- Duration string
- Expression string
- Threshold
Value float64 - Comparison string
- Description string
The cluster alert group description (string)
- duration String
- expression String
- threshold
Value Double - comparison String
- description String
The cluster alert group description (string)
- duration string
- expression string
- threshold
Value 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
- threshold
Value Number - comparison String
- description String
The cluster alert group description (string)
ClusterAlterRuleNodeRule, ClusterAlterRuleNodeRuleArgs
- 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 Integer - mem
Threshold Integer - node
Id String - selector Map<String,Object>
- 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]
- condition String
- cpu
Threshold Number - mem
Threshold Number - node
Id String - selector Map<Any>
ClusterAlterRuleSystemServiceRule, ClusterAlterRuleSystemServiceRuleArgs
- Condition string
- Condition string
- condition String
- condition string
- condition str
- condition String
Import
Cluster Alert Group can be imported using the Rancher cluster alert group ID
$ pulumi import rancher2:index/clusterAlterRule:ClusterAlterRule foo <CLUSTER_ALERT_GROUP_ID>
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
rancher2
Terraform Provider.