1. Packages
  2. Scaleway
  3. API Docs
  4. observability
  5. getPreconfiguredAlert
Scaleway v1.43.0 published on Friday, Feb 6, 2026 by pulumiverse
scaleway logo
Scaleway v1.43.0 published on Friday, Feb 6, 2026 by pulumiverse

    Gets information about preconfigured alert rules available in Scaleway Cockpit.

    Preconfigured alerts are ready-to-use alert rules that monitor common metrics for Scaleway services. You can enable these alerts in your Alert Manager using the scaleway.observability.AlertManager resource.

    For more information, refer to Cockpit’s product documentation and API documentation.

    Example Usage

    Basic usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = scaleway.observability.getPreconfiguredAlert({
        projectId: project.id,
    });
    export const availableAlerts = main.then(main => main.alerts);
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    main = scaleway.observability.get_preconfigured_alert(project_id=project["id"])
    pulumi.export("availableAlerts", main.alerts)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/observability"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := observability.GetPreconfiguredAlert(ctx, &observability.GetPreconfiguredAlertArgs{
    			ProjectId: pulumi.StringRef(project.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("availableAlerts", main.Alerts)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = Scaleway.Observability.GetPreconfiguredAlert.Invoke(new()
        {
            ProjectId = project.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["availableAlerts"] = main.Apply(getPreconfiguredAlertResult => getPreconfiguredAlertResult.Alerts),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.observability.ObservabilityFunctions;
    import com.pulumi.scaleway.observability.inputs.GetPreconfiguredAlertArgs;
    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) {
            final var main = ObservabilityFunctions.getPreconfiguredAlert(GetPreconfiguredAlertArgs.builder()
                .projectId(project.id())
                .build());
    
            ctx.export("availableAlerts", main.alerts());
        }
    }
    
    variables:
      main:
        fn::invoke:
          function: scaleway:observability:getPreconfiguredAlert
          arguments:
            projectId: ${project.id}
    outputs:
      availableAlerts: ${main.alerts}
    

    Filter by status

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const enabled = scaleway.observability.getPreconfiguredAlert({
        projectId: project.id,
        ruleStatus: "enabled",
    });
    const disabled = scaleway.observability.getPreconfiguredAlert({
        projectId: project.id,
        ruleStatus: "disabled",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    enabled = scaleway.observability.get_preconfigured_alert(project_id=project["id"],
        rule_status="enabled")
    disabled = scaleway.observability.get_preconfigured_alert(project_id=project["id"],
        rule_status="disabled")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/observability"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := observability.GetPreconfiguredAlert(ctx, &observability.GetPreconfiguredAlertArgs{
    			ProjectId:  pulumi.StringRef(project.Id),
    			RuleStatus: pulumi.StringRef("enabled"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = observability.GetPreconfiguredAlert(ctx, &observability.GetPreconfiguredAlertArgs{
    			ProjectId:  pulumi.StringRef(project.Id),
    			RuleStatus: pulumi.StringRef("disabled"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var enabled = Scaleway.Observability.GetPreconfiguredAlert.Invoke(new()
        {
            ProjectId = project.Id,
            RuleStatus = "enabled",
        });
    
        var disabled = Scaleway.Observability.GetPreconfiguredAlert.Invoke(new()
        {
            ProjectId = project.Id,
            RuleStatus = "disabled",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.observability.ObservabilityFunctions;
    import com.pulumi.scaleway.observability.inputs.GetPreconfiguredAlertArgs;
    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) {
            final var enabled = ObservabilityFunctions.getPreconfiguredAlert(GetPreconfiguredAlertArgs.builder()
                .projectId(project.id())
                .ruleStatus("enabled")
                .build());
    
            final var disabled = ObservabilityFunctions.getPreconfiguredAlert(GetPreconfiguredAlertArgs.builder()
                .projectId(project.id())
                .ruleStatus("disabled")
                .build());
    
        }
    }
    
    variables:
      enabled:
        fn::invoke:
          function: scaleway:observability:getPreconfiguredAlert
          arguments:
            projectId: ${project.id}
            ruleStatus: enabled
      disabled:
        fn::invoke:
          function: scaleway:observability:getPreconfiguredAlert
          arguments:
            projectId: ${project.id}
            ruleStatus: disabled
    

    Use with Alert Manager

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const project = new scaleway.account.Project("project", {name: "my-observability-project"});
    const main = new scaleway.observability.Cockpit("main", {projectId: project.id});
    const all = scaleway.observability.getPreconfiguredAlertOutput({
        projectId: main.projectId,
    });
    const mainAlertManager = new scaleway.observability.AlertManager("main", {
        projectId: main.projectId,
        preconfiguredAlertIds: all.apply(all => .filter(alert => alert.productName == "instance" && alert.ruleStatus == "disabled").map(alert => (alert.preconfiguredRuleId))),
        contactPoints: [{
            email: "alerts@example.com",
        }],
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    project = scaleway.account.Project("project", name="my-observability-project")
    main = scaleway.observability.Cockpit("main", project_id=project.id)
    all = scaleway.observability.get_preconfigured_alert_output(project_id=main.project_id)
    main_alert_manager = scaleway.observability.AlertManager("main",
        project_id=main.project_id,
        preconfigured_alert_ids=all.apply(lambda all: [alert.preconfigured_rule_id for alert in all.alerts if alert.product_name == "instance" and alert.rule_status == "disabled"]),
        contact_points=[{
            "email": "alerts@example.com",
        }])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var project = new Scaleway.Account.Project("project", new()
        {
            Name = "my-observability-project",
        });
    
        var main = new Scaleway.Observability.Cockpit("main", new()
        {
            ProjectId = project.Id,
        });
    
        var all = Scaleway.Observability.GetPreconfiguredAlert.Invoke(new()
        {
            ProjectId = main.ProjectId,
        });
    
        var mainAlertManager = new Scaleway.Observability.AlertManager("main", new()
        {
            ProjectId = main.ProjectId,
            PreconfiguredAlertIds = .Where(alert => alert.ProductName == "instance" && alert.RuleStatus == "disabled").Select(alert => 
            {
                return alert.PreconfiguredRuleId;
            }).ToList(),
            ContactPoints = new[]
            {
                new Scaleway.Observability.Inputs.AlertManagerContactPointArgs
                {
                    Email = "alerts@example.com",
                },
            },
        });
    
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Using getPreconfiguredAlert

    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 getPreconfiguredAlert(args: GetPreconfiguredAlertArgs, opts?: InvokeOptions): Promise<GetPreconfiguredAlertResult>
    function getPreconfiguredAlertOutput(args: GetPreconfiguredAlertOutputArgs, opts?: InvokeOptions): Output<GetPreconfiguredAlertResult>
    def get_preconfigured_alert(data_source_id: Optional[str] = None,
                                project_id: Optional[str] = None,
                                region: Optional[str] = None,
                                rule_status: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetPreconfiguredAlertResult
    def get_preconfigured_alert_output(data_source_id: Optional[pulumi.Input[str]] = None,
                                project_id: Optional[pulumi.Input[str]] = None,
                                region: Optional[pulumi.Input[str]] = None,
                                rule_status: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetPreconfiguredAlertResult]
    func GetPreconfiguredAlert(ctx *Context, args *GetPreconfiguredAlertArgs, opts ...InvokeOption) (*GetPreconfiguredAlertResult, error)
    func GetPreconfiguredAlertOutput(ctx *Context, args *GetPreconfiguredAlertOutputArgs, opts ...InvokeOption) GetPreconfiguredAlertResultOutput

    > Note: This function is named GetPreconfiguredAlert in the Go SDK.

    public static class GetPreconfiguredAlert 
    {
        public static Task<GetPreconfiguredAlertResult> InvokeAsync(GetPreconfiguredAlertArgs args, InvokeOptions? opts = null)
        public static Output<GetPreconfiguredAlertResult> Invoke(GetPreconfiguredAlertInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPreconfiguredAlertResult> getPreconfiguredAlert(GetPreconfiguredAlertArgs args, InvokeOptions options)
    public static Output<GetPreconfiguredAlertResult> getPreconfiguredAlert(GetPreconfiguredAlertArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:observability/getPreconfiguredAlert:getPreconfiguredAlert
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DataSourceId string
    Filter alerts by data source ID.
    ProjectId string
    The ID of the project the alerts are associated with. If not provided, the default project configured in the provider is used.
    Region string
    The region in which the alerts exist.
    RuleStatus string
    Filter alerts by rule status. Valid values are enabled or disabled.
    DataSourceId string
    Filter alerts by data source ID.
    ProjectId string
    The ID of the project the alerts are associated with. If not provided, the default project configured in the provider is used.
    Region string
    The region in which the alerts exist.
    RuleStatus string
    Filter alerts by rule status. Valid values are enabled or disabled.
    dataSourceId String
    Filter alerts by data source ID.
    projectId String
    The ID of the project the alerts are associated with. If not provided, the default project configured in the provider is used.
    region String
    The region in which the alerts exist.
    ruleStatus String
    Filter alerts by rule status. Valid values are enabled or disabled.
    dataSourceId string
    Filter alerts by data source ID.
    projectId string
    The ID of the project the alerts are associated with. If not provided, the default project configured in the provider is used.
    region string
    The region in which the alerts exist.
    ruleStatus string
    Filter alerts by rule status. Valid values are enabled or disabled.
    data_source_id str
    Filter alerts by data source ID.
    project_id str
    The ID of the project the alerts are associated with. If not provided, the default project configured in the provider is used.
    region str
    The region in which the alerts exist.
    rule_status str
    Filter alerts by rule status. Valid values are enabled or disabled.
    dataSourceId String
    Filter alerts by data source ID.
    projectId String
    The ID of the project the alerts are associated with. If not provided, the default project configured in the provider is used.
    region String
    The region in which the alerts exist.
    ruleStatus String
    Filter alerts by rule status. Valid values are enabled or disabled.

    getPreconfiguredAlert Result

    The following output properties are available:

    Alerts List<Pulumiverse.Scaleway.Observability.Outputs.GetPreconfiguredAlertAlert>
    List of preconfigured alerts. Each alert contains:
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    DataSourceId string
    ID of the data source containing the alert rule.
    Region string
    RuleStatus string
    Status of the alert rule (enabled, disabled, enabling, disabling).
    Alerts []GetPreconfiguredAlertAlert
    List of preconfigured alerts. Each alert contains:
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    DataSourceId string
    ID of the data source containing the alert rule.
    Region string
    RuleStatus string
    Status of the alert rule (enabled, disabled, enabling, disabling).
    alerts List<GetPreconfiguredAlertAlert>
    List of preconfigured alerts. Each alert contains:
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    dataSourceId String
    ID of the data source containing the alert rule.
    region String
    ruleStatus String
    Status of the alert rule (enabled, disabled, enabling, disabling).
    alerts GetPreconfiguredAlertAlert[]
    List of preconfigured alerts. Each alert contains:
    id string
    The provider-assigned unique ID for this managed resource.
    projectId string
    dataSourceId string
    ID of the data source containing the alert rule.
    region string
    ruleStatus string
    Status of the alert rule (enabled, disabled, enabling, disabling).
    alerts Sequence[GetPreconfiguredAlertAlert]
    List of preconfigured alerts. Each alert contains:
    id str
    The provider-assigned unique ID for this managed resource.
    project_id str
    data_source_id str
    ID of the data source containing the alert rule.
    region str
    rule_status str
    Status of the alert rule (enabled, disabled, enabling, disabling).
    alerts List<Property Map>
    List of preconfigured alerts. Each alert contains:
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    dataSourceId String
    ID of the data source containing the alert rule.
    region String
    ruleStatus String
    Status of the alert rule (enabled, disabled, enabling, disabling).

    Supporting Types

    GetPreconfiguredAlertAlert

    Annotations Dictionary<string, string>
    Map of annotations attached to the alert.
    DataSourceId string
    Filter alerts by data source ID.
    DisplayDescription string
    Human-readable description of the alert.
    DisplayName string
    Human-readable name of the alert.
    Duration string
    Duration for which the condition must be true before the alert fires (e.g., "5m").
    Name string
    Name of the alert rule.
    PreconfiguredRuleId string
    Unique identifier of the preconfigured rule. Use this ID in scaleway.observability.AlertManager resource.
    ProductFamily string
    Family of the product (e.g., "compute", "storage", "network").
    ProductName string
    Scaleway product associated with the alert (e.g., "instance", "rdb", "kubernetes").
    Rule string
    PromQL expression defining the alert condition.
    RuleStatus string
    Filter alerts by rule status. Valid values are enabled or disabled.
    State string
    Current state of the alert (inactive, pending, firing).
    Annotations map[string]string
    Map of annotations attached to the alert.
    DataSourceId string
    Filter alerts by data source ID.
    DisplayDescription string
    Human-readable description of the alert.
    DisplayName string
    Human-readable name of the alert.
    Duration string
    Duration for which the condition must be true before the alert fires (e.g., "5m").
    Name string
    Name of the alert rule.
    PreconfiguredRuleId string
    Unique identifier of the preconfigured rule. Use this ID in scaleway.observability.AlertManager resource.
    ProductFamily string
    Family of the product (e.g., "compute", "storage", "network").
    ProductName string
    Scaleway product associated with the alert (e.g., "instance", "rdb", "kubernetes").
    Rule string
    PromQL expression defining the alert condition.
    RuleStatus string
    Filter alerts by rule status. Valid values are enabled or disabled.
    State string
    Current state of the alert (inactive, pending, firing).
    annotations Map<String,String>
    Map of annotations attached to the alert.
    dataSourceId String
    Filter alerts by data source ID.
    displayDescription String
    Human-readable description of the alert.
    displayName String
    Human-readable name of the alert.
    duration String
    Duration for which the condition must be true before the alert fires (e.g., "5m").
    name String
    Name of the alert rule.
    preconfiguredRuleId String
    Unique identifier of the preconfigured rule. Use this ID in scaleway.observability.AlertManager resource.
    productFamily String
    Family of the product (e.g., "compute", "storage", "network").
    productName String
    Scaleway product associated with the alert (e.g., "instance", "rdb", "kubernetes").
    rule String
    PromQL expression defining the alert condition.
    ruleStatus String
    Filter alerts by rule status. Valid values are enabled or disabled.
    state String
    Current state of the alert (inactive, pending, firing).
    annotations {[key: string]: string}
    Map of annotations attached to the alert.
    dataSourceId string
    Filter alerts by data source ID.
    displayDescription string
    Human-readable description of the alert.
    displayName string
    Human-readable name of the alert.
    duration string
    Duration for which the condition must be true before the alert fires (e.g., "5m").
    name string
    Name of the alert rule.
    preconfiguredRuleId string
    Unique identifier of the preconfigured rule. Use this ID in scaleway.observability.AlertManager resource.
    productFamily string
    Family of the product (e.g., "compute", "storage", "network").
    productName string
    Scaleway product associated with the alert (e.g., "instance", "rdb", "kubernetes").
    rule string
    PromQL expression defining the alert condition.
    ruleStatus string
    Filter alerts by rule status. Valid values are enabled or disabled.
    state string
    Current state of the alert (inactive, pending, firing).
    annotations Mapping[str, str]
    Map of annotations attached to the alert.
    data_source_id str
    Filter alerts by data source ID.
    display_description str
    Human-readable description of the alert.
    display_name str
    Human-readable name of the alert.
    duration str
    Duration for which the condition must be true before the alert fires (e.g., "5m").
    name str
    Name of the alert rule.
    preconfigured_rule_id str
    Unique identifier of the preconfigured rule. Use this ID in scaleway.observability.AlertManager resource.
    product_family str
    Family of the product (e.g., "compute", "storage", "network").
    product_name str
    Scaleway product associated with the alert (e.g., "instance", "rdb", "kubernetes").
    rule str
    PromQL expression defining the alert condition.
    rule_status str
    Filter alerts by rule status. Valid values are enabled or disabled.
    state str
    Current state of the alert (inactive, pending, firing).
    annotations Map<String>
    Map of annotations attached to the alert.
    dataSourceId String
    Filter alerts by data source ID.
    displayDescription String
    Human-readable description of the alert.
    displayName String
    Human-readable name of the alert.
    duration String
    Duration for which the condition must be true before the alert fires (e.g., "5m").
    name String
    Name of the alert rule.
    preconfiguredRuleId String
    Unique identifier of the preconfigured rule. Use this ID in scaleway.observability.AlertManager resource.
    productFamily String
    Family of the product (e.g., "compute", "storage", "network").
    productName String
    Scaleway product associated with the alert (e.g., "instance", "rdb", "kubernetes").
    rule String
    PromQL expression defining the alert condition.
    ruleStatus String
    Filter alerts by rule status. Valid values are enabled or disabled.
    state String
    Current state of the alert (inactive, pending, firing).

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.43.0 published on Friday, Feb 6, 2026 by pulumiverse
      Meet Neo: Your AI Platform Teammate