Signal RArgs
A class represent a resource. Uses Azure REST API version 2024-03-01. In version 2.x of the Azure Native provider, it used API version 2023-02-01. Other available API versions: 2023-02-01, 2023-03-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2024-01-01-preview, 2024-04-01-preview, 2024-08-01-preview, 2024-10-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native signalrservice [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
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}
Constructors
Properties
Cross-Origin Resource Sharing (CORS) settings.
DisableLocalAuth Enable or disable aad auth When set as true, connection with AuthType=aad won't work.
DisableLocalAuth Enable or disable local auth with AccessKey When set as true, connection with AccessKey=xxx won't work.
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.
A class represent managed identities used for request and response
The kind of the service
Live trace configuration of a Microsoft.SignalRService resource.
Network ACLs for 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.
Enable or disable the regional endpoint. Default to "Enabled". When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. This property is replica specific. Disable the regional endpoint without replica is not allowed.
The name of the resource group. The name is case insensitive.
Resource log configuration of a Microsoft.SignalRService resource.
The name of the resource.
Stop or start the resource. Default to "False". When it's true, the data plane of the resource is shutdown. When it's false, the data plane of the resource is started.
Serverless settings.
The billing information of the resource.
TLS settings for the resource
The settings for the Upstream when the service is in server-less mode.