1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. arms
  5. PrometheusAlertRule
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

alicloud.arms.PrometheusAlertRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

    Provides a Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule resource.

    For information about Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule and how to use it, see What is Prometheus Alert Rule.

    NOTE: Available since v1.136.0.

    Create PrometheusAlertRule Resource

    new PrometheusAlertRule(name: string, args: PrometheusAlertRuleArgs, opts?: CustomResourceOptions);
    @overload
    def PrometheusAlertRule(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            annotations: Optional[Sequence[PrometheusAlertRuleAnnotationArgs]] = None,
                            cluster_id: Optional[str] = None,
                            dispatch_rule_id: Optional[str] = None,
                            duration: Optional[str] = None,
                            expression: Optional[str] = None,
                            labels: Optional[Sequence[PrometheusAlertRuleLabelArgs]] = None,
                            message: Optional[str] = None,
                            notify_type: Optional[str] = None,
                            prometheus_alert_rule_name: Optional[str] = None,
                            type: Optional[str] = None)
    @overload
    def PrometheusAlertRule(resource_name: str,
                            args: PrometheusAlertRuleArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewPrometheusAlertRule(ctx *Context, name string, args PrometheusAlertRuleArgs, opts ...ResourceOption) (*PrometheusAlertRule, error)
    public PrometheusAlertRule(string name, PrometheusAlertRuleArgs args, CustomResourceOptions? opts = null)
    public PrometheusAlertRule(String name, PrometheusAlertRuleArgs args)
    public PrometheusAlertRule(String name, PrometheusAlertRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:arms:PrometheusAlertRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args PrometheusAlertRuleArgs
    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 PrometheusAlertRuleArgs
    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 PrometheusAlertRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrometheusAlertRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrometheusAlertRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    PrometheusAlertRule 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 PrometheusAlertRule resource accepts the following input properties:

    ClusterId string

    The ID of the cluster.

    Duration string

    The duration of the alert.

    Expression string

    The alert rule expression that follows the PromQL syntax.

    Message string

    The message of the alert notification.

    PrometheusAlertRuleName string

    The name of the resource.

    Annotations List<Pulumi.AliCloud.Arms.Inputs.PrometheusAlertRuleAnnotation>

    The annotations of the alert rule. See annotations below.

    DispatchRuleId string

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    Labels List<Pulumi.AliCloud.Arms.Inputs.PrometheusAlertRuleLabel>

    The labels of the resource. See labels below.

    NotifyType string

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    Type string

    The type of the alert rule.

    ClusterId string

    The ID of the cluster.

    Duration string

    The duration of the alert.

    Expression string

    The alert rule expression that follows the PromQL syntax.

    Message string

    The message of the alert notification.

    PrometheusAlertRuleName string

    The name of the resource.

    Annotations []PrometheusAlertRuleAnnotationArgs

    The annotations of the alert rule. See annotations below.

    DispatchRuleId string

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    Labels []PrometheusAlertRuleLabelArgs

    The labels of the resource. See labels below.

    NotifyType string

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    Type string

    The type of the alert rule.

    clusterId String

    The ID of the cluster.

    duration String

    The duration of the alert.

    expression String

    The alert rule expression that follows the PromQL syntax.

    message String

    The message of the alert notification.

    prometheusAlertRuleName String

    The name of the resource.

    annotations List<PrometheusAlertRuleAnnotation>

    The annotations of the alert rule. See annotations below.

    dispatchRuleId String

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    labels List<PrometheusAlertRuleLabel>

    The labels of the resource. See labels below.

    notifyType String

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    type String

    The type of the alert rule.

    clusterId string

    The ID of the cluster.

    duration string

    The duration of the alert.

    expression string

    The alert rule expression that follows the PromQL syntax.

    message string

    The message of the alert notification.

    prometheusAlertRuleName string

    The name of the resource.

    annotations PrometheusAlertRuleAnnotation[]

    The annotations of the alert rule. See annotations below.

    dispatchRuleId string

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    labels PrometheusAlertRuleLabel[]

    The labels of the resource. See labels below.

    notifyType string

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    type string

    The type of the alert rule.

    cluster_id str

    The ID of the cluster.

    duration str

    The duration of the alert.

    expression str

    The alert rule expression that follows the PromQL syntax.

    message str

    The message of the alert notification.

    prometheus_alert_rule_name str

    The name of the resource.

    annotations Sequence[PrometheusAlertRuleAnnotationArgs]

    The annotations of the alert rule. See annotations below.

    dispatch_rule_id str

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    labels Sequence[PrometheusAlertRuleLabelArgs]

    The labels of the resource. See labels below.

    notify_type str

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    type str

    The type of the alert rule.

    clusterId String

    The ID of the cluster.

    duration String

    The duration of the alert.

    expression String

    The alert rule expression that follows the PromQL syntax.

    message String

    The message of the alert notification.

    prometheusAlertRuleName String

    The name of the resource.

    annotations List<Property Map>

    The annotations of the alert rule. See annotations below.

    dispatchRuleId String

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    labels List<Property Map>

    The labels of the resource. See labels below.

    notifyType String

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    type String

    The type of the alert rule.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    PrometheusAlertRuleId int

    The first ID of the resource.

    Status int

    The status of the resource. Valid values: 0, 1.

    Id string

    The provider-assigned unique ID for this managed resource.

    PrometheusAlertRuleId int

    The first ID of the resource.

    Status int

    The status of the resource. Valid values: 0, 1.

    id String

    The provider-assigned unique ID for this managed resource.

    prometheusAlertRuleId Integer

    The first ID of the resource.

    status Integer

    The status of the resource. Valid values: 0, 1.

    id string

    The provider-assigned unique ID for this managed resource.

    prometheusAlertRuleId number

    The first ID of the resource.

    status number

    The status of the resource. Valid values: 0, 1.

    id str

    The provider-assigned unique ID for this managed resource.

    prometheus_alert_rule_id int

    The first ID of the resource.

    status int

    The status of the resource. Valid values: 0, 1.

    id String

    The provider-assigned unique ID for this managed resource.

    prometheusAlertRuleId Number

    The first ID of the resource.

    status Number

    The status of the resource. Valid values: 0, 1.

    Look up Existing PrometheusAlertRule Resource

    Get an existing PrometheusAlertRule 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?: PrometheusAlertRuleState, opts?: CustomResourceOptions): PrometheusAlertRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            annotations: Optional[Sequence[PrometheusAlertRuleAnnotationArgs]] = None,
            cluster_id: Optional[str] = None,
            dispatch_rule_id: Optional[str] = None,
            duration: Optional[str] = None,
            expression: Optional[str] = None,
            labels: Optional[Sequence[PrometheusAlertRuleLabelArgs]] = None,
            message: Optional[str] = None,
            notify_type: Optional[str] = None,
            prometheus_alert_rule_id: Optional[int] = None,
            prometheus_alert_rule_name: Optional[str] = None,
            status: Optional[int] = None,
            type: Optional[str] = None) -> PrometheusAlertRule
    func GetPrometheusAlertRule(ctx *Context, name string, id IDInput, state *PrometheusAlertRuleState, opts ...ResourceOption) (*PrometheusAlertRule, error)
    public static PrometheusAlertRule Get(string name, Input<string> id, PrometheusAlertRuleState? state, CustomResourceOptions? opts = null)
    public static PrometheusAlertRule get(String name, Output<String> id, PrometheusAlertRuleState 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 List<Pulumi.AliCloud.Arms.Inputs.PrometheusAlertRuleAnnotation>

    The annotations of the alert rule. See annotations below.

    ClusterId string

    The ID of the cluster.

    DispatchRuleId string

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    Duration string

    The duration of the alert.

    Expression string

    The alert rule expression that follows the PromQL syntax.

    Labels List<Pulumi.AliCloud.Arms.Inputs.PrometheusAlertRuleLabel>

    The labels of the resource. See labels below.

    Message string

    The message of the alert notification.

    NotifyType string

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    PrometheusAlertRuleId int

    The first ID of the resource.

    PrometheusAlertRuleName string

    The name of the resource.

    Status int

    The status of the resource. Valid values: 0, 1.

    Type string

    The type of the alert rule.

    Annotations []PrometheusAlertRuleAnnotationArgs

    The annotations of the alert rule. See annotations below.

    ClusterId string

    The ID of the cluster.

    DispatchRuleId string

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    Duration string

    The duration of the alert.

    Expression string

    The alert rule expression that follows the PromQL syntax.

    Labels []PrometheusAlertRuleLabelArgs

    The labels of the resource. See labels below.

    Message string

    The message of the alert notification.

    NotifyType string

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    PrometheusAlertRuleId int

    The first ID of the resource.

    PrometheusAlertRuleName string

    The name of the resource.

    Status int

    The status of the resource. Valid values: 0, 1.

    Type string

    The type of the alert rule.

    annotations List<PrometheusAlertRuleAnnotation>

    The annotations of the alert rule. See annotations below.

    clusterId String

    The ID of the cluster.

    dispatchRuleId String

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    duration String

    The duration of the alert.

    expression String

    The alert rule expression that follows the PromQL syntax.

    labels List<PrometheusAlertRuleLabel>

    The labels of the resource. See labels below.

    message String

    The message of the alert notification.

    notifyType String

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    prometheusAlertRuleId Integer

    The first ID of the resource.

    prometheusAlertRuleName String

    The name of the resource.

    status Integer

    The status of the resource. Valid values: 0, 1.

    type String

    The type of the alert rule.

    annotations PrometheusAlertRuleAnnotation[]

    The annotations of the alert rule. See annotations below.

    clusterId string

    The ID of the cluster.

    dispatchRuleId string

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    duration string

    The duration of the alert.

    expression string

    The alert rule expression that follows the PromQL syntax.

    labels PrometheusAlertRuleLabel[]

    The labels of the resource. See labels below.

    message string

    The message of the alert notification.

    notifyType string

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    prometheusAlertRuleId number

    The first ID of the resource.

    prometheusAlertRuleName string

    The name of the resource.

    status number

    The status of the resource. Valid values: 0, 1.

    type string

    The type of the alert rule.

    annotations Sequence[PrometheusAlertRuleAnnotationArgs]

    The annotations of the alert rule. See annotations below.

    cluster_id str

    The ID of the cluster.

    dispatch_rule_id str

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    duration str

    The duration of the alert.

    expression str

    The alert rule expression that follows the PromQL syntax.

    labels Sequence[PrometheusAlertRuleLabelArgs]

    The labels of the resource. See labels below.

    message str

    The message of the alert notification.

    notify_type str

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    prometheus_alert_rule_id int

    The first ID of the resource.

    prometheus_alert_rule_name str

    The name of the resource.

    status int

    The status of the resource. Valid values: 0, 1.

    type str

    The type of the alert rule.

    annotations List<Property Map>

    The annotations of the alert rule. See annotations below.

    clusterId String

    The ID of the cluster.

    dispatchRuleId String

    The ID of the notification policy. This parameter is required when the notify_type parameter is set to DISPATCH_RULE.

    duration String

    The duration of the alert.

    expression String

    The alert rule expression that follows the PromQL syntax.

    labels List<Property Map>

    The labels of the resource. See labels below.

    message String

    The message of the alert notification.

    notifyType String

    The method of sending the alert notification. Valid values: ALERT_MANAGER, DISPATCH_RULE.

    prometheusAlertRuleId Number

    The first ID of the resource.

    prometheusAlertRuleName String

    The name of the resource.

    status Number

    The status of the resource. Valid values: 0, 1.

    type String

    The type of the alert rule.

    Supporting Types

    PrometheusAlertRuleAnnotation, PrometheusAlertRuleAnnotationArgs

    Name string

    The name of the annotation.

    Value string

    The value of the annotation.

    Name string

    The name of the annotation.

    Value string

    The value of the annotation.

    name String

    The name of the annotation.

    value String

    The value of the annotation.

    name string

    The name of the annotation.

    value string

    The value of the annotation.

    name str

    The name of the annotation.

    value str

    The value of the annotation.

    name String

    The name of the annotation.

    value String

    The value of the annotation.

    PrometheusAlertRuleLabel, PrometheusAlertRuleLabelArgs

    Name string

    The name of the label.

    Value string

    The value of the label.

    Name string

    The name of the label.

    Value string

    The value of the label.

    name String

    The name of the label.

    value String

    The value of the label.

    name string

    The name of the label.

    value string

    The value of the label.

    name str

    The name of the label.

    value str

    The value of the label.

    name String

    The name of the label.

    value String

    The value of the label.

    Import

    Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule can be imported using the id, e.g.

     $ pulumi import alicloud:arms/prometheusAlertRule:PrometheusAlertRule example <cluster_id>:<prometheus_alert_rule_id>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi