Rancher2
getProjectAlertRule
Use this data source to retrieve information about a Rancher v2 project alert rule.
Example Usage
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
class MyStack : Stack
{
public MyStack()
{
var foo = Output.Create(Rancher2.GetProjectAlertRule.InvokeAsync(new Rancher2.GetProjectAlertRuleArgs
{
Name = "<project_alert_rule_name>",
ProjectId = "<project_id>",
}));
}
}
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.LookupProjectAlertRule(ctx, &GetProjectAlertRuleArgs{
Name: "<project_alert_rule_name>",
ProjectId: "<project_id>",
}, nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_rancher2 as rancher2
foo = rancher2.get_project_alert_rule(name="<project_alert_rule_name>",
project_id="<project_id>")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
const foo = pulumi.output(rancher2.getProjectAlertRule({
name: "<project_alert_rule_name>",
projectId: "<project_id>",
}));
Coming soon!
Using getProjectAlertRule
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 getProjectAlertRule(args: GetProjectAlertRuleArgs, opts?: InvokeOptions): Promise<GetProjectAlertRuleResult>
function getProjectAlertRuleOutput(args: GetProjectAlertRuleOutputArgs, opts?: InvokeOptions): Output<GetProjectAlertRuleResult>
def get_project_alert_rule(labels: Optional[Mapping[str, Any]] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectAlertRuleResult
def get_project_alert_rule_output(labels: Optional[pulumi.Input[Mapping[str, Any]]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectAlertRuleResult]
func LookupProjectAlertRule(ctx *Context, args *LookupProjectAlertRuleArgs, opts ...InvokeOption) (*LookupProjectAlertRuleResult, error)
func LookupProjectAlertRuleOutput(ctx *Context, args *LookupProjectAlertRuleOutputArgs, opts ...InvokeOption) LookupProjectAlertRuleResultOutput
> Note: This function is named LookupProjectAlertRule
in the Go SDK.
public static class GetProjectAlertRule
{
public static Task<GetProjectAlertRuleResult> InvokeAsync(GetProjectAlertRuleArgs args, InvokeOptions? opts = null)
public static Output<GetProjectAlertRuleResult> Invoke(GetProjectAlertRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectAlertRuleResult> getProjectAlertRule(GetProjectAlertRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: rancher2:index/getProjectAlertRule:getProjectAlertRule
Arguments:
# Arguments dictionary
The following arguments are supported:
- name str
The project alert rule name (string)
- project_
id str The project id where create project alert rule (string)
- labels Mapping[str, Any]
(Computed) The project alert rule labels (map)
getProjectAlertRule Result
The following output properties are available:
- Annotations Dictionary<string, object>
(Computed) The project alert rule annotations (map)
- Group
Id string (Computed) The project alert rule alert group ID (string)
- Group
Interval intSeconds (Computed) The project alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds (Computed) The project alert rule group wait seconds. Default:
180
(int)- Id string
The provider-assigned unique ID for this managed resource.
- Inherited bool
(Computed) The project alert rule inherited. Default:
true
(bool)- Metric
Rule GetProject Alert Rule Metric Rule (Computed) The project alert rule metric rule. ConflictsWith: `"pod_rule", "workload_rule"`` (list Maxitems:1)
- Name string
- Pod
Rule GetProject Alert Rule Pod Rule (Computed) The project alert rule pod rule. ConflictsWith: `"metric_rule", "workload_rule"`` (list Maxitems:1)
- Project
Id string - Repeat
Interval intSeconds (Computed) The project alert rule wait seconds. Default:
3600
(int)- Severity string
(Computed) The project alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- Workload
Rule GetProject Alert Rule Workload Rule (Computed) The project alert rule workload rule. ConflictsWith: `"metric_rule", "pod_rule"`` (list Maxitems:1)
- Labels Dictionary<string, object>
(Computed) The project alert rule labels (map)
- Annotations map[string]interface{}
(Computed) The project alert rule annotations (map)
- Group
Id string (Computed) The project alert rule alert group ID (string)
- Group
Interval intSeconds (Computed) The project alert rule group interval seconds. Default:
180
(int)- Group
Wait intSeconds (Computed) The project alert rule group wait seconds. Default:
180
(int)- Id string
The provider-assigned unique ID for this managed resource.
- Inherited bool
(Computed) The project alert rule inherited. Default:
true
(bool)- Metric
Rule GetProject Alert Rule Metric Rule (Computed) The project alert rule metric rule. ConflictsWith: `"pod_rule", "workload_rule"`` (list Maxitems:1)
- Name string
- Pod
Rule GetProject Alert Rule Pod Rule (Computed) The project alert rule pod rule. ConflictsWith: `"metric_rule", "workload_rule"`` (list Maxitems:1)
- Project
Id string - Repeat
Interval intSeconds (Computed) The project alert rule wait seconds. Default:
3600
(int)- Severity string
(Computed) The project alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- Workload
Rule GetProject Alert Rule Workload Rule (Computed) The project alert rule workload rule. ConflictsWith: `"metric_rule", "pod_rule"`` (list Maxitems:1)
- Labels map[string]interface{}
(Computed) The project alert rule labels (map)
- annotations Map<String,Object>
(Computed) The project alert rule annotations (map)
- group
Id String (Computed) The project alert rule alert group ID (string)
- group
Interval IntegerSeconds (Computed) The project alert rule group interval seconds. Default:
180
(int)- group
Wait IntegerSeconds (Computed) The project alert rule group wait seconds. Default:
180
(int)- id String
The provider-assigned unique ID for this managed resource.
- inherited Boolean
(Computed) The project alert rule inherited. Default:
true
(bool)- metric
Rule GetProject Alert Rule Metric Rule (Computed) The project alert rule metric rule. ConflictsWith: `"pod_rule", "workload_rule"`` (list Maxitems:1)
- name String
- pod
Rule GetProject Alert Rule Pod Rule (Computed) The project alert rule pod rule. ConflictsWith: `"metric_rule", "workload_rule"`` (list Maxitems:1)
- project
Id String - repeat
Interval IntegerSeconds (Computed) The project alert rule wait seconds. Default:
3600
(int)- severity String
(Computed) The project alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- workload
Rule GetProject Alert Rule Workload Rule (Computed) The project alert rule workload rule. ConflictsWith: `"metric_rule", "pod_rule"`` (list Maxitems:1)
- labels Map<String,Object>
(Computed) The project alert rule labels (map)
- annotations {[key: string]: any}
(Computed) The project alert rule annotations (map)
- group
Id string (Computed) The project alert rule alert group ID (string)
- group
Interval numberSeconds (Computed) The project alert rule group interval seconds. Default:
180
(int)- group
Wait numberSeconds (Computed) The project alert rule group wait seconds. Default:
180
(int)- id string
The provider-assigned unique ID for this managed resource.
- inherited boolean
(Computed) The project alert rule inherited. Default:
true
(bool)- metric
Rule GetProject Alert Rule Metric Rule (Computed) The project alert rule metric rule. ConflictsWith: `"pod_rule", "workload_rule"`` (list Maxitems:1)
- name string
- pod
Rule GetProject Alert Rule Pod Rule (Computed) The project alert rule pod rule. ConflictsWith: `"metric_rule", "workload_rule"`` (list Maxitems:1)
- project
Id string - repeat
Interval numberSeconds (Computed) The project alert rule wait seconds. Default:
3600
(int)- severity string
(Computed) The project alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- workload
Rule GetProject Alert Rule Workload Rule (Computed) The project alert rule workload rule. ConflictsWith: `"metric_rule", "pod_rule"`` (list Maxitems:1)
- labels {[key: string]: any}
(Computed) The project alert rule labels (map)
- annotations Mapping[str, Any]
(Computed) The project alert rule annotations (map)
- group_
id str (Computed) The project alert rule alert group ID (string)
- group_
interval_ intseconds (Computed) The project alert rule group interval seconds. Default:
180
(int)- group_
wait_ intseconds (Computed) The project alert rule group wait seconds. Default:
180
(int)- id str
The provider-assigned unique ID for this managed resource.
- inherited bool
(Computed) The project alert rule inherited. Default:
true
(bool)- metric_
rule GetProject Alert Rule Metric Rule (Computed) The project alert rule metric rule. ConflictsWith: `"pod_rule", "workload_rule"`` (list Maxitems:1)
- name str
- pod_
rule GetProject Alert Rule Pod Rule (Computed) The project alert rule pod rule. ConflictsWith: `"metric_rule", "workload_rule"`` (list Maxitems:1)
- project_
id str - repeat_
interval_ intseconds (Computed) The project alert rule wait seconds. Default:
3600
(int)- severity str
(Computed) The project alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- workload_
rule GetProject Alert Rule Workload Rule (Computed) The project alert rule workload rule. ConflictsWith: `"metric_rule", "pod_rule"`` (list Maxitems:1)
- labels Mapping[str, Any]
(Computed) The project alert rule labels (map)
- annotations Map<Any>
(Computed) The project alert rule annotations (map)
- group
Id String (Computed) The project alert rule alert group ID (string)
- group
Interval NumberSeconds (Computed) The project alert rule group interval seconds. Default:
180
(int)- group
Wait NumberSeconds (Computed) The project alert rule group wait seconds. Default:
180
(int)- id String
The provider-assigned unique ID for this managed resource.
- inherited Boolean
(Computed) The project alert rule inherited. Default:
true
(bool)- metric
Rule Property Map (Computed) The project alert rule metric rule. ConflictsWith: `"pod_rule", "workload_rule"`` (list Maxitems:1)
- name String
- pod
Rule Property Map (Computed) The project alert rule pod rule. ConflictsWith: `"metric_rule", "workload_rule"`` (list Maxitems:1)
- project
Id String - repeat
Interval NumberSeconds (Computed) The project alert rule wait seconds. Default:
3600
(int)- severity String
(Computed) The project alert rule severity. Supported values :
"critical" | "info" | "warning"
. Default:critical
(string)- workload
Rule Property Map (Computed) The project alert rule workload rule. ConflictsWith: `"metric_rule", "pod_rule"`` (list Maxitems:1)
- labels Map<Any>
(Computed) The project alert rule labels (map)
Supporting Types
GetProjectAlertRuleMetricRule
- Duration string
- Expression string
- Threshold
Value double - Comparison string
- Description string
- Duration string
- Expression string
- Threshold
Value float64 - Comparison string
- Description string
- duration String
- expression String
- threshold
Value Double - comparison String
- description String
- duration string
- expression string
- threshold
Value number - comparison string
- description string
- duration str
- expression str
- threshold_
value float - comparison str
- description str
- duration String
- expression String
- threshold
Value Number - comparison String
- description String
GetProjectAlertRulePodRule
- Pod
Id string - Condition string
- Restart
Interval intSeconds - Restart
Times int
- Pod
Id string - Condition string
- Restart
Interval intSeconds - Restart
Times int
- pod
Id String - condition String
- restart
Interval IntegerSeconds - restart
Times Integer
- pod
Id string - condition string
- restart
Interval numberSeconds - restart
Times number
- pod_
id str - condition str
- restart_
interval_ intseconds - restart_
times int
- pod
Id String - condition String
- restart
Interval NumberSeconds - restart
Times Number
GetProjectAlertRuleWorkloadRule
- Available
Percentage int - Selector Dictionary<string, object>
- Workload
Id string
- Available
Percentage int - Selector map[string]interface{}
- Workload
Id string
- available
Percentage Integer - selector Map<String,Object>
- workload
Id String
- available
Percentage number - selector {[key: string]: any}
- workload
Id string
- available_
percentage int - selector Mapping[str, Any]
- workload_
id str
- available
Percentage Number - selector Map<Any>
- 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.