SignalR

class SignalR : KotlinCustomResource

A class represent a resource. Uses Azure REST API version 2023-02-01. In version 1.x of the Azure Native provider, it used API version 2020-05-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

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",
},
},
DisableAadAuth = false,
DisableLocalAuth = false,
Features = new[]
{
new AzureNative.SignalRService.Inputs.SignalRFeatureArgs
{
Flag = AzureNative.SignalRService.FeatureFlags.ServiceMode,
Properties = null,
Value = "Serverless",
},
new AzureNative.SignalRService.Inputs.SignalRFeatureArgs
{
Flag = AzureNative.SignalRService.FeatureFlags.EnableConnectivityLogs,
Properties = null,
Value = "True",
},
new AzureNative.SignalRService.Inputs.SignalRFeatureArgs
{
Flag = AzureNative.SignalRService.FeatureFlags.EnableMessagingLogs,
Properties = null,
Value = "False",
},
new AzureNative.SignalRService.Inputs.SignalRFeatureArgs
{
Flag = AzureNative.SignalRService.FeatureFlags.EnableLiveTrace,
Properties = null,
Value = "False",
},
},
Identity = new AzureNative.SignalRService.Inputs.ManagedIdentityArgs
{
Type = AzureNative.SignalRService.ManagedIdentityType.SystemAssigned,
},
Kind = AzureNative.SignalRService.ServiceKind.SignalR,
LiveTraceConfiguration = new AzureNative.SignalRService.Inputs.LiveTraceConfigurationArgs
{
Categories = new[]
{
new AzureNative.SignalRService.Inputs.LiveTraceCategoryArgs
{
Enabled = "true",
Name = "ConnectivityLogs",
},
},
Enabled = "false",
},
Location = "eastus",
NetworkACLs = new AzureNative.SignalRService.Inputs.SignalRNetworkACLsArgs
{
DefaultAction = AzureNative.SignalRService.ACLAction.Deny,
PrivateEndpoints = new[]
{
new AzureNative.SignalRService.Inputs.PrivateEndpointACLArgs
{
Allow = new[]
{
AzureNative.SignalRService.SignalRRequestType.ServerConnection,
},
Name = "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
},
},
PublicNetwork = new AzureNative.SignalRService.Inputs.NetworkACLArgs
{
Allow = new[]
{
AzureNative.SignalRService.SignalRRequestType.ClientConnection,
},
},
},
PublicNetworkAccess = "Enabled",
ResourceGroupName = "myResourceGroup",
ResourceName = "mySignalRService",
Serverless = new AzureNative.SignalRService.Inputs.ServerlessSettingsArgs
{
ConnectionTimeoutInSeconds = 5,
},
Sku = new AzureNative.SignalRService.Inputs.ResourceSkuArgs
{
Capacity = 1,
Name = "Premium_P1",
Tier = AzureNative.SignalRService.SignalRSkuTier.Premium,
},
Tags =
{
{ "key1", "value1" },
},
Tls = new AzureNative.SignalRService.Inputs.SignalRTlsSettingsArgs
{
ClientCertEnabled = false,
},
Upstream = new AzureNative.SignalRService.Inputs.ServerlessUpstreamSettingsArgs
{
Templates = new[]
{
new AzureNative.SignalRService.Inputs.UpstreamTemplateArgs
{
Auth = new AzureNative.SignalRService.Inputs.UpstreamAuthSettingsArgs
{
ManagedIdentity = new AzureNative.SignalRService.Inputs.ManagedIdentitySettingsArgs
{
Resource = "api://example",
},
Type = AzureNative.SignalRService.UpstreamAuthType.ManagedIdentity,
},
CategoryPattern = "*",
EventPattern = "connect,disconnect",
HubPattern = "*",
UrlTemplate = "https://example.com/chat/api/connect",
},
},
},
});
});
package main
import (
signalrservice "github.com/pulumi/pulumi-azure-native-sdk/signalrservice/v2"
"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"),
},
},
DisableAadAuth: pulumi.Bool(false),
DisableLocalAuth: pulumi.Bool(false),
Features: signalrservice.SignalRFeatureArray{
&signalrservice.SignalRFeatureArgs{
Flag: pulumi.String(signalrservice.FeatureFlagsServiceMode),
Properties: pulumi.StringMap{},
Value: pulumi.String("Serverless"),
},
&signalrservice.SignalRFeatureArgs{
Flag: pulumi.String(signalrservice.FeatureFlagsEnableConnectivityLogs),
Properties: pulumi.StringMap{},
Value: pulumi.String("True"),
},
&signalrservice.SignalRFeatureArgs{
Flag: pulumi.String(signalrservice.FeatureFlagsEnableMessagingLogs),
Properties: pulumi.StringMap{},
Value: pulumi.String("False"),
},
&signalrservice.SignalRFeatureArgs{
Flag: pulumi.String(signalrservice.FeatureFlagsEnableLiveTrace),
Properties: pulumi.StringMap{},
Value: pulumi.String("False"),
},
},
Identity: &signalrservice.ManagedIdentityArgs{
Type: pulumi.String(signalrservice.ManagedIdentityTypeSystemAssigned),
},
Kind: pulumi.String(signalrservice.ServiceKindSignalR),
LiveTraceConfiguration: &signalrservice.LiveTraceConfigurationArgs{
Categories: signalrservice.LiveTraceCategoryArray{
&signalrservice.LiveTraceCategoryArgs{
Enabled: pulumi.String("true"),
Name: pulumi.String("ConnectivityLogs"),
},
},
Enabled: pulumi.String("false"),
},
Location: pulumi.String("eastus"),
NetworkACLs: &signalrservice.SignalRNetworkACLsArgs{
DefaultAction: pulumi.String(signalrservice.ACLActionDeny),
PrivateEndpoints: signalrservice.PrivateEndpointACLArray{
&signalrservice.PrivateEndpointACLArgs{
Allow: pulumi.StringArray{
pulumi.String(signalrservice.SignalRRequestTypeServerConnection),
},
Name: pulumi.String("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"),
},
},
PublicNetwork: &signalrservice.NetworkACLArgs{
Allow: pulumi.StringArray{
pulumi.String(signalrservice.SignalRRequestTypeClientConnection),
},
},
},
PublicNetworkAccess: pulumi.String("Enabled"),
ResourceGroupName: pulumi.String("myResourceGroup"),
ResourceName: pulumi.String("mySignalRService"),
Serverless: &signalrservice.ServerlessSettingsArgs{
ConnectionTimeoutInSeconds: pulumi.Int(5),
},
Sku: &signalrservice.ResourceSkuArgs{
Capacity: pulumi.Int(1),
Name: pulumi.String("Premium_P1"),
Tier: pulumi.String(signalrservice.SignalRSkuTierPremium),
},
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
Tls: &signalrservice.SignalRTlsSettingsArgs{
ClientCertEnabled: pulumi.Bool(false),
},
Upstream: &signalrservice.ServerlessUpstreamSettingsArgs{
Templates: signalrservice.UpstreamTemplateArray{
&signalrservice.UpstreamTemplateArgs{
Auth: &signalrservice.UpstreamAuthSettingsArgs{
ManagedIdentity: &signalrservice.ManagedIdentitySettingsArgs{
Resource: pulumi.String("api://example"),
},
Type: pulumi.String(signalrservice.UpstreamAuthTypeManagedIdentity),
},
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 com.pulumi.azurenative.signalrservice.inputs.SignalRCorsSettingsArgs;
import com.pulumi.azurenative.signalrservice.inputs.SignalRFeatureArgs;
import com.pulumi.azurenative.signalrservice.inputs.ManagedIdentityArgs;
import com.pulumi.azurenative.signalrservice.inputs.LiveTraceConfigurationArgs;
import com.pulumi.azurenative.signalrservice.inputs.SignalRNetworkACLsArgs;
import com.pulumi.azurenative.signalrservice.inputs.NetworkACLArgs;
import com.pulumi.azurenative.signalrservice.inputs.ServerlessSettingsArgs;
import com.pulumi.azurenative.signalrservice.inputs.ResourceSkuArgs;
import com.pulumi.azurenative.signalrservice.inputs.SignalRTlsSettingsArgs;
import com.pulumi.azurenative.signalrservice.inputs.ServerlessUpstreamSettingsArgs;
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(SignalRCorsSettingsArgs.builder()
.allowedOrigins(
"https://foo.com",
"https://bar.com")
.build())
.disableAadAuth(false)
.disableLocalAuth(false)
.features(
SignalRFeatureArgs.builder()
.flag("ServiceMode")
.properties()
.value("Serverless")
.build(),
SignalRFeatureArgs.builder()
.flag("EnableConnectivityLogs")
.properties()
.value("True")
.build(),
SignalRFeatureArgs.builder()
.flag("EnableMessagingLogs")
.properties()
.value("False")
.build(),
SignalRFeatureArgs.builder()
.flag("EnableLiveTrace")
.properties()
.value("False")
.build())
.identity(ManagedIdentityArgs.builder()
.type("SystemAssigned")
.build())
.kind("SignalR")
.liveTraceConfiguration(LiveTraceConfigurationArgs.builder()
.categories(LiveTraceCategoryArgs.builder()
.enabled("true")
.name("ConnectivityLogs")
.build())
.enabled("false")
.build())
.location("eastus")
.networkACLs(SignalRNetworkACLsArgs.builder()
.defaultAction("Deny")
.privateEndpoints(PrivateEndpointACLArgs.builder()
.allow("ServerConnection")
.name("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")
.build())
.publicNetwork(NetworkACLArgs.builder()
.allow("ClientConnection")
.build())
.build())
.publicNetworkAccess("Enabled")
.resourceGroupName("myResourceGroup")
.resourceName("mySignalRService")
.serverless(ServerlessSettingsArgs.builder()
.connectionTimeoutInSeconds(5)
.build())
.sku(ResourceSkuArgs.builder()
.capacity(1)
.name("Premium_P1")
.tier("Premium")
.build())
.tags(Map.of("key1", "value1"))
.tls(SignalRTlsSettingsArgs.builder()
.clientCertEnabled(false)
.build())
.upstream(ServerlessUpstreamSettingsArgs.builder()
.templates(UpstreamTemplateArgs.builder()
.auth(UpstreamAuthSettingsArgs.builder()
.managedIdentity(ManagedIdentitySettingsArgs.builder()
.resource("api://example")
.build())
.type("ManagedIdentity")
.build())
.categoryPattern("*")
.eventPattern("connect,disconnect")
.hubPattern("*")
.urlTemplate("https://example.com/chat/api/connect")
.build())
.build())
.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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}

Properties

Link copied to clipboard

Cross-Origin Resource Sharing (CORS) settings.

Link copied to clipboard
val disableAadAuth: Output<Boolean>?

DisableLocalAuth Enable or disable aad auth When set as true, connection with AuthType=aad won't work.

Link copied to clipboard

DisableLocalAuth Enable or disable local auth with AccessKey When set as true, connection with AccessKey=xxx won't work.

Link copied to clipboard
val externalIP: Output<String>

The publicly accessible IP of the resource.

Link copied to clipboard

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.

Link copied to clipboard
val hostName: Output<String>

FQDN of the service instance.

Link copied to clipboard
val hostNamePrefix: Output<String>

Deprecated.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

A class represent managed identities used for request and response

Link copied to clipboard
val kind: Output<String>?

The kind of the service, it can be SignalR or RawWebSockets

Link copied to clipboard

Live trace configuration of a Microsoft.SignalRService resource.

Link copied to clipboard
val location: Output<String>?

The GEO location of the resource. e.g. West US | East US | North Central US | South Central US.

Link copied to clipboard
val name: Output<String>

The name of the resource.

Link copied to clipboard

Network ACLs for the resource

Link copied to clipboard

Private endpoint connections to the resource.

Link copied to clipboard

Provisioning state of the resource.

Link copied to clipboard

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.

Link copied to clipboard
val publicPort: Output<Int>

The publicly accessible port of the resource which is designed for browser/client side usage.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Resource log configuration of a Microsoft.SignalRService resource.

Link copied to clipboard

Serverless settings.

Link copied to clipboard
val serverPort: Output<Int>

The publicly accessible port of the resource which is designed for customer server side usage.

Link copied to clipboard

The list of shared private link resources.

Link copied to clipboard
val sku: Output<ResourceSkuResponse>?

The billing information of the resource.

Link copied to clipboard

Metadata pertaining to creation and last modification of the resource.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Tags of the service which is a list of key value pairs that describe the resource.

Link copied to clipboard

TLS settings for the resource

Link copied to clipboard
val type: Output<String>

The type of the resource - e.g. "Microsoft.SignalRService/SignalR"

Link copied to clipboard

The settings for the Upstream when the service is in server-less mode.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<String>

Version of the resource. Probably you need the same or higher version of client SDKs.