Opsgenie

Pulumi Official
Package maintained by Pulumi
v1.1.5 published on Friday, Feb 18, 2022 by Pulumi

EmailIntegration

Manages an Email Integration within Opsgenie.

Example Usage

using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

class MyStack : Stack
{
    public MyStack()
    {
        var testEmailIntegration = new Opsgenie.EmailIntegration("testEmailIntegration", new Opsgenie.EmailIntegrationArgs
        {
            EmailUsername = "fahri",
        });
        var testIndex_emailIntegrationEmailIntegration = new Opsgenie.EmailIntegration("testIndex/emailIntegrationEmailIntegration", new Opsgenie.EmailIntegrationArgs
        {
            Responders = 
            {
                new Opsgenie.Inputs.EmailIntegrationResponderArgs
                {
                    Type = "user",
                    Id = opsgenie_user.Test.Id,
                },
                new Opsgenie.Inputs.EmailIntegrationResponderArgs
                {
                    Type = "schedule",
                    Id = opsgenie_schedule.Test.Id,
                },
                new Opsgenie.Inputs.EmailIntegrationResponderArgs
                {
                    Type = "escalation",
                    Id = opsgenie_escalation.Test.Id,
                },
                new Opsgenie.Inputs.EmailIntegrationResponderArgs
                {
                    Type = "team",
                    Id = opsgenie_team.Test2.Id,
                },
            },
            EmailUsername = "test",
            Enabled = true,
            IgnoreRespondersFromPayload = true,
            SuppressNotifications = true,
        });
        var testOpsgenieIndex_emailIntegrationEmailIntegration = new Opsgenie.EmailIntegration("testOpsgenieIndex/emailIntegrationEmailIntegration", new Opsgenie.EmailIntegrationArgs
        {
            Responders = 
            {
                new Opsgenie.Inputs.EmailIntegrationResponderArgs
                {
                    Type = "user",
                    Id = opsgenie_user.Test.Id,
                },
            },
            EmailUsername = "test",
            Enabled = true,
            IgnoreRespondersFromPayload = true,
            SuppressNotifications = true,
            OwnerTeamId = opsgenie_team_genies.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.NewEmailIntegration(ctx, "testEmailIntegration", &opsgenie.EmailIntegrationArgs{
			EmailUsername: pulumi.String("fahri"),
		})
		if err != nil {
			return err
		}
		_, err = opsgenie.NewEmailIntegration(ctx, "testIndex/emailIntegrationEmailIntegration", &opsgenie.EmailIntegrationArgs{
			Responders: EmailIntegrationResponderArray{
				&EmailIntegrationResponderArgs{
					Type: pulumi.String("user"),
					Id:   pulumi.Any(opsgenie_user.Test.Id),
				},
				&EmailIntegrationResponderArgs{
					Type: pulumi.String("schedule"),
					Id:   pulumi.Any(opsgenie_schedule.Test.Id),
				},
				&EmailIntegrationResponderArgs{
					Type: pulumi.String("escalation"),
					Id:   pulumi.Any(opsgenie_escalation.Test.Id),
				},
				&EmailIntegrationResponderArgs{
					Type: pulumi.String("team"),
					Id:   pulumi.Any(opsgenie_team.Test2.Id),
				},
			},
			EmailUsername:               pulumi.String("test"),
			Enabled:                     pulumi.Bool(true),
			IgnoreRespondersFromPayload: pulumi.Bool(true),
			SuppressNotifications:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = opsgenie.NewEmailIntegration(ctx, "testOpsgenieIndex/emailIntegrationEmailIntegration", &opsgenie.EmailIntegrationArgs{
			Responders: EmailIntegrationResponderArray{
				&EmailIntegrationResponderArgs{
					Type: pulumi.String("user"),
					Id:   pulumi.Any(opsgenie_user.Test.Id),
				},
			},
			EmailUsername:               pulumi.String("test"),
			Enabled:                     pulumi.Bool(true),
			IgnoreRespondersFromPayload: pulumi.Bool(true),
			SuppressNotifications:       pulumi.Bool(true),
			OwnerTeamId:                 pulumi.Any(opsgenie_team_genies.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_opsgenie as opsgenie

test_email_integration = opsgenie.EmailIntegration("testEmailIntegration", email_username="fahri")
test_index_email_integration_email_integration = opsgenie.EmailIntegration("testIndex/emailIntegrationEmailIntegration",
    responders=[
        opsgenie.EmailIntegrationResponderArgs(
            type="user",
            id=opsgenie_user["test"]["id"],
        ),
        opsgenie.EmailIntegrationResponderArgs(
            type="schedule",
            id=opsgenie_schedule["test"]["id"],
        ),
        opsgenie.EmailIntegrationResponderArgs(
            type="escalation",
            id=opsgenie_escalation["test"]["id"],
        ),
        opsgenie.EmailIntegrationResponderArgs(
            type="team",
            id=opsgenie_team["test2"]["id"],
        ),
    ],
    email_username="test",
    enabled=True,
    ignore_responders_from_payload=True,
    suppress_notifications=True)
test_opsgenie_index_email_integration_email_integration = opsgenie.EmailIntegration("testOpsgenieIndex/emailIntegrationEmailIntegration",
    responders=[opsgenie.EmailIntegrationResponderArgs(
        type="user",
        id=opsgenie_user["test"]["id"],
    )],
    email_username="test",
    enabled=True,
    ignore_responders_from_payload=True,
    suppress_notifications=True,
    owner_team_id=opsgenie_team_genies["id"])
import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";

const testEmailIntegration = new opsgenie.EmailIntegration("testEmailIntegration", {emailUsername: "fahri"});
const testIndex_emailIntegrationEmailIntegration = new opsgenie.EmailIntegration("testIndex/emailIntegrationEmailIntegration", {
    responders: [
        {
            type: "user",
            id: opsgenie_user.test.id,
        },
        {
            type: "schedule",
            id: opsgenie_schedule.test.id,
        },
        {
            type: "escalation",
            id: opsgenie_escalation.test.id,
        },
        {
            type: "team",
            id: opsgenie_team.test2.id,
        },
    ],
    emailUsername: "test",
    enabled: true,
    ignoreRespondersFromPayload: true,
    suppressNotifications: true,
});
const testOpsgenieIndex_emailIntegrationEmailIntegration = new opsgenie.EmailIntegration("testOpsgenieIndex/emailIntegrationEmailIntegration", {
    responders: [{
        type: "user",
        id: opsgenie_user.test.id,
    }],
    emailUsername: "test",
    enabled: true,
    ignoreRespondersFromPayload: true,
    suppressNotifications: true,
    ownerTeamId: opsgenie_team_genies.id,
});

Coming soon!

Create a EmailIntegration Resource

new EmailIntegration(name: string, args: EmailIntegrationArgs, opts?: CustomResourceOptions);
@overload
def EmailIntegration(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     email_username: Optional[str] = None,
                     enabled: Optional[bool] = None,
                     ignore_responders_from_payload: Optional[bool] = None,
                     name: Optional[str] = None,
                     owner_team_id: Optional[str] = None,
                     responders: Optional[Sequence[EmailIntegrationResponderArgs]] = None,
                     suppress_notifications: Optional[bool] = None)
@overload
def EmailIntegration(resource_name: str,
                     args: EmailIntegrationArgs,
                     opts: Optional[ResourceOptions] = None)
func NewEmailIntegration(ctx *Context, name string, args EmailIntegrationArgs, opts ...ResourceOption) (*EmailIntegration, error)
public EmailIntegration(string name, EmailIntegrationArgs args, CustomResourceOptions? opts = null)
public EmailIntegration(String name, EmailIntegrationArgs args)
public EmailIntegration(String name, EmailIntegrationArgs args, CustomResourceOptions options)
type: opsgenie:EmailIntegration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EmailIntegrationArgs
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 EmailIntegrationArgs
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 EmailIntegrationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EmailIntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EmailIntegrationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

EmailUsername string

The username part of the email address. It must be unique for each integration.

Enabled bool

A Member block as documented below.

IgnoreRespondersFromPayload bool

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

Name string

Name of the integration. Name must be unique for each integration.

OwnerTeamId string

Owner team id of the integration.

Responders List<EmailIntegrationResponderArgs>
SuppressNotifications bool

If enabled, notifications that come from alerts will be suppressed. Default: false.

EmailUsername string

The username part of the email address. It must be unique for each integration.

Enabled bool

A Member block as documented below.

IgnoreRespondersFromPayload bool

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

Name string

Name of the integration. Name must be unique for each integration.

OwnerTeamId string

Owner team id of the integration.

Responders []EmailIntegrationResponderArgs
SuppressNotifications bool

If enabled, notifications that come from alerts will be suppressed. Default: false.

emailUsername String

The username part of the email address. It must be unique for each integration.

enabled Boolean

A Member block as documented below.

ignoreRespondersFromPayload Boolean

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name String

Name of the integration. Name must be unique for each integration.

ownerTeamId String

Owner team id of the integration.

responders ListIntegrationResponderArgs>
suppressNotifications Boolean

If enabled, notifications that come from alerts will be suppressed. Default: false.

emailUsername string

The username part of the email address. It must be unique for each integration.

enabled boolean

A Member block as documented below.

ignoreRespondersFromPayload boolean

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name string

Name of the integration. Name must be unique for each integration.

ownerTeamId string

Owner team id of the integration.

responders EmailIntegrationResponderArgs[]
suppressNotifications boolean

If enabled, notifications that come from alerts will be suppressed. Default: false.

email_username str

The username part of the email address. It must be unique for each integration.

enabled bool

A Member block as documented below.

ignore_responders_from_payload bool

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name str

Name of the integration. Name must be unique for each integration.

owner_team_id str

Owner team id of the integration.

responders Sequence[EmailIntegrationResponderArgs]
suppress_notifications bool

If enabled, notifications that come from alerts will be suppressed. Default: false.

emailUsername String

The username part of the email address. It must be unique for each integration.

enabled Boolean

A Member block as documented below.

ignoreRespondersFromPayload Boolean

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name String

Name of the integration. Name must be unique for each integration.

ownerTeamId String

Owner team id of the integration.

responders List
suppressNotifications Boolean

If enabled, notifications that come from alerts will be suppressed. Default: false.

Outputs

All input properties are implicitly available as output properties. Additionally, the EmailIntegration 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 an Existing EmailIntegration Resource

Get an existing EmailIntegration 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?: EmailIntegrationState, opts?: CustomResourceOptions): EmailIntegration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        email_username: Optional[str] = None,
        enabled: Optional[bool] = None,
        ignore_responders_from_payload: Optional[bool] = None,
        name: Optional[str] = None,
        owner_team_id: Optional[str] = None,
        responders: Optional[Sequence[EmailIntegrationResponderArgs]] = None,
        suppress_notifications: Optional[bool] = None) -> EmailIntegration
func GetEmailIntegration(ctx *Context, name string, id IDInput, state *EmailIntegrationState, opts ...ResourceOption) (*EmailIntegration, error)
public static EmailIntegration Get(string name, Input<string> id, EmailIntegrationState? state, CustomResourceOptions? opts = null)
public static EmailIntegration get(String name, Output<String> id, EmailIntegrationState 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:
EmailUsername string

The username part of the email address. It must be unique for each integration.

Enabled bool

A Member block as documented below.

IgnoreRespondersFromPayload bool

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

Name string

Name of the integration. Name must be unique for each integration.

OwnerTeamId string

Owner team id of the integration.

Responders List<EmailIntegrationResponderArgs>
SuppressNotifications bool

If enabled, notifications that come from alerts will be suppressed. Default: false.

EmailUsername string

The username part of the email address. It must be unique for each integration.

Enabled bool

A Member block as documented below.

IgnoreRespondersFromPayload bool

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

Name string

Name of the integration. Name must be unique for each integration.

OwnerTeamId string

Owner team id of the integration.

Responders []EmailIntegrationResponderArgs
SuppressNotifications bool

If enabled, notifications that come from alerts will be suppressed. Default: false.

emailUsername String

The username part of the email address. It must be unique for each integration.

enabled Boolean

A Member block as documented below.

ignoreRespondersFromPayload Boolean

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name String

Name of the integration. Name must be unique for each integration.

ownerTeamId String

Owner team id of the integration.

responders ListIntegrationResponderArgs>
suppressNotifications Boolean

If enabled, notifications that come from alerts will be suppressed. Default: false.

emailUsername string

The username part of the email address. It must be unique for each integration.

enabled boolean

A Member block as documented below.

ignoreRespondersFromPayload boolean

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name string

Name of the integration. Name must be unique for each integration.

ownerTeamId string

Owner team id of the integration.

responders EmailIntegrationResponderArgs[]
suppressNotifications boolean

If enabled, notifications that come from alerts will be suppressed. Default: false.

email_username str

The username part of the email address. It must be unique for each integration.

enabled bool

A Member block as documented below.

ignore_responders_from_payload bool

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name str

Name of the integration. Name must be unique for each integration.

owner_team_id str

Owner team id of the integration.

responders Sequence[EmailIntegrationResponderArgs]
suppress_notifications bool

If enabled, notifications that come from alerts will be suppressed. Default: false.

emailUsername String

The username part of the email address. It must be unique for each integration.

enabled Boolean

A Member block as documented below.

ignoreRespondersFromPayload Boolean

If enabled, the integration will ignore recipients sent in request payloads. Default: false.

name String

Name of the integration. Name must be unique for each integration.

ownerTeamId String

Owner team id of the integration.

responders List
suppressNotifications Boolean

If enabled, notifications that come from alerts will be suppressed. Default: false.

Supporting Types

EmailIntegrationResponder

Id string

The id of the responder.

Type string

The responder type.

Id string

The id of the responder.

Type string

The responder type.

id String

The id of the responder.

type String

The responder type.

id string

The id of the responder.

type string

The responder type.

id str

The id of the responder.

type str

The responder type.

id String

The id of the responder.

type String

The responder type.

Import

Email Integrations can be imported using the id, e.g.

 $ pulumi import opsgenie:index/emailIntegration:EmailIntegration test id`

Package Details

Repository
https://github.com/pulumi/pulumi-opsgenie
License
Apache-2.0
Notes

This Pulumi package is based on the opsgenie Terraform Provider.