digitalocean.UptimeAlert
Explore with Pulumi AI
Provides a DigitalOcean Uptime Alerts resource. Uptime Alerts provide the ability to add alerts to your DigitalOcean Uptime Checks when your endpoints are slow, unavailable, or SSL certificates are expiring.
Create UptimeAlert Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UptimeAlert(name: string, args: UptimeAlertArgs, opts?: CustomResourceOptions);
@overload
def UptimeAlert(resource_name: str,
args: UptimeAlertArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UptimeAlert(resource_name: str,
opts: Optional[ResourceOptions] = None,
check_id: Optional[str] = None,
notifications: Optional[Sequence[UptimeAlertNotificationArgs]] = None,
type: Optional[str] = None,
comparison: Optional[str] = None,
name: Optional[str] = None,
period: Optional[str] = None,
threshold: Optional[int] = None)
func NewUptimeAlert(ctx *Context, name string, args UptimeAlertArgs, opts ...ResourceOption) (*UptimeAlert, error)
public UptimeAlert(string name, UptimeAlertArgs args, CustomResourceOptions? opts = null)
public UptimeAlert(String name, UptimeAlertArgs args)
public UptimeAlert(String name, UptimeAlertArgs args, CustomResourceOptions options)
type: digitalocean:UptimeAlert
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args UptimeAlertArgs
- 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 UptimeAlertArgs
- 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 UptimeAlertArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UptimeAlertArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UptimeAlertArgs
- 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 uptimeAlertResource = new DigitalOcean.UptimeAlert("uptimeAlertResource", new()
{
CheckId = "string",
Notifications = new[]
{
new DigitalOcean.Inputs.UptimeAlertNotificationArgs
{
Emails = new[]
{
"string",
},
Slacks = new[]
{
new DigitalOcean.Inputs.UptimeAlertNotificationSlackArgs
{
Channel = "string",
Url = "string",
},
},
},
},
Type = "string",
Comparison = "string",
Name = "string",
Period = "string",
Threshold = 0,
});
example, err := digitalocean.NewUptimeAlert(ctx, "uptimeAlertResource", &digitalocean.UptimeAlertArgs{
CheckId: pulumi.String("string"),
Notifications: digitalocean.UptimeAlertNotificationArray{
&digitalocean.UptimeAlertNotificationArgs{
Emails: pulumi.StringArray{
pulumi.String("string"),
},
Slacks: digitalocean.UptimeAlertNotificationSlackArray{
&digitalocean.UptimeAlertNotificationSlackArgs{
Channel: pulumi.String("string"),
Url: pulumi.String("string"),
},
},
},
},
Type: pulumi.String("string"),
Comparison: pulumi.String("string"),
Name: pulumi.String("string"),
Period: pulumi.String("string"),
Threshold: pulumi.Int(0),
})
var uptimeAlertResource = new UptimeAlert("uptimeAlertResource", UptimeAlertArgs.builder()
.checkId("string")
.notifications(UptimeAlertNotificationArgs.builder()
.emails("string")
.slacks(UptimeAlertNotificationSlackArgs.builder()
.channel("string")
.url("string")
.build())
.build())
.type("string")
.comparison("string")
.name("string")
.period("string")
.threshold(0)
.build());
uptime_alert_resource = digitalocean.UptimeAlert("uptimeAlertResource",
check_id="string",
notifications=[{
"emails": ["string"],
"slacks": [{
"channel": "string",
"url": "string",
}],
}],
type="string",
comparison="string",
name="string",
period="string",
threshold=0)
const uptimeAlertResource = new digitalocean.UptimeAlert("uptimeAlertResource", {
checkId: "string",
notifications: [{
emails: ["string"],
slacks: [{
channel: "string",
url: "string",
}],
}],
type: "string",
comparison: "string",
name: "string",
period: "string",
threshold: 0,
});
type: digitalocean:UptimeAlert
properties:
checkId: string
comparison: string
name: string
notifications:
- emails:
- string
slacks:
- channel: string
url: string
period: string
threshold: 0
type: string
UptimeAlert 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 UptimeAlert resource accepts the following input properties:
- Check
Id string - A unique identifier for a check
- Notifications
List<Pulumi.
Digital Ocean. Inputs. Uptime Alert Notification> - The notification settings for a trigger alert.
- Type string
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
. - Comparison string
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - Name string
- A human-friendly display name.
- Period string
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - Threshold int
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- Check
Id string - A unique identifier for a check
- Notifications
[]Uptime
Alert Notification Args - The notification settings for a trigger alert.
- Type string
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
. - Comparison string
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - Name string
- A human-friendly display name.
- Period string
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - Threshold int
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- check
Id String - A unique identifier for a check
- notifications
List<Uptime
Alert Notification> - The notification settings for a trigger alert.
- type String
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
. - comparison String
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name String
- A human-friendly display name.
- period String
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold Integer
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- check
Id string - A unique identifier for a check
- notifications
Uptime
Alert Notification[] - The notification settings for a trigger alert.
- type string
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
. - comparison string
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name string
- A human-friendly display name.
- period string
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold number
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- check_
id str - A unique identifier for a check
- notifications
Sequence[Uptime
Alert Notification Args] - The notification settings for a trigger alert.
- type str
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
. - comparison str
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name str
- A human-friendly display name.
- period str
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold int
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- check
Id String - A unique identifier for a check
- notifications List<Property Map>
- The notification settings for a trigger alert.
- type String
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
. - comparison String
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name String
- A human-friendly display name.
- period String
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold Number
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
Outputs
All input properties are implicitly available as output properties. Additionally, the UptimeAlert resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing UptimeAlert Resource
Get an existing UptimeAlert 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?: UptimeAlertState, opts?: CustomResourceOptions): UptimeAlert
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
check_id: Optional[str] = None,
comparison: Optional[str] = None,
name: Optional[str] = None,
notifications: Optional[Sequence[UptimeAlertNotificationArgs]] = None,
period: Optional[str] = None,
threshold: Optional[int] = None,
type: Optional[str] = None) -> UptimeAlert
func GetUptimeAlert(ctx *Context, name string, id IDInput, state *UptimeAlertState, opts ...ResourceOption) (*UptimeAlert, error)
public static UptimeAlert Get(string name, Input<string> id, UptimeAlertState? state, CustomResourceOptions? opts = null)
public static UptimeAlert get(String name, Output<String> id, UptimeAlertState 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.
- Check
Id string - A unique identifier for a check
- Comparison string
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - Name string
- A human-friendly display name.
- Notifications
List<Pulumi.
Digital Ocean. Inputs. Uptime Alert Notification> - The notification settings for a trigger alert.
- Period string
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - Threshold int
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- Type string
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
.
- Check
Id string - A unique identifier for a check
- Comparison string
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - Name string
- A human-friendly display name.
- Notifications
[]Uptime
Alert Notification Args - The notification settings for a trigger alert.
- Period string
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - Threshold int
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- Type string
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
.
- check
Id String - A unique identifier for a check
- comparison String
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name String
- A human-friendly display name.
- notifications
List<Uptime
Alert Notification> - The notification settings for a trigger alert.
- period String
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold Integer
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- type String
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
.
- check
Id string - A unique identifier for a check
- comparison string
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name string
- A human-friendly display name.
- notifications
Uptime
Alert Notification[] - The notification settings for a trigger alert.
- period string
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold number
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- type string
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
.
- check_
id str - A unique identifier for a check
- comparison str
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name str
- A human-friendly display name.
- notifications
Sequence[Uptime
Alert Notification Args] - The notification settings for a trigger alert.
- period str
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold int
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- type str
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
.
- check
Id String - A unique identifier for a check
- comparison String
- The comparison operator used against the alert's threshold. Must be one of
greater_than
orless_than
. - name String
- A human-friendly display name.
- notifications List<Property Map>
- The notification settings for a trigger alert.
- period String
- Period of time the threshold must be exceeded to trigger the alert. Must be one of
2m
,3m
,5m
,10m
,15m
,30m
or1h
. - threshold Number
- The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
- type String
- The type of health check to perform. Must be one of
latency
,down
,down_global
orssl_expiry
.
Supporting Types
UptimeAlertNotification, UptimeAlertNotificationArgs
- Emails List<string>
- List of email addresses to sent notifications to.
- Slacks
List<Pulumi.
Digital Ocean. Inputs. Uptime Alert Notification Slack>
- Emails []string
- List of email addresses to sent notifications to.
- Slacks
[]Uptime
Alert Notification Slack
- emails List<String>
- List of email addresses to sent notifications to.
- slacks
List<Uptime
Alert Notification Slack>
- emails string[]
- List of email addresses to sent notifications to.
- slacks
Uptime
Alert Notification Slack[]
- emails Sequence[str]
- List of email addresses to sent notifications to.
- slacks
Sequence[Uptime
Alert Notification Slack]
- emails List<String>
- List of email addresses to sent notifications to.
- slacks List<Property Map>
UptimeAlertNotificationSlack, UptimeAlertNotificationSlackArgs
Import
Uptime alerts can be imported using both the ID of the alert’s parent check and
its own separated by a comma in the format: check_id,alert_id
. For example:
$ pulumi import digitalocean:index/uptimeAlert:UptimeAlert target 94a7d216-d821-11ee-a327-33d3239ffc4b,5a4981aa-9653-4bd1-bef5-d6bff52042e4
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- DigitalOcean pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitalocean
Terraform Provider.