opsgenie.Heartbeat
Explore with Pulumi AI
Manages heartbeat within Opsgenie.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opsgenie = Pulumi.Opsgenie;
return await Deployment.RunAsync(() =>
{
var test = new Opsgenie.Heartbeat("test", new()
{
AlertMessage = "Test",
AlertPriority = "P3",
AlertTags = new[]
{
"test",
"fahri",
},
Description = "test opsgenie heartbeat terraform",
Enabled = false,
Interval = 10,
IntervalUnit = "minutes",
OwnerTeamId = opsgenie_team.Test.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opsgenie.NewHeartbeat(ctx, "test", &opsgenie.HeartbeatArgs{
AlertMessage: pulumi.String("Test"),
AlertPriority: pulumi.String("P3"),
AlertTags: pulumi.StringArray{
pulumi.String("test"),
pulumi.String("fahri"),
},
Description: pulumi.String("test opsgenie heartbeat terraform"),
Enabled: pulumi.Bool(false),
Interval: pulumi.Int(10),
IntervalUnit: pulumi.String("minutes"),
OwnerTeamId: pulumi.Any(opsgenie_team.Test.Id),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opsgenie.Heartbeat;
import com.pulumi.opsgenie.HeartbeatArgs;
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 test = new Heartbeat("test", HeartbeatArgs.builder()
.alertMessage("Test")
.alertPriority("P3")
.alertTags(
"test",
"fahri")
.description("test opsgenie heartbeat terraform")
.enabled(false)
.interval(10)
.intervalUnit("minutes")
.ownerTeamId(opsgenie_team.test().id())
.build());
}
}
import pulumi
import pulumi_opsgenie as opsgenie
test = opsgenie.Heartbeat("test",
alert_message="Test",
alert_priority="P3",
alert_tags=[
"test",
"fahri",
],
description="test opsgenie heartbeat terraform",
enabled=False,
interval=10,
interval_unit="minutes",
owner_team_id=opsgenie_team["test"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";
const test = new opsgenie.Heartbeat("test", {
alertMessage: "Test",
alertPriority: "P3",
alertTags: [
"test",
"fahri",
],
description: "test opsgenie heartbeat terraform",
enabled: false,
interval: 10,
intervalUnit: "minutes",
ownerTeamId: opsgenie_team.test.id,
});
resources:
test:
type: opsgenie:Heartbeat
properties:
alertMessage: Test
alertPriority: P3
alertTags:
- test
- fahri
description: test opsgenie heartbeat terraform
enabled: false
interval: 10
intervalUnit: minutes
ownerTeamId: ${opsgenie_team.test.id}
Create Heartbeat Resource
new Heartbeat(name: string, args: HeartbeatArgs, opts?: CustomResourceOptions);
@overload
def Heartbeat(resource_name: str,
opts: Optional[ResourceOptions] = None,
alert_message: Optional[str] = None,
alert_priority: Optional[str] = None,
alert_tags: Optional[Sequence[str]] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
interval: Optional[int] = None,
interval_unit: Optional[str] = None,
name: Optional[str] = None,
owner_team_id: Optional[str] = None)
@overload
def Heartbeat(resource_name: str,
args: HeartbeatArgs,
opts: Optional[ResourceOptions] = None)
func NewHeartbeat(ctx *Context, name string, args HeartbeatArgs, opts ...ResourceOption) (*Heartbeat, error)
public Heartbeat(string name, HeartbeatArgs args, CustomResourceOptions? opts = null)
public Heartbeat(String name, HeartbeatArgs args)
public Heartbeat(String name, HeartbeatArgs args, CustomResourceOptions options)
type: opsgenie:Heartbeat
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HeartbeatArgs
- 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 HeartbeatArgs
- 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 HeartbeatArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HeartbeatArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HeartbeatArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Heartbeat Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Heartbeat resource accepts the following input properties:
- Enabled bool
Enable/disable heartbeat monitoring.
- Interval int
Specifies how often a heartbeat message should be expected.
- Interval
Unit string Interval specified as minutes, hours or days.
- Alert
Message string Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- Alert
Priority string Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- List<string>
Specifies the alert tags for heartbeat expiration alert.
- Description string
An optional description of the heartbeat
- Name string
Name of the heartbeat
- Owner
Team stringId Owner team of the heartbeat.
- Enabled bool
Enable/disable heartbeat monitoring.
- Interval int
Specifies how often a heartbeat message should be expected.
- Interval
Unit string Interval specified as minutes, hours or days.
- Alert
Message string Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- Alert
Priority string Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- []string
Specifies the alert tags for heartbeat expiration alert.
- Description string
An optional description of the heartbeat
- Name string
Name of the heartbeat
- Owner
Team stringId Owner team of the heartbeat.
- enabled Boolean
Enable/disable heartbeat monitoring.
- interval Integer
Specifies how often a heartbeat message should be expected.
- interval
Unit String Interval specified as minutes, hours or days.
- alert
Message String Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert
Priority String Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- List<String>
Specifies the alert tags for heartbeat expiration alert.
- description String
An optional description of the heartbeat
- name String
Name of the heartbeat
- owner
Team StringId Owner team of the heartbeat.
- enabled boolean
Enable/disable heartbeat monitoring.
- interval number
Specifies how often a heartbeat message should be expected.
- interval
Unit string Interval specified as minutes, hours or days.
- alert
Message string Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert
Priority string Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- string[]
Specifies the alert tags for heartbeat expiration alert.
- description string
An optional description of the heartbeat
- name string
Name of the heartbeat
- owner
Team stringId Owner team of the heartbeat.
- enabled bool
Enable/disable heartbeat monitoring.
- interval int
Specifies how often a heartbeat message should be expected.
- interval_
unit str Interval specified as minutes, hours or days.
- alert_
message str Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert_
priority str Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- Sequence[str]
Specifies the alert tags for heartbeat expiration alert.
- description str
An optional description of the heartbeat
- name str
Name of the heartbeat
- owner_
team_ strid Owner team of the heartbeat.
- enabled Boolean
Enable/disable heartbeat monitoring.
- interval Number
Specifies how often a heartbeat message should be expected.
- interval
Unit String Interval specified as minutes, hours or days.
- alert
Message String Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert
Priority String Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- List<String>
Specifies the alert tags for heartbeat expiration alert.
- description String
An optional description of the heartbeat
- name String
Name of the heartbeat
- owner
Team StringId Owner team of the heartbeat.
Outputs
All input properties are implicitly available as output properties. Additionally, the Heartbeat 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 Heartbeat Resource
Get an existing Heartbeat 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?: HeartbeatState, opts?: CustomResourceOptions): Heartbeat
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_message: Optional[str] = None,
alert_priority: Optional[str] = None,
alert_tags: Optional[Sequence[str]] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
interval: Optional[int] = None,
interval_unit: Optional[str] = None,
name: Optional[str] = None,
owner_team_id: Optional[str] = None) -> Heartbeat
func GetHeartbeat(ctx *Context, name string, id IDInput, state *HeartbeatState, opts ...ResourceOption) (*Heartbeat, error)
public static Heartbeat Get(string name, Input<string> id, HeartbeatState? state, CustomResourceOptions? opts = null)
public static Heartbeat get(String name, Output<String> id, HeartbeatState 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.
- Alert
Message string Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- Alert
Priority string Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- List<string>
Specifies the alert tags for heartbeat expiration alert.
- Description string
An optional description of the heartbeat
- Enabled bool
Enable/disable heartbeat monitoring.
- Interval int
Specifies how often a heartbeat message should be expected.
- Interval
Unit string Interval specified as minutes, hours or days.
- Name string
Name of the heartbeat
- Owner
Team stringId Owner team of the heartbeat.
- Alert
Message string Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- Alert
Priority string Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- []string
Specifies the alert tags for heartbeat expiration alert.
- Description string
An optional description of the heartbeat
- Enabled bool
Enable/disable heartbeat monitoring.
- Interval int
Specifies how often a heartbeat message should be expected.
- Interval
Unit string Interval specified as minutes, hours or days.
- Name string
Name of the heartbeat
- Owner
Team stringId Owner team of the heartbeat.
- alert
Message String Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert
Priority String Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- List<String>
Specifies the alert tags for heartbeat expiration alert.
- description String
An optional description of the heartbeat
- enabled Boolean
Enable/disable heartbeat monitoring.
- interval Integer
Specifies how often a heartbeat message should be expected.
- interval
Unit String Interval specified as minutes, hours or days.
- name String
Name of the heartbeat
- owner
Team StringId Owner team of the heartbeat.
- alert
Message string Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert
Priority string Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- string[]
Specifies the alert tags for heartbeat expiration alert.
- description string
An optional description of the heartbeat
- enabled boolean
Enable/disable heartbeat monitoring.
- interval number
Specifies how often a heartbeat message should be expected.
- interval
Unit string Interval specified as minutes, hours or days.
- name string
Name of the heartbeat
- owner
Team stringId Owner team of the heartbeat.
- alert_
message str Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert_
priority str Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- Sequence[str]
Specifies the alert tags for heartbeat expiration alert.
- description str
An optional description of the heartbeat
- enabled bool
Enable/disable heartbeat monitoring.
- interval int
Specifies how often a heartbeat message should be expected.
- interval_
unit str Interval specified as minutes, hours or days.
- name str
Name of the heartbeat
- owner_
team_ strid Owner team of the heartbeat.
- alert
Message String Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired".
- alert
Priority String Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
- List<String>
Specifies the alert tags for heartbeat expiration alert.
- description String
An optional description of the heartbeat
- enabled Boolean
Enable/disable heartbeat monitoring.
- interval Number
Specifies how often a heartbeat message should be expected.
- interval
Unit String Interval specified as minutes, hours or days.
- name String
Name of the heartbeat
- owner
Team StringId Owner team of the heartbeat.
Import
Heartbeat Integrations can be imported using the name
, e.g.
$ pulumi import opsgenie:index/heartbeat:Heartbeat test name`
Package Details
- Repository
- Opsgenie pulumi/pulumi-opsgenie
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
opsgenie
Terraform Provider.