1. Packages
  2. Opsgenie
  3. API Docs
  4. Heartbeat
Opsgenie v1.3.9 published on Tuesday, Jul 16, 2024 by Pulumi

opsgenie.Heartbeat

Explore with Pulumi AI

opsgenie logo
Opsgenie v1.3.9 published on Tuesday, Jul 16, 2024 by Pulumi

    Manages heartbeat within Opsgenie.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opsgenie from "@pulumi/opsgenie";
    
    const test = new opsgenie.Heartbeat("test", {
        name: "genieheartbeat-test",
        description: "test opsgenie heartbeat terraform",
        intervalUnit: "minutes",
        interval: 10,
        enabled: false,
        alertMessage: "Test",
        alertPriority: "P3",
        alertTags: [
            "test",
            "fahri",
        ],
        ownerTeamId: testOpsgenieTeam.id,
    });
    
    import pulumi
    import pulumi_opsgenie as opsgenie
    
    test = opsgenie.Heartbeat("test",
        name="genieheartbeat-test",
        description="test opsgenie heartbeat terraform",
        interval_unit="minutes",
        interval=10,
        enabled=False,
        alert_message="Test",
        alert_priority="P3",
        alert_tags=[
            "test",
            "fahri",
        ],
        owner_team_id=test_opsgenie_team["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{
    			Name:          pulumi.String("genieheartbeat-test"),
    			Description:   pulumi.String("test opsgenie heartbeat terraform"),
    			IntervalUnit:  pulumi.String("minutes"),
    			Interval:      pulumi.Int(10),
    			Enabled:       pulumi.Bool(false),
    			AlertMessage:  pulumi.String("Test"),
    			AlertPriority: pulumi.String("P3"),
    			AlertTags: pulumi.StringArray{
    				pulumi.String("test"),
    				pulumi.String("fahri"),
    			},
    			OwnerTeamId: pulumi.Any(testOpsgenieTeam.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opsgenie = Pulumi.Opsgenie;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Opsgenie.Heartbeat("test", new()
        {
            Name = "genieheartbeat-test",
            Description = "test opsgenie heartbeat terraform",
            IntervalUnit = "minutes",
            Interval = 10,
            Enabled = false,
            AlertMessage = "Test",
            AlertPriority = "P3",
            AlertTags = new[]
            {
                "test",
                "fahri",
            },
            OwnerTeamId = testOpsgenieTeam.Id,
        });
    
    });
    
    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()
                .name("genieheartbeat-test")
                .description("test opsgenie heartbeat terraform")
                .intervalUnit("minutes")
                .interval(10)
                .enabled(false)
                .alertMessage("Test")
                .alertPriority("P3")
                .alertTags(            
                    "test",
                    "fahri")
                .ownerTeamId(testOpsgenieTeam.id())
                .build());
    
        }
    }
    
    resources:
      test:
        type: opsgenie:Heartbeat
        properties:
          name: genieheartbeat-test
          description: test opsgenie heartbeat terraform
          intervalUnit: minutes
          interval: 10
          enabled: false
          alertMessage: Test
          alertPriority: P3
          alertTags:
            - test
            - fahri
          ownerTeamId: ${testOpsgenieTeam.id}
    

    Create Heartbeat Resource

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

    Constructor syntax

    new Heartbeat(name: string, args: HeartbeatArgs, opts?: CustomResourceOptions);
    @overload
    def Heartbeat(resource_name: str,
                  args: HeartbeatArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Heartbeat(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  enabled: Optional[bool] = None,
                  interval: Optional[int] = None,
                  interval_unit: Optional[str] = None,
                  alert_message: Optional[str] = None,
                  alert_priority: Optional[str] = None,
                  alert_tags: Optional[Sequence[str]] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None,
                  owner_team_id: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var heartbeatResource = new Opsgenie.Heartbeat("heartbeatResource", new()
    {
        Enabled = false,
        Interval = 0,
        IntervalUnit = "string",
        AlertMessage = "string",
        AlertPriority = "string",
        AlertTags = new[]
        {
            "string",
        },
        Description = "string",
        Name = "string",
        OwnerTeamId = "string",
    });
    
    example, err := opsgenie.NewHeartbeat(ctx, "heartbeatResource", &opsgenie.HeartbeatArgs{
    	Enabled:       pulumi.Bool(false),
    	Interval:      pulumi.Int(0),
    	IntervalUnit:  pulumi.String("string"),
    	AlertMessage:  pulumi.String("string"),
    	AlertPriority: pulumi.String("string"),
    	AlertTags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	OwnerTeamId: pulumi.String("string"),
    })
    
    var heartbeatResource = new Heartbeat("heartbeatResource", HeartbeatArgs.builder()
        .enabled(false)
        .interval(0)
        .intervalUnit("string")
        .alertMessage("string")
        .alertPriority("string")
        .alertTags("string")
        .description("string")
        .name("string")
        .ownerTeamId("string")
        .build());
    
    heartbeat_resource = opsgenie.Heartbeat("heartbeatResource",
        enabled=False,
        interval=0,
        interval_unit="string",
        alert_message="string",
        alert_priority="string",
        alert_tags=["string"],
        description="string",
        name="string",
        owner_team_id="string")
    
    const heartbeatResource = new opsgenie.Heartbeat("heartbeatResource", {
        enabled: false,
        interval: 0,
        intervalUnit: "string",
        alertMessage: "string",
        alertPriority: "string",
        alertTags: ["string"],
        description: "string",
        name: "string",
        ownerTeamId: "string",
    });
    
    type: opsgenie:Heartbeat
    properties:
        alertMessage: string
        alertPriority: string
        alertTags:
            - string
        description: string
        enabled: false
        interval: 0
        intervalUnit: string
        name: string
        ownerTeamId: string
    

    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 Integer
    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 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.
    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 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.

    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.
    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 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.
    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.
    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 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.

    Import

    Heartbeat Integrations can be imported using the name, e.g.

    $ pulumi import opsgenie:index/heartbeat:Heartbeat test name`
    

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

    Package Details

    Repository
    Opsgenie pulumi/pulumi-opsgenie
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the opsgenie Terraform Provider.
    opsgenie logo
    Opsgenie v1.3.9 published on Tuesday, Jul 16, 2024 by Pulumi