Notification Registration
/* /* /* The notification registration definition. API Version: 2020-11-20.
Example Usage
NotificationRegistrations_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var notificationRegistration = new AzureNative.ProviderHub.NotificationRegistration("notificationRegistration", new()
{
NotificationRegistrationName = "fooNotificationRegistration",
Properties = new AzureNative.ProviderHub.Inputs.NotificationRegistrationPropertiesArgs
{
IncludedEvents = new[]
{
"*/write",
"Microsoft.Contoso/employees/delete",
},
MessageScope = "RegisteredSubscriptions",
NotificationEndpoints = new[]
{
new AzureNative.ProviderHub.Inputs.NotificationEndpointArgs
{
Locations = new[]
{
"",
"East US",
},
NotificationDestination = "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications",
},
new AzureNative.ProviderHub.Inputs.NotificationEndpointArgs
{
Locations = new[]
{
"North Europe",
},
NotificationDestination = "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications",
},
},
NotificationMode = "EventHub",
},
ProviderNamespace = "Microsoft.Contoso",
});
});
Content copied to clipboard
package main
import (
providerhub "github.com/pulumi/pulumi-azure-native-sdk/providerhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := providerhub.NewNotificationRegistration(ctx, "notificationRegistration", &providerhub.NotificationRegistrationArgs{
NotificationRegistrationName: pulumi.String("fooNotificationRegistration"),
Properties: providerhub.NotificationRegistrationResponseProperties{
IncludedEvents: pulumi.StringArray{
pulumi.String("*/write"),
pulumi.String("Microsoft.Contoso/employees/delete"),
},
MessageScope: pulumi.String("RegisteredSubscriptions"),
NotificationEndpoints: providerhub.NotificationEndpointArray{
&providerhub.NotificationEndpointArgs{
Locations: pulumi.StringArray{
pulumi.String(""),
pulumi.String("East US"),
},
NotificationDestination: pulumi.String("/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications"),
},
&providerhub.NotificationEndpointArgs{
Locations: pulumi.StringArray{
pulumi.String("North Europe"),
},
NotificationDestination: pulumi.String("/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications"),
},
},
NotificationMode: pulumi.String("EventHub"),
},
ProviderNamespace: pulumi.String("Microsoft.Contoso"),
})
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.providerhub.NotificationRegistration;
import com.pulumi.azurenative.providerhub.NotificationRegistrationArgs;
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 notificationRegistration = new NotificationRegistration("notificationRegistration", NotificationRegistrationArgs.builder()
.notificationRegistrationName("fooNotificationRegistration")
.properties(Map.ofEntries(
Map.entry("includedEvents",
"*/write",
"Microsoft.Contoso/employees/delete"),
Map.entry("messageScope", "RegisteredSubscriptions"),
Map.entry("notificationEndpoints",
Map.ofEntries(
Map.entry("locations",
"",
"East US"),
Map.entry("notificationDestination", "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications")
),
Map.ofEntries(
Map.entry("locations", "North Europe"),
Map.entry("notificationDestination", "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications")
)),
Map.entry("notificationMode", "EventHub")
))
.providerNamespace("Microsoft.Contoso")
.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:providerhub:NotificationRegistration fooNotificationRegistration /subscriptions/ab7a8701-f7ef-471a-a2f4-d0ebbf494f77providers/Microsoft.ProviderHub/providerRegistrations/Microsoft.Contoso/notificationregistrations/fooNotificationRegistration
Content copied to clipboard