Web Pub Sub Hub Args
data class WebPubSubHubArgs(val hubName: Output<String>? = null, val properties: Output<WebPubSubHubPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val resourceName: Output<String>? = null) : ConvertibleToJava<WebPubSubHubArgs>
A hub setting Uses Azure REST API version 2023-02-01. In version 1.x of the Azure Native provider, it used API version 2021-10-01. Other available API versions: 2023-03-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2024-01-01-preview, 2024-03-01, 2024-04-01-preview, 2024-08-01-preview, 2024-10-01-preview.
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
{
AnonymousConnectPolicy = "allow",
EventHandlers = new[]
{
new AzureNative.WebPubSub.Inputs.EventHandlerArgs
{
Auth = new AzureNative.WebPubSub.Inputs.UpstreamAuthSettingsArgs
{
ManagedIdentity = new AzureNative.WebPubSub.Inputs.ManagedIdentitySettingsArgs
{
Resource = "abc",
},
Type = AzureNative.WebPubSub.UpstreamAuthType.ManagedIdentity,
},
SystemEvents = new[]
{
"connect",
"connected",
},
UrlTemplate = "http://host.com",
UserEventPattern = "*",
},
},
EventListeners = new[]
{
new AzureNative.WebPubSub.Inputs.EventListenerArgs
{
Endpoint = new AzureNative.WebPubSub.Inputs.EventHubEndpointArgs
{
EventHubName = "eventHubName1",
FullyQualifiedNamespace = "example.servicebus.windows.net",
Type = "EventHub",
},
Filter = new AzureNative.WebPubSub.Inputs.EventNameFilterArgs
{
SystemEvents = new[]
{
"connected",
"disconnected",
},
Type = "EventName",
UserEventPattern = "*",
},
},
},
},
ResourceGroupName = "myResourceGroup",
ResourceName = "myWebPubSubService",
});
});
Content copied to clipboard
package main
import (
webpubsub "github.com/pulumi/pulumi-azure-native-sdk/webpubsub/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := webpubsub.NewWebPubSubHub(ctx, "webPubSubHub", &webpubsub.WebPubSubHubArgs{
HubName: pulumi.String("exampleHub"),
Properties: &webpubsub.WebPubSubHubPropertiesArgs{
AnonymousConnectPolicy: pulumi.String("allow"),
EventHandlers: webpubsub.EventHandlerArray{
&webpubsub.EventHandlerArgs{
Auth: &webpubsub.UpstreamAuthSettingsArgs{
ManagedIdentity: &webpubsub.ManagedIdentitySettingsArgs{
Resource: pulumi.String("abc"),
},
Type: pulumi.String(webpubsub.UpstreamAuthTypeManagedIdentity),
},
SystemEvents: pulumi.StringArray{
pulumi.String("connect"),
pulumi.String("connected"),
},
UrlTemplate: pulumi.String("http://host.com"),
UserEventPattern: pulumi.String("*"),
},
},
EventListeners: webpubsub.EventListenerArray{
&webpubsub.EventListenerArgs{
Endpoint: &webpubsub.EventHubEndpointArgs{
EventHubName: pulumi.String("eventHubName1"),
FullyQualifiedNamespace: pulumi.String("example.servicebus.windows.net"),
Type: pulumi.String("EventHub"),
},
Filter: &webpubsub.EventNameFilterArgs{
SystemEvents: pulumi.StringArray{
pulumi.String("connected"),
pulumi.String("disconnected"),
},
Type: pulumi.String("EventName"),
UserEventPattern: pulumi.String("*"),
},
},
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
ResourceName: pulumi.String("myWebPubSubService"),
})
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.webpubsub.WebPubSubHub;
import com.pulumi.azurenative.webpubsub.WebPubSubHubArgs;
import com.pulumi.azurenative.webpubsub.inputs.WebPubSubHubPropertiesArgs;
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(WebPubSubHubPropertiesArgs.builder()
.anonymousConnectPolicy("allow")
.eventHandlers(EventHandlerArgs.builder()
.auth(UpstreamAuthSettingsArgs.builder()
.managedIdentity(ManagedIdentitySettingsArgs.builder()
.resource("abc")
.build())
.type("ManagedIdentity")
.build())
.systemEvents(
"connect",
"connected")
.urlTemplate("http://host.com")
.userEventPattern("*")
.build())
.eventListeners(EventListenerArgs.builder()
.endpoint(EventHubEndpointArgs.builder()
.eventHubName("eventHubName1")
.fullyQualifiedNamespace("example.servicebus.windows.net")
.type("EventHub")
.build())
.filter(EventNameFilterArgs.builder()
.systemEvents(
"connected",
"disconnected")
.type("EventName")
.userEventPattern("*")
.build())
.build())
.build())
.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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(hubName: Output<String>? = null, properties: Output<WebPubSubHubPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, resourceName: Output<String>? = null)