Tenant Action Group
A tenant action group resource. Azure REST API version: 2023-05-01-preview.
Example Usage
Create or update a tenant action group
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var tenantActionGroup = new AzureNative.Insights.TenantActionGroup("tenantActionGroup", new()
{
AzureAppPushReceivers = new[]
{
new AzureNative.Insights.Inputs.AzureAppPushReceiverArgs
{
EmailAddress = "johndoe@email.com",
Name = "Sample azureAppPush",
},
},
EmailReceivers = new[]
{
new AzureNative.Insights.Inputs.EmailReceiverArgs
{
EmailAddress = "johndoe@email.com",
Name = "John Doe's email",
UseCommonAlertSchema = false,
},
new AzureNative.Insights.Inputs.EmailReceiverArgs
{
EmailAddress = "janesmith@email.com",
Name = "Jane Smith's email",
UseCommonAlertSchema = true,
},
},
Enabled = true,
GroupShortName = "sample",
Location = "Global",
ManagementGroupId = "72f988bf-86f1-41af-91ab-2d7cd011db47",
SmsReceivers = new[]
{
new AzureNative.Insights.Inputs.SmsReceiverArgs
{
CountryCode = "1",
Name = "John Doe's mobile",
PhoneNumber = "2062022299",
},
new AzureNative.Insights.Inputs.SmsReceiverArgs
{
CountryCode = "1",
Name = "Jane Smith's mobile",
PhoneNumber = "0987654321",
},
},
Tags = null,
TenantActionGroupName = "testTenantActionGroup",
VoiceReceivers = new[]
{
new AzureNative.Insights.Inputs.VoiceReceiverArgs
{
CountryCode = "1",
Name = "Sample voice",
PhoneNumber = "2062022299",
},
},
WebhookReceivers = new[]
{
new AzureNative.Insights.Inputs.WebhookReceiverArgs
{
Name = "Sample webhook 1",
ServiceUri = "http://www.example.com/webhook1",
UseCommonAlertSchema = true,
},
new AzureNative.Insights.Inputs.WebhookReceiverArgs
{
IdentifierUri = "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a",
Name = "Sample webhook 2",
ObjectId = "d3bb868c-fe44-452c-aa26-769a6538c808",
ServiceUri = "http://www.example.com/webhook2",
TenantId = "68a4459a-ccb8-493c-b9da-dd30457d1b84",
UseAadAuth = true,
UseCommonAlertSchema = true,
},
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := insights.NewTenantActionGroup(ctx, "tenantActionGroup", &insights.TenantActionGroupArgs{
AzureAppPushReceivers: []insights.AzureAppPushReceiverArgs{
{
EmailAddress: pulumi.String("johndoe@email.com"),
Name: pulumi.String("Sample azureAppPush"),
},
},
EmailReceivers: []insights.EmailReceiverArgs{
{
EmailAddress: pulumi.String("johndoe@email.com"),
Name: pulumi.String("John Doe's email"),
UseCommonAlertSchema: pulumi.Bool(false),
},
{
EmailAddress: pulumi.String("janesmith@email.com"),
Name: pulumi.String("Jane Smith's email"),
UseCommonAlertSchema: pulumi.Bool(true),
},
},
Enabled: pulumi.Bool(true),
GroupShortName: pulumi.String("sample"),
Location: pulumi.String("Global"),
ManagementGroupId: pulumi.String("72f988bf-86f1-41af-91ab-2d7cd011db47"),
SmsReceivers: []insights.SmsReceiverArgs{
{
CountryCode: pulumi.String("1"),
Name: pulumi.String("John Doe's mobile"),
PhoneNumber: pulumi.String("2062022299"),
},
{
CountryCode: pulumi.String("1"),
Name: pulumi.String("Jane Smith's mobile"),
PhoneNumber: pulumi.String("0987654321"),
},
},
Tags: nil,
TenantActionGroupName: pulumi.String("testTenantActionGroup"),
VoiceReceivers: []insights.VoiceReceiverArgs{
{
CountryCode: pulumi.String("1"),
Name: pulumi.String("Sample voice"),
PhoneNumber: pulumi.String("2062022299"),
},
},
WebhookReceivers: []insights.WebhookReceiverArgs{
{
Name: pulumi.String("Sample webhook 1"),
ServiceUri: pulumi.String("http://www.example.com/webhook1"),
UseCommonAlertSchema: pulumi.Bool(true),
},
{
IdentifierUri: pulumi.String("http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a"),
Name: pulumi.String("Sample webhook 2"),
ObjectId: pulumi.String("d3bb868c-fe44-452c-aa26-769a6538c808"),
ServiceUri: pulumi.String("http://www.example.com/webhook2"),
TenantId: pulumi.String("68a4459a-ccb8-493c-b9da-dd30457d1b84"),
UseAadAuth: pulumi.Bool(true),
UseCommonAlertSchema: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.insights.TenantActionGroup;
import com.pulumi.azurenative.insights.TenantActionGroupArgs;
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 tenantActionGroup = new TenantActionGroup("tenantActionGroup", TenantActionGroupArgs.builder()
.azureAppPushReceivers(Map.ofEntries(
Map.entry("emailAddress", "johndoe@email.com"),
Map.entry("name", "Sample azureAppPush")
))
.emailReceivers(
Map.ofEntries(
Map.entry("emailAddress", "johndoe@email.com"),
Map.entry("name", "John Doe's email"),
Map.entry("useCommonAlertSchema", false)
),
Map.ofEntries(
Map.entry("emailAddress", "janesmith@email.com"),
Map.entry("name", "Jane Smith's email"),
Map.entry("useCommonAlertSchema", true)
))
.enabled(true)
.groupShortName("sample")
.location("Global")
.managementGroupId("72f988bf-86f1-41af-91ab-2d7cd011db47")
.smsReceivers(
Map.ofEntries(
Map.entry("countryCode", "1"),
Map.entry("name", "John Doe's mobile"),
Map.entry("phoneNumber", "2062022299")
),
Map.ofEntries(
Map.entry("countryCode", "1"),
Map.entry("name", "Jane Smith's mobile"),
Map.entry("phoneNumber", "0987654321")
))
.tags()
.tenantActionGroupName("testTenantActionGroup")
.voiceReceivers(Map.ofEntries(
Map.entry("countryCode", "1"),
Map.entry("name", "Sample voice"),
Map.entry("phoneNumber", "2062022299")
))
.webhookReceivers(
Map.ofEntries(
Map.entry("name", "Sample webhook 1"),
Map.entry("serviceUri", "http://www.example.com/webhook1"),
Map.entry("useCommonAlertSchema", true)
),
Map.ofEntries(
Map.entry("identifierUri", "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a"),
Map.entry("name", "Sample webhook 2"),
Map.entry("objectId", "d3bb868c-fe44-452c-aa26-769a6538c808"),
Map.entry("serviceUri", "http://www.example.com/webhook2"),
Map.entry("tenantId", "68a4459a-ccb8-493c-b9da-dd30457d1b84"),
Map.entry("useAadAuth", true),
Map.entry("useCommonAlertSchema", true)
))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:insights:TenantActionGroup testTenantActionGroup /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}
Content copied to clipboard