Microsoft.SignalRService signalR

Template format

To create a Microsoft.SignalRService/signalR resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.SignalRService/signalR",
  "apiVersion": "2020-05-01",
  "location": "string",
  "tags": {},
  "sku": {
    "name": "string",
    "tier": "string",
    "size": "string",
    "family": "string",
    "capacity": "integer"
  },
  "properties": {
    "hostNamePrefix": "string",
    "features": [
      {
        "flag": "string",
        "value": "string",
        "properties": {}
      }
    ],
    "cors": {
      "allowedOrigins": [
        "string"
      ]
    },
    "upstream": {
      "templates": [
        {
          "hubPattern": "string",
          "eventPattern": "string",
          "categoryPattern": "string",
          "urlTemplate": "string"
        }
      ]
    },
    "networkACLs": {
      "defaultAction": "string",
      "publicNetwork": {
        "allow": [
          "string"
        ],
        "deny": [
          "string"
        ]
      },
      "privateEndpoints": [
        {
          "allow": [
            "string"
          ],
          "deny": [
            "string"
          ],
          "name": "string"
        }
      ]
    }
  },
  "kind": "string",
  "resources": []
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.SignalRService/signalR object

Name Type Required Value
name string Yes The name of the SignalR resource.
type enum Yes Microsoft.SignalRService/signalR
apiVersion enum Yes 2020-05-01
location string No The GEO location of the SignalR service. e.g. West US, East US, North Central US, South Central US.
tags object No Tags of the service which is a list of key value pairs that describe the resource.
sku object No The billing information of the resource.(e.g. Free, Standard) - ResourceSku object
properties object Yes Settings used to provision or configure the resource - SignalRProperties object
kind enum No The kind of the service - e.g. "SignalR", or "RawWebSockets" for "Microsoft.SignalRService/SignalR". - SignalR or RawWebSockets
resources array No privateEndpointConnections

ResourceSku object

Name Type Required Value
name string Yes The name of the SKU. Required.



Allowed values: Standard_S1, Free_F1
tier enum No Optional tier of this particular SKU. 'Standard' or 'Free'.



Basic is deprecated, use Standard instead. - Free, Basic, Standard, Premium
size string No Optional string. For future use.
family string No Optional string. For future use.
capacity integer No Optional, integer. The unit count of SignalR resource. 1 by default.



If present, following values are allowed:

Free: 1

Standard: 1,2,5,10,20,50,100

SignalRProperties object

Name Type Required Value
hostNamePrefix string No Prefix for the hostName of the SignalR service. Retained for future use.

The hostname will be of format: <hostNamePrefix>.service.signalr.net.
features array No 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. - SignalRFeature object
cors object No Cross-Origin Resource Sharing (CORS) settings. - SignalRCorsSettings object
upstream object No Upstream settings when the Azure SignalR is in server-less mode. - ServerlessUpstreamSettings object
networkACLs object No Network ACLs - SignalRNetworkACLs object

SignalRFeature object

Name Type Required Value
flag enum Yes FeatureFlags is the supported features of Azure SignalR service.

- ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use.

- EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. - ServiceMode, EnableConnectivityLogs, EnableMessagingLogs
value string Yes Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for allowed values.
properties object No Optional properties related to this feature.

SignalRCorsSettings object

Name Type Required Value
allowedOrigins array No Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. If omitted, allow all by default. - string

ServerlessUpstreamSettings object

Name Type Required Value
templates array No Gets or sets the list of Upstream URL templates. Order matters, and the first matching template takes effects. - UpstreamTemplate object

SignalRNetworkACLs object

Name Type Required Value
defaultAction enum No Default action when no other rule matches. - Allow or Deny
publicNetwork object No ACL for requests from public network - NetworkACL object
privateEndpoints array No ACLs for requests from private endpoints - PrivateEndpointACL object

UpstreamTemplate object

Name Type Required Value
hubPattern string No Gets or sets the matching pattern for hub names. If not set, it matches any hub.

There are 3 kind of patterns supported:

1. "*", it to matches any hub name

2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2"

3. The single hub name, for example, "hub1", it matches "hub1"
eventPattern string No Gets or sets the matching pattern for event names. If not set, it matches any event.

There are 3 kind of patterns supported:

1. "*", it to matches any event name

2. Combine multiple events with ",", for example "connect,disconnect", it matches event "connect" and "disconnect"

3. The single event name, for example, "connect", it matches "connect"
categoryPattern string No Gets or sets the matching pattern for category names. If not set, it matches any category.

There are 3 kind of patterns supported:

1. "*", it to matches any category name

2. Combine multiple categories with ",", for example "connections,messages", it matches category "connections" and "messages"

3. The single category name, for example, "connections", it matches the category "connections"
urlTemplate string Yes Gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} {event} inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in.

For example, if the urlTemplate is http://example.com/{hub}/api/{event}, with a client request from hub chat connects, it will first POST to this URL: http://example.com/chat/api/connect.

NetworkACL object

Name Type Required Value
allow array No Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. - ClientConnection, ServerConnection, RESTAPI
deny array No Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. - ClientConnection, ServerConnection, RESTAPI

PrivateEndpointACL object

Name Type Required Value
allow array No Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. - ClientConnection, ServerConnection, RESTAPI
deny array No Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. - ClientConnection, ServerConnection, RESTAPI
name string Yes Name of the private endpoint connection

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Deploy an Azure SignalR service

Deploy to Azure
This template creates an Azure SignalR Service using a template.