ProjectAlertRule

Create a ProjectAlertRule Resource

def ProjectAlertRule(resource_name, opts=None, annotations=None, group_id=None, group_interval_seconds=None, group_wait_seconds=None, inherited=None, labels=None, metric_rule=None, name=None, pod_rule=None, project_id=None, repeat_interval_seconds=None, severity=None, workload_rule=None, __props__=None);
name string
The unique name of the resource.
args ProjectAlertRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ProjectAlertRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProjectAlertRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ProjectAlertRule Resource Properties

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

Inputs

The ProjectAlertRule resource accepts the following input properties:

GroupId string

The project alert rule alert group ID (string)

ProjectId string

The project id where create project alert rule (string)

Annotations Dictionary<string, object>

The project alert rule annotations (map)

GroupIntervalSeconds int

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

GroupWaitSeconds int

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

Inherited bool

The project alert rule inherited. Default: true (bool)

Labels Dictionary<string, object>

The project alert rule labels (map)

MetricRule ProjectAlertRuleMetricRuleArgs

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

Name string

The project alert rule name (string)

PodRule ProjectAlertRulePodRuleArgs

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

RepeatIntervalSeconds int

The project alert rule wait seconds. Default: 3600 (int)

Severity string

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

WorkloadRule ProjectAlertRuleWorkloadRuleArgs

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

GroupId string

The project alert rule alert group ID (string)

ProjectId string

The project id where create project alert rule (string)

Annotations map[string]interface{}

The project alert rule annotations (map)

GroupIntervalSeconds int

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

GroupWaitSeconds int

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

Inherited bool

The project alert rule inherited. Default: true (bool)

Labels map[string]interface{}

The project alert rule labels (map)

MetricRule ProjectAlertRuleMetricRule

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

Name string

The project alert rule name (string)

PodRule ProjectAlertRulePodRule

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

RepeatIntervalSeconds int

The project alert rule wait seconds. Default: 3600 (int)

Severity string

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

WorkloadRule ProjectAlertRuleWorkloadRule

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

groupId string

The project alert rule alert group ID (string)

projectId string

The project id where create project alert rule (string)

annotations {[key: string]: any}

The project alert rule annotations (map)

groupIntervalSeconds number

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

groupWaitSeconds number

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

inherited boolean

The project alert rule inherited. Default: true (bool)

labels {[key: string]: any}

The project alert rule labels (map)

metricRule ProjectAlertRuleMetricRule

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

name string

The project alert rule name (string)

podRule ProjectAlertRulePodRule

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

repeatIntervalSeconds number

The project alert rule wait seconds. Default: 3600 (int)

severity string

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

workloadRule ProjectAlertRuleWorkloadRule

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

group_id str

The project alert rule alert group ID (string)

project_id str

The project id where create project alert rule (string)

annotations Dict[str, Any]

The project alert rule annotations (map)

group_interval_seconds float

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

group_wait_seconds float

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

inherited bool

The project alert rule inherited. Default: true (bool)

labels Dict[str, Any]

The project alert rule labels (map)

metric_rule Dict[ProjectAlertRuleMetricRule]

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

name str

The project alert rule name (string)

pod_rule Dict[ProjectAlertRulePodRule]

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

repeat_interval_seconds float

The project alert rule wait seconds. Default: 3600 (int)

severity str

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

workload_rule Dict[ProjectAlertRuleWorkloadRule]

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

Outputs

All input properties are implicitly available as output properties. Additionally, the ProjectAlertRule 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ProjectAlertRule Resource

Get an existing ProjectAlertRule 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?: ProjectAlertRuleState, opts?: CustomResourceOptions): ProjectAlertRule
static get(resource_name, id, opts=None, annotations=None, group_id=None, group_interval_seconds=None, group_wait_seconds=None, inherited=None, labels=None, metric_rule=None, name=None, pod_rule=None, project_id=None, repeat_interval_seconds=None, severity=None, workload_rule=None, __props__=None);
func GetProjectAlertRule(ctx *Context, name string, id IDInput, state *ProjectAlertRuleState, opts ...ResourceOption) (*ProjectAlertRule, error)
public static ProjectAlertRule Get(string name, Input<string> id, ProjectAlertRuleState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Annotations Dictionary<string, object>

The project alert rule annotations (map)

GroupId string

The project alert rule alert group ID (string)

GroupIntervalSeconds int

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

GroupWaitSeconds int

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

Inherited bool

The project alert rule inherited. Default: true (bool)

Labels Dictionary<string, object>

The project alert rule labels (map)

MetricRule ProjectAlertRuleMetricRuleArgs

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

Name string

The project alert rule name (string)

PodRule ProjectAlertRulePodRuleArgs

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

ProjectId string

The project id where create project alert rule (string)

RepeatIntervalSeconds int

The project alert rule wait seconds. Default: 3600 (int)

Severity string

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

WorkloadRule ProjectAlertRuleWorkloadRuleArgs

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

Annotations map[string]interface{}

The project alert rule annotations (map)

GroupId string

The project alert rule alert group ID (string)

GroupIntervalSeconds int

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

GroupWaitSeconds int

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

Inherited bool

The project alert rule inherited. Default: true (bool)

Labels map[string]interface{}

The project alert rule labels (map)

MetricRule ProjectAlertRuleMetricRule

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

Name string

The project alert rule name (string)

PodRule ProjectAlertRulePodRule

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

ProjectId string

The project id where create project alert rule (string)

RepeatIntervalSeconds int

The project alert rule wait seconds. Default: 3600 (int)

Severity string

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

WorkloadRule ProjectAlertRuleWorkloadRule

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

annotations {[key: string]: any}

The project alert rule annotations (map)

groupId string

The project alert rule alert group ID (string)

groupIntervalSeconds number

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

groupWaitSeconds number

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

inherited boolean

The project alert rule inherited. Default: true (bool)

labels {[key: string]: any}

The project alert rule labels (map)

metricRule ProjectAlertRuleMetricRule

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

name string

The project alert rule name (string)

podRule ProjectAlertRulePodRule

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

projectId string

The project id where create project alert rule (string)

repeatIntervalSeconds number

The project alert rule wait seconds. Default: 3600 (int)

severity string

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

workloadRule ProjectAlertRuleWorkloadRule

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

annotations Dict[str, Any]

The project alert rule annotations (map)

group_id str

The project alert rule alert group ID (string)

group_interval_seconds float

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

group_wait_seconds float

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

inherited bool

The project alert rule inherited. Default: true (bool)

labels Dict[str, Any]

The project alert rule labels (map)

metric_rule Dict[ProjectAlertRuleMetricRule]

The project alert rule metric rule. ConflictsWith: "pod_rule", "workload_rule"` (list Maxitems:1)

name str

The project alert rule name (string)

pod_rule Dict[ProjectAlertRulePodRule]

The project alert rule pod rule. ConflictsWith: "metric_rule", "workload_rule"` (list Maxitems:1)

project_id str

The project id where create project alert rule (string)

repeat_interval_seconds float

The project alert rule wait seconds. Default: 3600 (int)

severity str

The project alert rule severity. Supported values : "critical" | "info" | "warning". Default: critical (string)

workload_rule Dict[ProjectAlertRuleWorkloadRule]

The project alert rule workload rule. ConflictsWith: "metric_rule", "pod_rule"` (list Maxitems:1)

Supporting Types

ProjectAlertRuleMetricRule

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Duration string

Metric rule duration (string)

Expression string

Metric rule expression (string)

ThresholdValue double

Metric rule threshold value (float64)

Comparison string

Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)

Description string

Metric rule description (string)

Duration string

Metric rule duration (string)

Expression string

Metric rule expression (string)

ThresholdValue float64

Metric rule threshold value (float64)

Comparison string

Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)

Description string

Metric rule description (string)

duration string

Metric rule duration (string)

expression string

Metric rule expression (string)

thresholdValue number

Metric rule threshold value (float64)

comparison string

Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)

description string

Metric rule description (string)

duration str

Metric rule duration (string)

expression str

Metric rule expression (string)

thresholdValue float

Metric rule threshold value (float64)

comparison str

Metric rule comparison. Supported values : "equal" | "greater-or-equal" | "greater-than" | "less-or-equal" | "less-than" | "not-equal" | "has-value". Default: equal (string)

description str

Metric rule description (string)

ProjectAlertRulePodRule

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

PodId string

Pod ID (string)

Condition string

Pod rule condition. Supported values : "notrunning" | "notscheduled" | "restarts". Default: notrunning (string)

RestartIntervalSeconds int

Pod rule restart interval seconds. Default: 300 (int)

RestartTimes int

Pod rule restart times. Default: 3 (int)

PodId string

Pod ID (string)

Condition string

Pod rule condition. Supported values : "notrunning" | "notscheduled" | "restarts". Default: notrunning (string)

RestartIntervalSeconds int

Pod rule restart interval seconds. Default: 300 (int)

RestartTimes int

Pod rule restart times. Default: 3 (int)

podId string

Pod ID (string)

condition string

Pod rule condition. Supported values : "notrunning" | "notscheduled" | "restarts". Default: notrunning (string)

restartIntervalSeconds number

Pod rule restart interval seconds. Default: 300 (int)

restartTimes number

Pod rule restart times. Default: 3 (int)

podId str

Pod ID (string)

condition str

Pod rule condition. Supported values : "notrunning" | "notscheduled" | "restarts". Default: notrunning (string)

restartIntervalSeconds float

Pod rule restart interval seconds. Default: 300 (int)

restartTimes float

Pod rule restart times. Default: 3 (int)

ProjectAlertRuleWorkloadRule

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AvailablePercentage int

Workload rule available percentage. Default: 70 (int)

Selector Dictionary<string, object>

Workload rule selector (map)

WorkloadId string

Workload ID (string)

AvailablePercentage int

Workload rule available percentage. Default: 70 (int)

Selector map[string]interface{}

Workload rule selector (map)

WorkloadId string

Workload ID (string)

availablePercentage number

Workload rule available percentage. Default: 70 (int)

selector {[key: string]: any}

Workload rule selector (map)

workloadId string

Workload ID (string)

availablePercentage float

Workload rule available percentage. Default: 70 (int)

selector Dict[str, Any]

Workload rule selector (map)

workloadId str

Workload ID (string)

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes
This Pulumi package is based on the rancher2 Terraform Provider.