import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an Alert Management Prometheus Rule Group. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleActionGroup = new azure.monitoring.ActionGroup("example", { * name: "example-mag", * resourceGroupName: example.name, * shortName: "testag", * }); * const exampleWorkspace = new azure.monitoring.Workspace("example", { * name: "example-amw", * resourceGroupName: example.name, * location: example.location, * }); * const exampleKubernetesCluster = new azure.containerservice.KubernetesCluster("example", { * name: "example-cluster", * location: example.location, * resourceGroupName: example.name, * dnsPrefix: "example-aks", * defaultNodePool: { * name: "default", * nodeCount: 1, * vmSize: "Standard_DS2_v2", * hostEncryptionEnabled: true, * }, * identity: { * type: "SystemAssigned", * }, * }); * const exampleAlertPrometheusRuleGroup = new azure.monitoring.AlertPrometheusRuleGroup("example", { * name: "example-amprg", * location: "West Europe", * resourceGroupName: example.name, * clusterName: exampleKubernetesCluster.name, * description: "This is the description of the following rule group", * ruleGroupEnabled: false, * interval: "PT1M", * scopes: [exampleWorkspace.id], * rules: [ * { * enabled: false, * expression: "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\\\"billing-processing\\\"}[5m])) by (job_type))\n", * record: "job_type:billing_jobs_duration_seconds:99p5m", * labels: { * team: "prod", * }, * }, * { * alert: "Billing_Processing_Very_Slow", * enabled: true, * expression: "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\\\"billing-processing\\\"}[5m])) by (job_type))\n", * "for": "PT5M", * severity: 2, * actions: [{ * actionGroupId: exampleActionGroup.id, * }], * alertResolution: { * autoResolved: true, * timeToResolve: "PT10M", * }, * annotations: { * annotationName: "annotationValue", * }, * labels: { * team: "prod", * }, * }, * ], * tags: { * key: "value", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.AlertsManagement` - 2023-03-01 * * ## Import * * Alert Management Prometheus Rule Group can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:monitoring/alertPrometheusRuleGroup:AlertPrometheusRuleGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AlertsManagement/prometheusRuleGroups/ruleGroup1 * ``` */ export declare class AlertPrometheusRuleGroup extends pulumi.CustomResource { /** * Get an existing AlertPrometheusRuleGroup resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AlertPrometheusRuleGroupState, opts?: pulumi.CustomResourceOptions): AlertPrometheusRuleGroup; /** * Returns true if the given object is an instance of AlertPrometheusRuleGroup. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AlertPrometheusRuleGroup; /** * Specifies the name of the Managed Kubernetes Cluster. */ readonly clusterName: pulumi.Output; /** * The description of the Alert Management Prometheus Rule Group. */ readonly description: pulumi.Output; /** * Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. */ readonly interval: pulumi.Output; /** * Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. */ readonly ruleGroupEnabled: pulumi.Output; /** * One or more `rule` blocks as defined below. */ readonly rules: pulumi.Output; /** * Specifies the resource ID of the Azure Monitor Workspace. */ readonly scopes: pulumi.Output; /** * A mapping of tags to assign to the Alert Management Prometheus Rule Group. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a AlertPrometheusRuleGroup resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AlertPrometheusRuleGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AlertPrometheusRuleGroup resources. */ export interface AlertPrometheusRuleGroupState { /** * Specifies the name of the Managed Kubernetes Cluster. */ clusterName?: pulumi.Input; /** * The description of the Alert Management Prometheus Rule Group. */ description?: pulumi.Input; /** * Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. */ interval?: pulumi.Input; /** * Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. */ ruleGroupEnabled?: pulumi.Input; /** * One or more `rule` blocks as defined below. */ rules?: pulumi.Input[]>; /** * Specifies the resource ID of the Azure Monitor Workspace. */ scopes?: pulumi.Input[]>; /** * A mapping of tags to assign to the Alert Management Prometheus Rule Group. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a AlertPrometheusRuleGroup resource. */ export interface AlertPrometheusRuleGroupArgs { /** * Specifies the name of the Managed Kubernetes Cluster. */ clusterName?: pulumi.Input; /** * The description of the Alert Management Prometheus Rule Group. */ description?: pulumi.Input; /** * Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. */ interval?: pulumi.Input; /** * Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. */ ruleGroupEnabled?: pulumi.Input; /** * One or more `rule` blocks as defined below. */ rules: pulumi.Input[]>; /** * Specifies the resource ID of the Azure Monitor Workspace. */ scopes: pulumi.Input[]>; /** * A mapping of tags to assign to the Alert Management Prometheus Rule Group. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }