Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Opsgenie

v1.1.0 published on Thursday, Nov 11, 2021 by Pulumi

Heartbeat

Manages heartbeat within Opsgenie.

Example Usage

using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Opsgenie.Heartbeat("test", new Opsgenie.HeartbeatArgs
        {
            AlertMessage = "Test",
            AlertPriority = "P3",
            AlertTags = 
            {
                "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
	})
}
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,
});

Create a 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)
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.

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.
IntervalUnit string
Interval specified as minutes, hours or days.
AlertMessage string
Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is “HeartbeatName is expired”.
AlertPriority string
Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
AlertTags List<string>
Specifies the alert tags for heartbeat expiration alert.
Description string
An optional description of the heartbeat
Name string
Name of the heartbeat
OwnerTeamId string
Owner team of the heartbeat.
Enabled bool
Enable/disable heartbeat monitoring.
Interval int
Specifies how often a heartbeat message should be expected.
IntervalUnit string
Interval specified as minutes, hours or days.
AlertMessage string
Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is “HeartbeatName is expired”.
AlertPriority string
Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
AlertTags []string
Specifies the alert tags for heartbeat expiration alert.
Description string
An optional description of the heartbeat
Name string
Name of the heartbeat
OwnerTeamId string
Owner team of the heartbeat.
enabled boolean
Enable/disable heartbeat monitoring.
interval number
Specifies how often a heartbeat message should be expected.
intervalUnit string
Interval specified as minutes, hours or days.
alertMessage string
Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is “HeartbeatName is expired”.
alertPriority string
Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
alertTags string[]
Specifies the alert tags for heartbeat expiration alert.
description string
An optional description of the heartbeat
name string
Name of the heartbeat
ownerTeamId string
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.
alert_tags 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_id str
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 str
The provider-assigned unique ID for this managed resource.

Look up an 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)
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.

The following state arguments are supported:

AlertMessage string
Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is “HeartbeatName is expired”.
AlertPriority string
Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
AlertTags 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.
IntervalUnit string
Interval specified as minutes, hours or days.
Name string
Name of the heartbeat
OwnerTeamId string
Owner team of the heartbeat.
AlertMessage string
Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is “HeartbeatName is expired”.
AlertPriority string
Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
AlertTags []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.
IntervalUnit string
Interval specified as minutes, hours or days.
Name string
Name of the heartbeat
OwnerTeamId string
Owner team of the heartbeat.
alertMessage string
Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is “HeartbeatName is expired”.
alertPriority string
Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3.
alertTags 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.
intervalUnit string
Interval specified as minutes, hours or days.
name string
Name of the heartbeat
ownerTeamId string
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.
alert_tags 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_id str
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
https://github.com/pulumi/pulumi-opsgenie
License
Apache-2.0
Notes
This Pulumi package is based on the opsgenie Terraform Provider.