Web Pub Sub
A class represent a resource. API Version: 2021-04-01-preview.
Example Usage
WebPubSub_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webPubSub = new AzureNative.WebPubSub.WebPubSub("webPubSub", new()
{
EventHandler = new AzureNative.WebPubSub.Inputs.EventHandlerSettingsArgs
{
Items =
{
{ "hub1", new[]
{
new AzureNative.WebPubSub.Inputs.EventHandlerTemplateArgs
{
UrlTemplate = "https://example.com/chat/api/hub1",
UserEventPattern = "*",
},
} },
{ "hub2", new[]
{
new AzureNative.WebPubSub.Inputs.EventHandlerTemplateArgs
{
UrlTemplate = "https://example.com/chat/api/hub2/example1",
UserEventPattern = "example1",
},
new AzureNative.WebPubSub.Inputs.EventHandlerTemplateArgs
{
UrlTemplate = "https://example.com/chat/api/hub2/example2",
UserEventPattern = "example2",
},
} },
},
},
Features = new[]
{
new AzureNative.WebPubSub.Inputs.WebPubSubFeatureArgs
{
Flag = "ServiceMode",
Properties = null,
Value = "Serverless",
},
new AzureNative.WebPubSub.Inputs.WebPubSubFeatureArgs
{
Flag = "EnableConnectivityLogs",
Properties = null,
Value = "True",
},
new AzureNative.WebPubSub.Inputs.WebPubSubFeatureArgs
{
Flag = "EnableMessagingLogs",
Properties = null,
Value = "False",
},
new AzureNative.WebPubSub.Inputs.WebPubSubFeatureArgs
{
Flag = "EnableLiveTrace",
Properties = null,
Value = "False",
},
},
Identity = new AzureNative.WebPubSub.Inputs.ManagedIdentityArgs
{
Type = "SystemAssigned",
},
Location = "eastus",
NetworkACLs = new AzureNative.WebPubSub.Inputs.WebPubSubNetworkACLsArgs
{
DefaultAction = "Deny",
PrivateEndpoints = new[]
{
new AzureNative.WebPubSub.Inputs.PrivateEndpointACLArgs
{
Allow = new[]
{
"ServerConnection",
},
Name = "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
},
},
PublicNetwork = new AzureNative.WebPubSub.Inputs.NetworkACLArgs
{
Allow = new[]
{
"ClientConnection",
},
},
},
ResourceGroupName = "myResourceGroup",
ResourceName = "myWebPubSubService",
Sku = new AzureNative.WebPubSub.Inputs.ResourceSkuArgs
{
Capacity = 1,
Name = "Standard_S1",
Tier = "Standard",
},
Tags =
{
{ "key1", "value1" },
},
Tls = new AzureNative.WebPubSub.Inputs.WebPubSubTlsSettingsArgs
{
ClientCertEnabled = false,
},
});
});
package main
import (
webpubsub "github.com/pulumi/pulumi-azure-native-sdk/webpubsub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := webpubsub.NewWebPubSub(ctx, "webPubSub", &webpubsub.WebPubSubArgs{
EventHandler: webpubsub.EventHandlerSettingsResponse{
Items: webpubsub.EventHandlerTemplateArrayMap{
"hub1": webpubsub.EventHandlerTemplateArray{
&webpubsub.EventHandlerTemplateArgs{
UrlTemplate: pulumi.String("https://example.com/chat/api/hub1"),
UserEventPattern: pulumi.String("*"),
},
},
"hub2": webpubsub.EventHandlerTemplateArray{
&webpubsub.EventHandlerTemplateArgs{
UrlTemplate: pulumi.String("https://example.com/chat/api/hub2/example1"),
UserEventPattern: pulumi.String("example1"),
},
&webpubsub.EventHandlerTemplateArgs{
UrlTemplate: pulumi.String("https://example.com/chat/api/hub2/example2"),
UserEventPattern: pulumi.String("example2"),
},
},
},
},
Features: []webpubsub.WebPubSubFeatureArgs{
{
Flag: pulumi.String("ServiceMode"),
Properties: nil,
Value: pulumi.String("Serverless"),
},
{
Flag: pulumi.String("EnableConnectivityLogs"),
Properties: nil,
Value: pulumi.String("True"),
},
{
Flag: pulumi.String("EnableMessagingLogs"),
Properties: nil,
Value: pulumi.String("False"),
},
{
Flag: pulumi.String("EnableLiveTrace"),
Properties: nil,
Value: pulumi.String("False"),
},
},
Identity: &webpubsub.ManagedIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
Location: pulumi.String("eastus"),
NetworkACLs: webpubsub.WebPubSubNetworkACLsResponse{
DefaultAction: pulumi.String("Deny"),
PrivateEndpoints: webpubsub.PrivateEndpointACLArray{
&webpubsub.PrivateEndpointACLArgs{
Allow: pulumi.StringArray{
pulumi.String("ServerConnection"),
},
Name: pulumi.String("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
},
},
PublicNetwork: &webpubsub.NetworkACLArgs{
Allow: pulumi.StringArray{
pulumi.String("ClientConnection"),
},
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
ResourceName: pulumi.String("myWebPubSubService"),
Sku: &webpubsub.ResourceSkuArgs{
Capacity: pulumi.Int(1),
Name: pulumi.String("Standard_S1"),
Tier: pulumi.String("Standard"),
},
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
Tls: &webpubsub.WebPubSubTlsSettingsArgs{
ClientCertEnabled: pulumi.Bool(false),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.webpubsub.WebPubSub;
import com.pulumi.azurenative.webpubsub.WebPubSubArgs;
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 webPubSub = new WebPubSub("webPubSub", WebPubSubArgs.builder()
.eventHandler(Map.of("items", Map.ofEntries(
Map.entry("hub1", Map.ofEntries(
Map.entry("urlTemplate", "https://example.com/chat/api/hub1"),
Map.entry("userEventPattern", "*")
)),
Map.entry("hub2",
Map.ofEntries(
Map.entry("urlTemplate", "https://example.com/chat/api/hub2/example1"),
Map.entry("userEventPattern", "example1")
),
Map.ofEntries(
Map.entry("urlTemplate", "https://example.com/chat/api/hub2/example2"),
Map.entry("userEventPattern", "example2")
))
)))
.features(
Map.ofEntries(
Map.entry("flag", "ServiceMode"),
Map.entry("properties", ),
Map.entry("value", "Serverless")
),
Map.ofEntries(
Map.entry("flag", "EnableConnectivityLogs"),
Map.entry("properties", ),
Map.entry("value", "True")
),
Map.ofEntries(
Map.entry("flag", "EnableMessagingLogs"),
Map.entry("properties", ),
Map.entry("value", "False")
),
Map.ofEntries(
Map.entry("flag", "EnableLiveTrace"),
Map.entry("properties", ),
Map.entry("value", "False")
))
.identity(Map.of("type", "SystemAssigned"))
.location("eastus")
.networkACLs(Map.ofEntries(
Map.entry("defaultAction", "Deny"),
Map.entry("privateEndpoints", Map.ofEntries(
Map.entry("allow", "ServerConnection"),
Map.entry("name", "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")
)),
Map.entry("publicNetwork", Map.of("allow", "ClientConnection"))
))
.resourceGroupName("myResourceGroup")
.resourceName("myWebPubSubService")
.sku(Map.ofEntries(
Map.entry("capacity", 1),
Map.entry("name", "Standard_S1"),
Map.entry("tier", "Standard")
))
.tags(Map.of("key1", "value1"))
.tls(Map.of("clientCertEnabled", false))
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:webpubsub:WebPubSub myWebPubSubService /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService
Properties
The settings for event handler in webpubsub service.
The publicly accessible IP of the resource.
List of the featureFlags. FeatureFlags that are not included in the parameters for the update operation will not be modified. And the response will only include featureFlags that are explicitly set. When a featureFlag is not explicitly set, its globally default value will be used But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags.
The managed identity response
Network ACLs
Private endpoint connections to the resource.
Provisioning state of the resource.
Enable or disable public network access. Default to "Enabled". When it's Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what you set in network ACLs.
The publicly accessible port of the resource which is designed for browser/client side usage.
The publicly accessible port of the resource which is designed for customer server side usage.
The list of shared private link resources.
The billing information of the resource.(e.g. Free, Standard)
Metadata pertaining to creation and last modification of the resource.
TLS settings.