1. Packages
  2. Packages
  3. Scaleway
  4. API Docs
  5. billing
  6. BudgetAlert
Viewing docs for Scaleway v1.53.0
published on Friday, Jul 17, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.53.0
published on Friday, Jul 17, 2026 by pulumiverse

    Creates and manages Scaleway Budget Alerts.

    A Budget Alert triggers notifications when the spending threshold is reached.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.billing.Budget("main", {
        organizationId: "11111111-1111-1111-1111-111111111111",
        consumptionLimit: 10000,
        enabled: true,
    });
    const mainBudgetAlert = new scaleway.billing.BudgetAlert("main", {
        budgetId: main.id,
        threshold: 80,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.billing.Budget("main",
        organization_id="11111111-1111-1111-1111-111111111111",
        consumption_limit=10000,
        enabled=True)
    main_budget_alert = scaleway.billing.BudgetAlert("main",
        budget_id=main.id,
        threshold=80)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/billing"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := billing.NewBudget(ctx, "main", &billing.BudgetArgs{
    			OrganizationId:   pulumi.String("11111111-1111-1111-1111-111111111111"),
    			ConsumptionLimit: pulumi.Int(10000),
    			Enabled:          pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = billing.NewBudgetAlert(ctx, "main", &billing.BudgetAlertArgs{
    			BudgetId:  main.ID(),
    			Threshold: pulumi.Int(80),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.Billing.Budget("main", new()
        {
            OrganizationId = "11111111-1111-1111-1111-111111111111",
            ConsumptionLimit = 10000,
            Enabled = true,
        });
    
        var mainBudgetAlert = new Scaleway.Billing.BudgetAlert("main", new()
        {
            BudgetId = main.Id,
            Threshold = 80,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.billing.Budget;
    import com.pulumi.scaleway.billing.BudgetArgs;
    import com.pulumi.scaleway.billing.BudgetAlert;
    import com.pulumi.scaleway.billing.BudgetAlertArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            var main = new Budget("main", BudgetArgs.builder()
                .organizationId("11111111-1111-1111-1111-111111111111")
                .consumptionLimit(10000)
                .enabled(true)
                .build());
    
            var mainBudgetAlert = new BudgetAlert("mainBudgetAlert", BudgetAlertArgs.builder()
                .budgetId(main.id())
                .threshold(80)
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:billing:Budget
        properties:
          organizationId: 11111111-1111-1111-1111-111111111111
          consumptionLimit: 10000
          enabled: true
      mainBudgetAlert:
        type: scaleway:billing:BudgetAlert
        name: main
        properties:
          budgetId: ${main.id}
          threshold: 80
    
    Example coming soon!
    

    Create BudgetAlert Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BudgetAlert(name: string, args: BudgetAlertArgs, opts?: CustomResourceOptions);
    @overload
    def BudgetAlert(resource_name: str,
                    args: BudgetAlertArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def BudgetAlert(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    budget_id: Optional[str] = None,
                    threshold: Optional[int] = None)
    func NewBudgetAlert(ctx *Context, name string, args BudgetAlertArgs, opts ...ResourceOption) (*BudgetAlert, error)
    public BudgetAlert(string name, BudgetAlertArgs args, CustomResourceOptions? opts = null)
    public BudgetAlert(String name, BudgetAlertArgs args)
    public BudgetAlert(String name, BudgetAlertArgs args, CustomResourceOptions options)
    
    type: scaleway:billing:BudgetAlert
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "scaleway_billing_budget_alert" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args BudgetAlertArgs
    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 BudgetAlertArgs
    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 BudgetAlertArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BudgetAlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BudgetAlertArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var budgetAlertResource = new Scaleway.Billing.BudgetAlert("budgetAlertResource", new()
    {
        BudgetId = "string",
        Threshold = 0,
    });
    
    example, err := billing.NewBudgetAlert(ctx, "budgetAlertResource", &billing.BudgetAlertArgs{
    	BudgetId:  pulumi.String("string"),
    	Threshold: pulumi.Int(0),
    })
    
    resource "scaleway_billing_budget_alert" "budgetAlertResource" {
      lifecycle {
        create_before_destroy = true
      }
      budget_id = "string"
      threshold = 0
    }
    
    var budgetAlertResource = new BudgetAlert("budgetAlertResource", BudgetAlertArgs.builder()
        .budgetId("string")
        .threshold(0)
        .build());
    
    budget_alert_resource = scaleway.billing.BudgetAlert("budgetAlertResource",
        budget_id="string",
        threshold=0)
    
    const budgetAlertResource = new scaleway.billing.BudgetAlert("budgetAlertResource", {
        budgetId: "string",
        threshold: 0,
    });
    
    type: scaleway:billing:BudgetAlert
    properties:
        budgetId: string
        threshold: 0
    

    BudgetAlert Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BudgetAlert resource accepts the following input properties:

    BudgetId string
    The ID of the budget to create alert for.
    Threshold int
    Threshold percentage above which the alert is sent (0-100).
    BudgetId string
    The ID of the budget to create alert for.
    Threshold int
    Threshold percentage above which the alert is sent (0-100).
    budget_id string
    The ID of the budget to create alert for.
    threshold number
    Threshold percentage above which the alert is sent (0-100).
    budgetId String
    The ID of the budget to create alert for.
    threshold Integer
    Threshold percentage above which the alert is sent (0-100).
    budgetId string
    The ID of the budget to create alert for.
    threshold number
    Threshold percentage above which the alert is sent (0-100).
    budget_id str
    The ID of the budget to create alert for.
    threshold int
    Threshold percentage above which the alert is sent (0-100).
    budgetId String
    The ID of the budget to create alert for.
    threshold Number
    Threshold percentage above which the alert is sent (0-100).

    Outputs

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

    CreatedAt string
    The date and time of budget alert creation
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    The date and time when the budget alert was last updated
    CreatedAt string
    The date and time of budget alert creation
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    The date and time when the budget alert was last updated
    created_at string
    The date and time of budget alert creation
    id string
    The provider-assigned unique ID for this managed resource.
    updated_at string
    The date and time when the budget alert was last updated
    createdAt String
    The date and time of budget alert creation
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    The date and time when the budget alert was last updated
    createdAt string
    The date and time of budget alert creation
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    The date and time when the budget alert was last updated
    created_at str
    The date and time of budget alert creation
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    The date and time when the budget alert was last updated
    createdAt String
    The date and time of budget alert creation
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    The date and time when the budget alert was last updated

    Look up Existing BudgetAlert Resource

    Get an existing BudgetAlert 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?: BudgetAlertState, opts?: CustomResourceOptions): BudgetAlert
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            budget_id: Optional[str] = None,
            created_at: Optional[str] = None,
            threshold: Optional[int] = None,
            updated_at: Optional[str] = None) -> BudgetAlert
    func GetBudgetAlert(ctx *Context, name string, id IDInput, state *BudgetAlertState, opts ...ResourceOption) (*BudgetAlert, error)
    public static BudgetAlert Get(string name, Input<string> id, BudgetAlertState? state, CustomResourceOptions? opts = null)
    public static BudgetAlert get(String name, Output<String> id, BudgetAlertState state, CustomResourceOptions options)
    resources:  _:    type: scaleway:billing:BudgetAlert    get:      id: ${id}
    import {
      to = scaleway_billing_budget_alert.example
      id = "${id}"
    }
    
    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:
    BudgetId string
    The ID of the budget to create alert for.
    CreatedAt string
    The date and time of budget alert creation
    Threshold int
    Threshold percentage above which the alert is sent (0-100).
    UpdatedAt string
    The date and time when the budget alert was last updated
    BudgetId string
    The ID of the budget to create alert for.
    CreatedAt string
    The date and time of budget alert creation
    Threshold int
    Threshold percentage above which the alert is sent (0-100).
    UpdatedAt string
    The date and time when the budget alert was last updated
    budget_id string
    The ID of the budget to create alert for.
    created_at string
    The date and time of budget alert creation
    threshold number
    Threshold percentage above which the alert is sent (0-100).
    updated_at string
    The date and time when the budget alert was last updated
    budgetId String
    The ID of the budget to create alert for.
    createdAt String
    The date and time of budget alert creation
    threshold Integer
    Threshold percentage above which the alert is sent (0-100).
    updatedAt String
    The date and time when the budget alert was last updated
    budgetId string
    The ID of the budget to create alert for.
    createdAt string
    The date and time of budget alert creation
    threshold number
    Threshold percentage above which the alert is sent (0-100).
    updatedAt string
    The date and time when the budget alert was last updated
    budget_id str
    The ID of the budget to create alert for.
    created_at str
    The date and time of budget alert creation
    threshold int
    Threshold percentage above which the alert is sent (0-100).
    updated_at str
    The date and time when the budget alert was last updated
    budgetId String
    The ID of the budget to create alert for.
    createdAt String
    The date and time of budget alert creation
    threshold Number
    Threshold percentage above which the alert is sent (0-100).
    updatedAt String
    The date and time when the budget alert was last updated

    Import

    Budget Alert can be imported using the alert ID.

    $ pulumi import scaleway:billing/budgetAlert:BudgetAlert main 11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.53.0
    published on Friday, Jul 17, 2026 by pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial