1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. Alerting
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.Alerting

Explore with Pulumi AI

Creates an alert on a public cloud project.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";

const myAlert = new ovh.cloudproject.Alerting("myAlert", {
    delay: 3600,
    email: "aaa.bbb@domain.com",
    monthlyThreshold: 1000,
    serviceName: "XXX",
});
Copy
import pulumi
import pulumi_ovh as ovh

my_alert = ovh.cloud_project.Alerting("myAlert",
    delay=3600,
    email="aaa.bbb@domain.com",
    monthly_threshold=1000,
    service_name="XXX")
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudproject.NewAlerting(ctx, "myAlert", &cloudproject.AlertingArgs{
			Delay:            pulumi.Float64(3600),
			Email:            pulumi.String("aaa.bbb@domain.com"),
			MonthlyThreshold: pulumi.Float64(1000),
			ServiceName:      pulumi.String("XXX"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var myAlert = new Ovh.CloudProject.Alerting("myAlert", new()
    {
        Delay = 3600,
        Email = "aaa.bbb@domain.com",
        MonthlyThreshold = 1000,
        ServiceName = "XXX",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ovhcloud.pulumi.ovh.CloudProject.Alerting;
import com.ovhcloud.pulumi.ovh.CloudProject.AlertingArgs;
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) {
        var myAlert = new Alerting("myAlert", AlertingArgs.builder()
            .delay(3600.0)
            .email("aaa.bbb@domain.com")
            .monthlyThreshold(1000.0)
            .serviceName("XXX")
            .build());

    }
}
Copy
resources:
  myAlert:
    type: ovh:CloudProject:Alerting
    properties:
      delay: 3600
      email: aaa.bbb@domain.com
      monthlyThreshold: 1000
      serviceName: XXX
Copy

Create Alerting Resource

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

Constructor syntax

new Alerting(name: string, args: AlertingArgs, opts?: CustomResourceOptions);
@overload
def Alerting(resource_name: str,
             args: AlertingArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Alerting(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             delay: Optional[float] = None,
             email: Optional[str] = None,
             monthly_threshold: Optional[float] = None,
             service_name: Optional[str] = None)
func NewAlerting(ctx *Context, name string, args AlertingArgs, opts ...ResourceOption) (*Alerting, error)
public Alerting(string name, AlertingArgs args, CustomResourceOptions? opts = null)
public Alerting(String name, AlertingArgs args)
public Alerting(String name, AlertingArgs args, CustomResourceOptions options)
type: ovh:CloudProject:Alerting
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AlertingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AlertingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AlertingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AlertingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AlertingArgs
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 alertingResource = new Ovh.CloudProject.Alerting("alertingResource", new()
{
    Delay = 0,
    Email = "string",
    MonthlyThreshold = 0,
    ServiceName = "string",
});
Copy
example, err := CloudProject.NewAlerting(ctx, "alertingResource", &CloudProject.AlertingArgs{
	Delay:            pulumi.Float64(0),
	Email:            pulumi.String("string"),
	MonthlyThreshold: pulumi.Float64(0),
	ServiceName:      pulumi.String("string"),
})
Copy
var alertingResource = new Alerting("alertingResource", AlertingArgs.builder()
    .delay(0)
    .email("string")
    .monthlyThreshold(0)
    .serviceName("string")
    .build());
Copy
alerting_resource = ovh.cloud_project.Alerting("alertingResource",
    delay=0,
    email="string",
    monthly_threshold=0,
    service_name="string")
Copy
const alertingResource = new ovh.cloudproject.Alerting("alertingResource", {
    delay: 0,
    email: "string",
    monthlyThreshold: 0,
    serviceName: "string",
});
Copy
type: ovh:CloudProject:Alerting
properties:
    delay: 0
    email: string
    monthlyThreshold: 0
    serviceName: string
Copy

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

Delay This property is required. double
Delay between two alerts in seconds
Email This property is required. string
Email to contact
MonthlyThreshold This property is required. double
Monthly threshold for this alerting in currency
ServiceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Delay This property is required. float64
Delay between two alerts in seconds
Email This property is required. string
Email to contact
MonthlyThreshold This property is required. float64
Monthly threshold for this alerting in currency
ServiceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
delay This property is required. Double
Delay between two alerts in seconds
email This property is required. String
Email to contact
monthlyThreshold This property is required. Double
Monthly threshold for this alerting in currency
serviceName This property is required. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
delay This property is required. number
Delay between two alerts in seconds
email This property is required. string
Email to contact
monthlyThreshold This property is required. number
Monthly threshold for this alerting in currency
serviceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
delay This property is required. float
Delay between two alerts in seconds
email This property is required. str
Email to contact
monthly_threshold This property is required. float
Monthly threshold for this alerting in currency
service_name This property is required. str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
delay This property is required. Number
Delay between two alerts in seconds
email This property is required. String
Email to contact
monthlyThreshold This property is required. Number
Monthly threshold for this alerting in currency
serviceName This property is required. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

Outputs

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

CreationDate string
Alerting creation date
FormattedMonthlyThreshold AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
Id string
The provider-assigned unique ID for this managed resource.
CreationDate string
Alerting creation date
FormattedMonthlyThreshold AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
Id string
The provider-assigned unique ID for this managed resource.
creationDate String
Alerting creation date
formattedMonthlyThreshold AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
id String
The provider-assigned unique ID for this managed resource.
creationDate string
Alerting creation date
formattedMonthlyThreshold AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
id string
The provider-assigned unique ID for this managed resource.
creation_date str
Alerting creation date
formatted_monthly_threshold cloudproject.AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
id str
The provider-assigned unique ID for this managed resource.
creationDate String
Alerting creation date
formattedMonthlyThreshold Property Map
Formatted monthly threshold for this alerting
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Alerting Resource

Get an existing Alerting 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?: AlertingState, opts?: CustomResourceOptions): Alerting
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        creation_date: Optional[str] = None,
        delay: Optional[float] = None,
        email: Optional[str] = None,
        formatted_monthly_threshold: Optional[_cloudproject.AlertingFormattedMonthlyThresholdArgs] = None,
        monthly_threshold: Optional[float] = None,
        service_name: Optional[str] = None) -> Alerting
func GetAlerting(ctx *Context, name string, id IDInput, state *AlertingState, opts ...ResourceOption) (*Alerting, error)
public static Alerting Get(string name, Input<string> id, AlertingState? state, CustomResourceOptions? opts = null)
public static Alerting get(String name, Output<String> id, AlertingState state, CustomResourceOptions options)
resources:  _:    type: ovh:CloudProject:Alerting    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CreationDate string
Alerting creation date
Delay double
Delay between two alerts in seconds
Email string
Email to contact
FormattedMonthlyThreshold AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
MonthlyThreshold double
Monthly threshold for this alerting in currency
ServiceName string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
CreationDate string
Alerting creation date
Delay float64
Delay between two alerts in seconds
Email string
Email to contact
FormattedMonthlyThreshold AlertingFormattedMonthlyThresholdArgs
Formatted monthly threshold for this alerting
MonthlyThreshold float64
Monthly threshold for this alerting in currency
ServiceName string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
creationDate String
Alerting creation date
delay Double
Delay between two alerts in seconds
email String
Email to contact
formattedMonthlyThreshold AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
monthlyThreshold Double
Monthly threshold for this alerting in currency
serviceName String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
creationDate string
Alerting creation date
delay number
Delay between two alerts in seconds
email string
Email to contact
formattedMonthlyThreshold AlertingFormattedMonthlyThreshold
Formatted monthly threshold for this alerting
monthlyThreshold number
Monthly threshold for this alerting in currency
serviceName string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
creation_date str
Alerting creation date
delay float
Delay between two alerts in seconds
email str
Email to contact
formatted_monthly_threshold cloudproject.AlertingFormattedMonthlyThresholdArgs
Formatted monthly threshold for this alerting
monthly_threshold float
Monthly threshold for this alerting in currency
service_name str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
creationDate String
Alerting creation date
delay Number
Delay between two alerts in seconds
email String
Email to contact
formattedMonthlyThreshold Property Map
Formatted monthly threshold for this alerting
monthlyThreshold Number
Monthly threshold for this alerting in currency
serviceName String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

Supporting Types

AlertingFormattedMonthlyThreshold
, AlertingFormattedMonthlyThresholdArgs

CurrencyCode string
Currency of the monthly threshold
Text string
Text representation of the monthly threshold
Value double
Value of the monthly threshold
CurrencyCode string
Currency of the monthly threshold
Text string
Text representation of the monthly threshold
Value float64
Value of the monthly threshold
currencyCode String
Currency of the monthly threshold
text String
Text representation of the monthly threshold
value Double
Value of the monthly threshold
currencyCode string
Currency of the monthly threshold
text string
Text representation of the monthly threshold
value number
Value of the monthly threshold
currency_code str
Currency of the monthly threshold
text str
Text representation of the monthly threshold
value float
Value of the monthly threshold
currencyCode String
Currency of the monthly threshold
text String
Text representation of the monthly threshold
value Number
Value of the monthly threshold

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.