Signal R
A class represent a SignalR service resource. API Version: 2020-05-01.
Example Usage
SignalR_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var signalR = new AzureNative.SignalRService.SignalR("signalR", new()
{
Cors = new AzureNative.SignalRService.Inputs.SignalRCorsSettingsArgs
{
AllowedOrigins = new[]
{
"https://foo.com",
"https://bar.com",
},
},
Features = new[]
{
new AzureNative.SignalRService.Inputs.SignalRFeatureArgs
{
Flag = "ServiceMode",
Properties = null,
Value = "Serverless",
},
new AzureNative.SignalRService.Inputs.SignalRFeatureArgs
{
Flag = "EnableConnectivityLogs",
Properties = null,
Value = "True",
},
new AzureNative.SignalRService.Inputs.SignalRFeatureArgs
{
Flag = "EnableMessagingLogs",
Properties = null,
Value = "False",
},
},
Kind = "SignalR",
Location = "eastus",
NetworkACLs = new AzureNative.SignalRService.Inputs.SignalRNetworkACLsArgs
{
DefaultAction = "Deny",
PrivateEndpoints = new[]
{
new AzureNative.SignalRService.Inputs.PrivateEndpointACLArgs
{
Allow = new[]
{
"ServerConnection",
},
Name = "mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
},
},
PublicNetwork = new AzureNative.SignalRService.Inputs.NetworkACLArgs
{
Allow = new[]
{
"ClientConnection",
},
},
},
ResourceGroupName = "myResourceGroup",
ResourceName = "mySignalRService",
Sku = new AzureNative.SignalRService.Inputs.ResourceSkuArgs
{
Capacity = 1,
Name = "Standard_S1",
Tier = "Standard",
},
Tags =
{
{ "key1", "value1" },
},
Upstream = new AzureNative.SignalRService.Inputs.ServerlessUpstreamSettingsArgs
{
Templates = new[]
{
new AzureNative.SignalRService.Inputs.UpstreamTemplateArgs
{
CategoryPattern = "*",
EventPattern = "connect,disconnect",
HubPattern = "*",
UrlTemplate = "https://example.com/chat/api/connect",
},
},
},
});
});
package main
import (
signalrservice "github.com/pulumi/pulumi-azure-native-sdk/signalrservice"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := signalrservice.NewSignalR(ctx, "signalR", &signalrservice.SignalRArgs{
Cors: &signalrservice.SignalRCorsSettingsArgs{
AllowedOrigins: pulumi.StringArray{
pulumi.String("https://foo.com"),
pulumi.String("https://bar.com"),
},
},
Features: []signalrservice.SignalRFeatureArgs{
{
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"),
},
},
Kind: pulumi.String("SignalR"),
Location: pulumi.String("eastus"),
NetworkACLs: signalrservice.SignalRNetworkACLsResponse{
DefaultAction: pulumi.String("Deny"),
PrivateEndpoints: signalrservice.PrivateEndpointACLArray{
&signalrservice.PrivateEndpointACLArgs{
Allow: pulumi.StringArray{
pulumi.String("ServerConnection"),
},
Name: pulumi.String("mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
},
},
PublicNetwork: &signalrservice.NetworkACLArgs{
Allow: pulumi.StringArray{
pulumi.String("ClientConnection"),
},
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
ResourceName: pulumi.String("mySignalRService"),
Sku: &signalrservice.ResourceSkuArgs{
Capacity: pulumi.Int(1),
Name: pulumi.String("Standard_S1"),
Tier: pulumi.String("Standard"),
},
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
Upstream: signalrservice.ServerlessUpstreamSettingsResponse{
Templates: signalrservice.UpstreamTemplateArray{
&signalrservice.UpstreamTemplateArgs{
CategoryPattern: pulumi.String("*"),
EventPattern: pulumi.String("connect,disconnect"),
HubPattern: pulumi.String("*"),
UrlTemplate: pulumi.String("https://example.com/chat/api/connect"),
},
},
},
})
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.signalrservice.SignalR;
import com.pulumi.azurenative.signalrservice.SignalRArgs;
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 signalR = new SignalR("signalR", SignalRArgs.builder()
.cors(Map.of("allowedOrigins",
"https://foo.com",
"https://bar.com"))
.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")
))
.kind("SignalR")
.location("eastus")
.networkACLs(Map.ofEntries(
Map.entry("defaultAction", "Deny"),
Map.entry("privateEndpoints", Map.ofEntries(
Map.entry("allow", "ServerConnection"),
Map.entry("name", "mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e")
)),
Map.entry("publicNetwork", Map.of("allow", "ClientConnection"))
))
.resourceGroupName("myResourceGroup")
.resourceName("mySignalRService")
.sku(Map.ofEntries(
Map.entry("capacity", 1),
Map.entry("name", "Standard_S1"),
Map.entry("tier", "Standard")
))
.tags(Map.of("key1", "value1"))
.upstream(Map.of("templates", Map.ofEntries(
Map.entry("categoryPattern", "*"),
Map.entry("eventPattern", "connect,disconnect"),
Map.entry("hubPattern", "*"),
Map.entry("urlTemplate", "https://example.com/chat/api/connect")
)))
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:signalrservice:SignalR mySignalRService /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService
Properties
Cross-Origin Resource Sharing (CORS) settings.
The publicly accessible IP of the SignalR service.
List of SignalR featureFlags. e.g. ServiceMode. 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, SignalR service will use its globally default value. But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags.
Prefix for the hostName of the SignalR service. Retained for future use. The hostname will be of format:
Network ACLs
Private endpoint connections to the SignalR resource.
Provisioning state of the resource.
The publicly accessible port of the SignalR service which is designed for browser/client side usage.
The publicly accessible port of the SignalR service which is designed for customer server side usage.
The billing information of the resource.(e.g. Free, Standard)
Upstream settings when the Azure SignalR is in server-less mode.