Microsoft.SignalRService webPubSub 2021-06-01-preview

Bicep resource definition

The webPubSub resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.SignalRService/webPubSub resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.SignalRService/webPubSub@2021-06-01-preview' = {
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  location: 'string'
  name: 'string'
  properties: {
    diagnosticConfiguration: {
      enableConnectivityLogs: 'string'
      enableLiveTrace: 'string'
      enableMessagingLogs: 'string'
    }
    disableAadAuth: bool
    disableLocalAuth: bool
    eventHandler: {
      items: {
        {customized property}: [
          {
            auth: {
              managedIdentity: {
                resource: 'string'
              }
              type: 'string'
            }
            systemEventPattern: 'string'
            urlTemplate: 'string'
            userEventPattern: 'string'
          }
        ]
      }
    }
    networkACLs: {
      defaultAction: 'string'
      privateEndpoints: [
        {
          allow: [
            'string'
          ]
          deny: [
            'string'
          ]
          name: 'string'
        }
      ]
      publicNetwork: {
        allow: [
          'string'
        ]
        deny: [
          'string'
        ]
      }
    }
    publicNetworkAccess: 'string'
    tls: {
      clientCertEnabled: bool
    }
  }
  sku: {
    capacity: int
    name: 'string'
    tier: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

Property values

DiagnosticConfiguration

Name Description Value
enableConnectivityLogs Indicate whether or not enable Connectivity logs.
Available values: Enabled, Disabled.
Case insensitive.
string
enableLiveTrace Indicate whether or not enable Live Trace.
Available values: Enabled, Disabled.
Case insensitive.
Live Trace allows you to know what's happening inside Azure SignalR service, it will give you live traces in real time, it will be helpful when you developing your own Azure SignalR based web application or self-troubleshooting some issues.
string
enableMessagingLogs Indicate whether or not enable Messaging logs.
Available values: Enabled, Disabled.
Case insensitive.
string

EventHandlerSettings

Name Description Value
items Get or set the EventHandler items. The key is the hub name and the value is the corresponding EventHandlerTemplate. EventHandlerSettingsItems

EventHandlerSettingsItems

Name Description Value

EventHandlerTemplate

Name Description Value
auth Gets or sets the auth settings for an event handler. If not set, no auth is used. UpstreamAuthSettings
systemEventPattern Gets ot sets the system event pattern.
There are 2 kind of patterns supported:
1. The single event name, for example, "connect", it matches "connect"
2. Combine multiple events with ",", for example "connect,disconnected", it matches event "connect" and "disconnected"
string
urlTemplate Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
For example, UrlTemplate can be http://example.com/api/{hub}/{event}. The host part can't contains parameters.
string (required)
userEventPattern Gets or sets the matching pattern for event names.
There are 3 kind of patterns supported:
1. "*", it to matches any event name
2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
3. The single event name, for example, "event1", it matches "event1"
string

ManagedIdentity

Name Description Value
type Represent the identity type: systemAssigned, userAssigned, None 'None'
'SystemAssigned'
'UserAssigned'
userAssignedIdentities Get or set the user assigned identities ManagedIdentityUserAssignedIdentities

ManagedIdentitySettings

Name Description Value
resource The Resource indicating the App ID URI of the target resource.
It also appears in the aud (audience) claim of the issued token.
string

ManagedIdentityUserAssignedIdentities

Name Description Value

Microsoft.SignalRService/webPubSub

Name Description Value
identity The managed identity response ManagedIdentity
location The GEO location of the resource. e.g. West US East US North Central US South Central US. string
name The resource name string (required)
properties Settings used to provision or configure the resource WebPubSubProperties
sku The billing information of the resource.(e.g. Free, Standard) ResourceSku
tags Resource tags Dictionary of tag names and values. See Tags in templates

NetworkACL

Name Description Value
allow Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
deny Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'

PrivateEndpointACL

Name Description Value
allow Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
deny Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
name Name of the private endpoint connection string (required)

ResourceSku

Name Description Value
capacity Optional, integer. The unit count of the resource. 1 by default.

If present, following values are allowed:
Free: 1
Standard: 1,2,5,10,20,50,100
int
name The name of the SKU. Required.

Allowed values: Standard_S1, Free_F1
string (required)
tier Optional tier of this particular SKU. 'Standard' or 'Free'.

Basic is deprecated, use Standard instead.
'Basic'
'Free'
'Premium'
'Standard'

TrackedResourceTags

Name Description Value

UpstreamAuthSettings

Name Description Value
managedIdentity Gets or sets the managed identity settings. It's required if the auth type is set to ManagedIdentity. ManagedIdentitySettings
type Gets or sets the type of auth. None or ManagedIdentity is supported now. 'ManagedIdentity'
'None'

UserAssignedIdentityProperty

Name Description Value

WebPubSubNetworkACLs

Name Description Value
defaultAction Default action when no other rule matches 'Allow'
'Deny'
privateEndpoints ACLs for requests from private endpoints PrivateEndpointACL[]
publicNetwork ACL for requests from public network NetworkACL

WebPubSubProperties

Name Description Value
diagnosticConfiguration Diagnostic configuration of a Microsoft.SignalRService resource. Used together with Azure monitor DiagnosticSettings. DiagnosticConfiguration
disableAadAuth DisableLocalAuth
Enable or disable aad auth
When set as true, connection with AuthType=aad won't work.
bool
disableLocalAuth DisableLocalAuth
Enable or disable local auth with AccessKey
When set as true, connection with AccessKey=xxx won't work.
bool
eventHandler The settings for event handler in webpubsub service. EventHandlerSettings
networkACLs Network ACLs WebPubSubNetworkACLs
publicNetworkAccess 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.
string
tls TLS settings. WebPubSubTlsSettings

WebPubSubTlsSettings

Name Description Value
clientCertEnabled Request client certificate during TLS handshake if enabled bool

Quickstart samples

The following quickstart samples deploy this resource type.

Bicep File Description
Create Azure Web PubSub by using Bicep Azure Web PubSub Service helps you build real-time messaging web applications using WebSockets and the publish-subscribe pattern. This uses Bicep language to create and configure a Web PubSub resource. You can use this template to conveniently deploy Web PubSub for a tutorial or testing, or as a building block for more complex deployments with Web PubSub.

ARM template resource definition

The webPubSub resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.SignalRService/webPubSub resource, add the following JSON to your template.

{
  "type": "Microsoft.SignalRService/webPubSub",
  "apiVersion": "2021-06-01-preview",
  "name": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
      }
    }
  },
  "location": "string",
  "properties": {
    "diagnosticConfiguration": {
      "enableConnectivityLogs": "string",
      "enableLiveTrace": "string",
      "enableMessagingLogs": "string"
    },
    "disableAadAuth": "bool",
    "disableLocalAuth": "bool",
    "eventHandler": {
      "items": {
        "{customized property}": [
          {
            "auth": {
              "managedIdentity": {
                "resource": "string"
              },
              "type": "string"
            },
            "systemEventPattern": "string",
            "urlTemplate": "string",
            "userEventPattern": "string"
          }
        ]
      }
    },
    "networkACLs": {
      "defaultAction": "string",
      "privateEndpoints": [
        {
          "allow": [ "string" ],
          "deny": [ "string" ],
          "name": "string"
        }
      ],
      "publicNetwork": {
        "allow": [ "string" ],
        "deny": [ "string" ]
      }
    },
    "publicNetworkAccess": "string",
    "tls": {
      "clientCertEnabled": "bool"
    }
  },
  "sku": {
    "capacity": "int",
    "name": "string",
    "tier": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property values

DiagnosticConfiguration

Name Description Value
enableConnectivityLogs Indicate whether or not enable Connectivity logs.
Available values: Enabled, Disabled.
Case insensitive.
string
enableLiveTrace Indicate whether or not enable Live Trace.
Available values: Enabled, Disabled.
Case insensitive.
Live Trace allows you to know what's happening inside Azure SignalR service, it will give you live traces in real time, it will be helpful when you developing your own Azure SignalR based web application or self-troubleshooting some issues.
string
enableMessagingLogs Indicate whether or not enable Messaging logs.
Available values: Enabled, Disabled.
Case insensitive.
string

EventHandlerSettings

Name Description Value
items Get or set the EventHandler items. The key is the hub name and the value is the corresponding EventHandlerTemplate. EventHandlerSettingsItems

EventHandlerSettingsItems

Name Description Value

EventHandlerTemplate

Name Description Value
auth Gets or sets the auth settings for an event handler. If not set, no auth is used. UpstreamAuthSettings
systemEventPattern Gets ot sets the system event pattern.
There are 2 kind of patterns supported:
1. The single event name, for example, "connect", it matches "connect"
2. Combine multiple events with ",", for example "connect,disconnected", it matches event "connect" and "disconnected"
string
urlTemplate Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
For example, UrlTemplate can be http://example.com/api/{hub}/{event}. The host part can't contains parameters.
string (required)
userEventPattern Gets or sets the matching pattern for event names.
There are 3 kind of patterns supported:
1. "*", it to matches any event name
2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
3. The single event name, for example, "event1", it matches "event1"
string

ManagedIdentity

Name Description Value
type Represent the identity type: systemAssigned, userAssigned, None 'None'
'SystemAssigned'
'UserAssigned'
userAssignedIdentities Get or set the user assigned identities ManagedIdentityUserAssignedIdentities

ManagedIdentitySettings

Name Description Value
resource The Resource indicating the App ID URI of the target resource.
It also appears in the aud (audience) claim of the issued token.
string

ManagedIdentityUserAssignedIdentities

Name Description Value

Microsoft.SignalRService/webPubSub

Name Description Value
apiVersion The api version '2021-06-01-preview'
identity The managed identity response ManagedIdentity
location The GEO location of the resource. e.g. West US East US North Central US South Central US. string
name The resource name string (required)
properties Settings used to provision or configure the resource WebPubSubProperties
sku The billing information of the resource.(e.g. Free, Standard) ResourceSku
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.SignalRService/webPubSub'

NetworkACL

Name Description Value
allow Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
deny Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'

PrivateEndpointACL

Name Description Value
allow Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
deny Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
name Name of the private endpoint connection string (required)

ResourceSku

Name Description Value
capacity Optional, integer. The unit count of the resource. 1 by default.

If present, following values are allowed:
Free: 1
Standard: 1,2,5,10,20,50,100
int
name The name of the SKU. Required.

Allowed values: Standard_S1, Free_F1
string (required)
tier Optional tier of this particular SKU. 'Standard' or 'Free'.

Basic is deprecated, use Standard instead.
'Basic'
'Free'
'Premium'
'Standard'

TrackedResourceTags

Name Description Value

UpstreamAuthSettings

Name Description Value
managedIdentity Gets or sets the managed identity settings. It's required if the auth type is set to ManagedIdentity. ManagedIdentitySettings
type Gets or sets the type of auth. None or ManagedIdentity is supported now. 'ManagedIdentity'
'None'

UserAssignedIdentityProperty

Name Description Value

WebPubSubNetworkACLs

Name Description Value
defaultAction Default action when no other rule matches 'Allow'
'Deny'
privateEndpoints ACLs for requests from private endpoints PrivateEndpointACL[]
publicNetwork ACL for requests from public network NetworkACL

WebPubSubProperties

Name Description Value
diagnosticConfiguration Diagnostic configuration of a Microsoft.SignalRService resource. Used together with Azure monitor DiagnosticSettings. DiagnosticConfiguration
disableAadAuth DisableLocalAuth
Enable or disable aad auth
When set as true, connection with AuthType=aad won't work.
bool
disableLocalAuth DisableLocalAuth
Enable or disable local auth with AccessKey
When set as true, connection with AccessKey=xxx won't work.
bool
eventHandler The settings for event handler in webpubsub service. EventHandlerSettings
networkACLs Network ACLs WebPubSubNetworkACLs
publicNetworkAccess 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.
string
tls TLS settings. WebPubSubTlsSettings

WebPubSubTlsSettings

Name Description Value
clientCertEnabled Request client certificate during TLS handshake if enabled bool

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create Azure Web PubSub by using Bicep

Deploy to Azure
Azure Web PubSub Service helps you build real-time messaging web applications using WebSockets and the publish-subscribe pattern. This uses Bicep language to create and configure a Web PubSub resource. You can use this template to conveniently deploy Web PubSub for a tutorial or testing, or as a building block for more complex deployments with Web PubSub.

Terraform (AzAPI provider) resource definition

The webPubSub resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.SignalRService/webPubSub resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.SignalRService/webPubSub@2021-06-01-preview"
  name = "string"
  identity = {
    type = "string"
    userAssignedIdentities = {
      {customized property} = {
      }
    }
  }
  location = "string"
  body = jsonencode({
    properties = {
      diagnosticConfiguration = {
        enableConnectivityLogs = "string"
        enableLiveTrace = "string"
        enableMessagingLogs = "string"
      }
      disableAadAuth = bool
      disableLocalAuth = bool
      eventHandler = {
        items = {
          {customized property} = [
            {
              auth = {
                managedIdentity = {
                  resource = "string"
                }
                type = "string"
              }
              systemEventPattern = "string"
              urlTemplate = "string"
              userEventPattern = "string"
            }
          ]
        }
      }
      networkACLs = {
        defaultAction = "string"
        privateEndpoints = [
          {
            allow = [
              "string"
            ]
            deny = [
              "string"
            ]
            name = "string"
          }
        ]
        publicNetwork = {
          allow = [
            "string"
          ]
          deny = [
            "string"
          ]
        }
      }
      publicNetworkAccess = "string"
      tls = {
        clientCertEnabled = bool
      }
    }
  })
  sku = {
    capacity = int
    name = "string"
    tier = "string"
  }
  tags = {
    {customized property} = "string"
  }
}

Property values

DiagnosticConfiguration

Name Description Value
enableConnectivityLogs Indicate whether or not enable Connectivity logs.
Available values: Enabled, Disabled.
Case insensitive.
string
enableLiveTrace Indicate whether or not enable Live Trace.
Available values: Enabled, Disabled.
Case insensitive.
Live Trace allows you to know what's happening inside Azure SignalR service, it will give you live traces in real time, it will be helpful when you developing your own Azure SignalR based web application or self-troubleshooting some issues.
string
enableMessagingLogs Indicate whether or not enable Messaging logs.
Available values: Enabled, Disabled.
Case insensitive.
string

EventHandlerSettings

Name Description Value
items Get or set the EventHandler items. The key is the hub name and the value is the corresponding EventHandlerTemplate. EventHandlerSettingsItems

EventHandlerSettingsItems

Name Description Value

EventHandlerTemplate

Name Description Value
auth Gets or sets the auth settings for an event handler. If not set, no auth is used. UpstreamAuthSettings
systemEventPattern Gets ot sets the system event pattern.
There are 2 kind of patterns supported:
1. The single event name, for example, "connect", it matches "connect"
2. Combine multiple events with ",", for example "connect,disconnected", it matches event "connect" and "disconnected"
string
urlTemplate Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
For example, UrlTemplate can be http://example.com/api/{hub}/{event}. The host part can't contains parameters.
string (required)
userEventPattern Gets or sets the matching pattern for event names.
There are 3 kind of patterns supported:
1. "*", it to matches any event name
2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
3. The single event name, for example, "event1", it matches "event1"
string

ManagedIdentity

Name Description Value
type Represent the identity type: systemAssigned, userAssigned, None 'None'
'SystemAssigned'
'UserAssigned'
userAssignedIdentities Get or set the user assigned identities ManagedIdentityUserAssignedIdentities

ManagedIdentitySettings

Name Description Value
resource The Resource indicating the App ID URI of the target resource.
It also appears in the aud (audience) claim of the issued token.
string

ManagedIdentityUserAssignedIdentities

Name Description Value

Microsoft.SignalRService/webPubSub

Name Description Value
identity The managed identity response ManagedIdentity
location The GEO location of the resource. e.g. West US East US North Central US South Central US. string
name The resource name string (required)
properties Settings used to provision or configure the resource WebPubSubProperties
sku The billing information of the resource.(e.g. Free, Standard) ResourceSku
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.SignalRService/webPubSub@2021-06-01-preview"

NetworkACL

Name Description Value
allow Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
deny Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'

PrivateEndpointACL

Name Description Value
allow Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
deny Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. String array containing any of:
'ClientConnection'
'RESTAPI'
'ServerConnection'
'Trace'
name Name of the private endpoint connection string (required)

ResourceSku

Name Description Value
capacity Optional, integer. The unit count of the resource. 1 by default.

If present, following values are allowed:
Free: 1
Standard: 1,2,5,10,20,50,100
int
name The name of the SKU. Required.

Allowed values: Standard_S1, Free_F1
string (required)
tier Optional tier of this particular SKU. 'Standard' or 'Free'.

Basic is deprecated, use Standard instead.
'Basic'
'Free'
'Premium'
'Standard'

TrackedResourceTags

Name Description Value

UpstreamAuthSettings

Name Description Value
managedIdentity Gets or sets the managed identity settings. It's required if the auth type is set to ManagedIdentity. ManagedIdentitySettings
type Gets or sets the type of auth. None or ManagedIdentity is supported now. 'ManagedIdentity'
'None'

UserAssignedIdentityProperty

Name Description Value

WebPubSubNetworkACLs

Name Description Value
defaultAction Default action when no other rule matches 'Allow'
'Deny'
privateEndpoints ACLs for requests from private endpoints PrivateEndpointACL[]
publicNetwork ACL for requests from public network NetworkACL

WebPubSubProperties

Name Description Value
diagnosticConfiguration Diagnostic configuration of a Microsoft.SignalRService resource. Used together with Azure monitor DiagnosticSettings. DiagnosticConfiguration
disableAadAuth DisableLocalAuth
Enable or disable aad auth
When set as true, connection with AuthType=aad won't work.
bool
disableLocalAuth DisableLocalAuth
Enable or disable local auth with AccessKey
When set as true, connection with AccessKey=xxx won't work.
bool
eventHandler The settings for event handler in webpubsub service. EventHandlerSettings
networkACLs Network ACLs WebPubSubNetworkACLs
publicNetworkAccess 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.
string
tls TLS settings. WebPubSubTlsSettings

WebPubSubTlsSettings

Name Description Value
clientCertEnabled Request client certificate during TLS handshake if enabled bool