Web Pub Sub Hub
A hub setting API Version: 2021-10-01.
Example Usage
WebPubSubHubs_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webPubSubHub = new AzureNative.WebPubSub.WebPubSubHub("webPubSubHub", new()
{
HubName = "exampleHub",
Properties = new AzureNative.WebPubSub.Inputs.WebPubSubHubPropertiesArgs
{
EventHandlers = new[]
{
new AzureNative.WebPubSub.Inputs.EventHandlerArgs
{
Auth = new AzureNative.WebPubSub.Inputs.UpstreamAuthSettingsArgs
{
ManagedIdentity = new AzureNative.WebPubSub.Inputs.ManagedIdentitySettingsArgs
{
Resource = "abc",
},
Type = "ManagedIdentity",
},
SystemEvents = new[]
{
"connect",
"connected",
},
UrlTemplate = "http://host.com",
UserEventPattern = "*",
},
},
},
ResourceGroupName = "myResourceGroup",
ResourceName = "myWebPubSubService",
});
});
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.webpubsub.WebPubSubHub;
import com.pulumi.azurenative.webpubsub.WebPubSubHubArgs;
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 webPubSubHub = new WebPubSubHub("webPubSubHub", WebPubSubHubArgs.builder()
.hubName("exampleHub")
.properties(Map.of("eventHandlers", Map.ofEntries(
Map.entry("auth", Map.ofEntries(
Map.entry("managedIdentity", Map.of("resource", "abc")),
Map.entry("type", "ManagedIdentity")
)),
Map.entry("systemEvents",
"connect",
"connected"),
Map.entry("urlTemplate", "http://host.com"),
Map.entry("userEventPattern", "*")
)))
.resourceGroupName("myResourceGroup")
.resourceName("myWebPubSubService")
.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:webpubsub:WebPubSubHub exampleHub /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/hubs/exampleHub
Content copied to clipboard