Tenant Action Group
A tenant action group resource. Uses 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.Monitor.TenantActionGroup("tenantActionGroup", new()
{
AzureAppPushReceivers = new[]
{
new AzureNative.Monitor.Inputs.AzureAppPushReceiverArgs
{
EmailAddress = "johndoe@email.com",
Name = "Sample azureAppPush",
},
},
EmailReceivers = new[]
{
new AzureNative.Monitor.Inputs.EmailReceiverArgs
{
EmailAddress = "johndoe@email.com",
Name = "John Doe's email",
UseCommonAlertSchema = false,
},
new AzureNative.Monitor.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.Monitor.Inputs.SmsReceiverArgs
{
CountryCode = "1",
Name = "John Doe's mobile",
PhoneNumber = "2062022299",
},
new AzureNative.Monitor.Inputs.SmsReceiverArgs
{
CountryCode = "1",
Name = "Jane Smith's mobile",
PhoneNumber = "0987654321",
},
},
Tags = null,
TenantActionGroupName = "testTenantActionGroup",
VoiceReceivers = new[]
{
new AzureNative.Monitor.Inputs.VoiceReceiverArgs
{
CountryCode = "1",
Name = "Sample voice",
PhoneNumber = "2062022299",
},
},
WebhookReceivers = new[]
{
new AzureNative.Monitor.Inputs.WebhookReceiverArgs
{
Name = "Sample webhook 1",
ServiceUri = "http://www.example.com/webhook1",
UseCommonAlertSchema = true,
},
new AzureNative.Monitor.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 (
monitor "github.com/pulumi/pulumi-azure-native-sdk/monitor/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := monitor.NewTenantActionGroup(ctx, "tenantActionGroup", &monitor.TenantActionGroupArgs{
AzureAppPushReceivers: monitor.AzureAppPushReceiverArray{
&monitor.AzureAppPushReceiverArgs{
EmailAddress: pulumi.String("johndoe@email.com"),
Name: pulumi.String("Sample azureAppPush"),
},
},
EmailReceivers: monitor.EmailReceiverArray{
&monitor.EmailReceiverArgs{
EmailAddress: pulumi.String("johndoe@email.com"),
Name: pulumi.String("John Doe's email"),
UseCommonAlertSchema: pulumi.Bool(false),
},
&monitor.EmailReceiverArgs{
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: monitor.SmsReceiverArray{
&monitor.SmsReceiverArgs{
CountryCode: pulumi.String("1"),
Name: pulumi.String("John Doe's mobile"),
PhoneNumber: pulumi.String("2062022299"),
},
&monitor.SmsReceiverArgs{
CountryCode: pulumi.String("1"),
Name: pulumi.String("Jane Smith's mobile"),
PhoneNumber: pulumi.String("0987654321"),
},
},
Tags: pulumi.StringMap{},
TenantActionGroupName: pulumi.String("testTenantActionGroup"),
VoiceReceivers: monitor.VoiceReceiverArray{
&monitor.VoiceReceiverArgs{
CountryCode: pulumi.String("1"),
Name: pulumi.String("Sample voice"),
PhoneNumber: pulumi.String("2062022299"),
},
},
WebhookReceivers: monitor.WebhookReceiverArray{
&monitor.WebhookReceiverArgs{
Name: pulumi.String("Sample webhook 1"),
ServiceUri: pulumi.String("http://www.example.com/webhook1"),
UseCommonAlertSchema: pulumi.Bool(true),
},
&monitor.WebhookReceiverArgs{
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.monitor.TenantActionGroup;
import com.pulumi.azurenative.monitor.TenantActionGroupArgs;
import com.pulumi.azurenative.monitor.inputs.AzureAppPushReceiverArgs;
import com.pulumi.azurenative.monitor.inputs.EmailReceiverArgs;
import com.pulumi.azurenative.monitor.inputs.SmsReceiverArgs;
import com.pulumi.azurenative.monitor.inputs.VoiceReceiverArgs;
import com.pulumi.azurenative.monitor.inputs.WebhookReceiverArgs;
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(AzureAppPushReceiverArgs.builder()
.emailAddress("johndoe@email.com")
.name("Sample azureAppPush")
.build())
.emailReceivers(
EmailReceiverArgs.builder()
.emailAddress("johndoe@email.com")
.name("John Doe's email")
.useCommonAlertSchema(false)
.build(),
EmailReceiverArgs.builder()
.emailAddress("janesmith@email.com")
.name("Jane Smith's email")
.useCommonAlertSchema(true)
.build())
.enabled(true)
.groupShortName("sample")
.location("Global")
.managementGroupId("72f988bf-86f1-41af-91ab-2d7cd011db47")
.smsReceivers(
SmsReceiverArgs.builder()
.countryCode("1")
.name("John Doe's mobile")
.phoneNumber("2062022299")
.build(),
SmsReceiverArgs.builder()
.countryCode("1")
.name("Jane Smith's mobile")
.phoneNumber("0987654321")
.build())
.tags(Map.ofEntries(
))
.tenantActionGroupName("testTenantActionGroup")
.voiceReceivers(VoiceReceiverArgs.builder()
.countryCode("1")
.name("Sample voice")
.phoneNumber("2062022299")
.build())
.webhookReceivers(
WebhookReceiverArgs.builder()
.name("Sample webhook 1")
.serviceUri("http://www.example.com/webhook1")
.useCommonAlertSchema(true)
.build(),
WebhookReceiverArgs.builder()
.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)
.build())
.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:monitor:TenantActionGroup testTenantActionGroup /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}
Content copied to clipboard
Properties
Link copied to clipboard
The Azure API version of the resource.
Link copied to clipboard
The list of AzureAppPush receivers that are part of this tenant action group.
Link copied to clipboard
The list of email receivers that are part of this tenant action group.
Link copied to clipboard
The short name of the action group. This will be used in SMS messages.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The list of SMS receivers that are part of this tenant action group.
Link copied to clipboard
The list of voice receivers that are part of this tenant action group.
Link copied to clipboard
The list of webhook receivers that are part of this tenant action group.