SignalR - Create Or Update

Create a new SignalR service and update an exiting SignalR service.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}?api-version=2020-05-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True
  • string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

resourceName
path True
  • string

The name of the SignalR resource.

subscriptionId
path True
  • string

Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True
  • string

Client Api Version.

Request Body

Name Type Description
kind

The kind of the service - e.g. "SignalR", or "RawWebSockets" for "Microsoft.SignalRService/SignalR"

location
  • string

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

properties.cors

Cross-Origin Resource Sharing (CORS) settings.

properties.features

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.

properties.hostNamePrefix
  • string

Prefix for the hostName of the SignalR service. Retained for future use. The hostname will be of format: <hostNamePrefix>.service.signalr.net.

properties.networkACLs

Network ACLs

properties.upstream

Upstream settings when the Azure SignalR is in server-less mode.

sku

The billing information of the resource.(e.g. Free, Standard)

tags
  • object

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

Responses

Name Type Description
200 OK

Success. The response describes a SignalR service.

201 Created

Created. The response describes the new service and contains a Location header to query the operation result.

202 Accepted

Accepted. The response indicates the exiting SignalR service is now updating and contains a Location header to query the operation result..

Other Status Codes

An unexpected error occurred during the operation.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

SignalR_CreateOrUpdate

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SignalRService/signalR/mySignalRService?api-version=2020-05-01
{
  "sku": {
    "name": "Standard_S1",
    "tier": "Standard",
    "capacity": 1
  },
  "properties": {
    "hostNamePrefix": null,
    "features": [
      {
        "flag": "ServiceMode",
        "value": "Serverless",
        "properties": {}
      },
      {
        "flag": "EnableConnectivityLogs",
        "value": "True",
        "properties": {}
      },
      {
        "flag": "EnableMessagingLogs",
        "value": "False",
        "properties": {}
      }
    ],
    "cors": {
      "allowedOrigins": [
        "https://foo.com",
        "https://bar.com"
      ]
    },
    "upstream": {
      "templates": [
        {
          "hubPattern": "*",
          "eventPattern": "connect,disconnect",
          "categoryPattern": "*",
          "urlTemplate": "https://example.com/chat/api/connect"
        }
      ]
    },
    "networkACLs": {
      "defaultAction": "Deny",
      "publicNetwork": {
        "allow": [
          "ClientConnection"
        ],
        "deny": null
      },
      "privateEndpoints": [
        {
          "name": "mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
          "allow": [
            "ServerConnection"
          ],
          "deny": null
        }
      ]
    }
  },
  "kind": "SignalR",
  "location": "eastus",
  "tags": {
    "key1": "value1"
  }
}

Sample Response

{
  "sku": {
    "name": "Standard_S1",
    "tier": "Standard",
    "size": "S1",
    "capacity": 1
  },
  "properties": {
    "provisioningState": "Succeeded",
    "externalIP": "10.0.0.1",
    "hostName": "mysignalrservice.service.signalr.net",
    "publicPort": 443,
    "serverPort": 443,
    "version": "1.0",
    "privateEndpointConnections": [
      {
        "properties": {
          "provisioningState": "Succeeded",
          "privateEndpoint": {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"
          },
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "description": null,
            "actionsRequired": "None"
          }
        },
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
        "name": "mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
        "type": "Microsoft.SignalRService/SignalR/privateEndpointConnections"
      }
    ],
    "hostNamePrefix": "mysignalrservice",
    "features": [
      {
        "flag": "ServiceMode",
        "value": "Serverless",
        "properties": {}
      },
      {
        "flag": "EnableConnectivityLogs",
        "value": "True",
        "properties": {}
      },
      {
        "flag": "EnableMessagingLogs",
        "value": "False",
        "properties": {}
      }
    ],
    "cors": {
      "allowedOrigins": [
        "https://foo.com",
        "https://bar.com"
      ]
    },
    "upstream": {
      "templates": [
        {
          "hubPattern": null,
          "eventPattern": null,
          "categoryPattern": null,
          "urlTemplate": "http://foo.com"
        }
      ]
    },
    "networkACLs": {
      "defaultAction": "Deny",
      "publicNetwork": {
        "allow": [
          "ClientConnection"
        ],
        "deny": null
      },
      "privateEndpoints": [
        {
          "name": "mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
          "allow": [
            "ServerConnection"
          ],
          "deny": null
        }
      ]
    }
  },
  "kind": "SignalR",
  "location": "eastus",
  "tags": {
    "key1": "value1"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService",
  "name": "mySignalRService",
  "type": "Microsoft.SignalRService/SignalR"
}
Location: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult...
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationStatus...
{
  "sku": {
    "name": "Standard_S1",
    "tier": "Standard",
    "size": "S1",
    "capacity": 1
  },
  "properties": {
    "provisioningState": "Succeeded",
    "externalIP": "10.0.0.1",
    "hostName": "mysignalrservice.service.signalr.net",
    "publicPort": 443,
    "serverPort": 443,
    "version": "1.0",
    "privateEndpointConnections": [
      {
        "properties": {
          "provisioningState": "Succeeded",
          "privateEndpoint": {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"
          },
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "description": null,
            "actionsRequired": "None"
          }
        },
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService/privateEndpointConnections/mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
        "name": "mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
        "type": "Microsoft.SignalRService/SignalR/privateEndpointConnections"
      }
    ],
    "hostNamePrefix": "mysignalrservice",
    "features": [
      {
        "flag": "ServiceMode",
        "value": "Serverless",
        "properties": {}
      },
      {
        "flag": "EnableConnectivityLogs",
        "value": "True",
        "properties": {}
      },
      {
        "flag": "EnableMessagingLogs",
        "value": "False",
        "properties": {}
      }
    ],
    "cors": {
      "allowedOrigins": [
        "https://foo.com",
        "https://bar.com"
      ]
    },
    "upstream": {
      "templates": [
        {
          "hubPattern": null,
          "eventPattern": null,
          "categoryPattern": null,
          "urlTemplate": "http://foo.com"
        }
      ]
    },
    "networkACLs": {
      "defaultAction": "Deny",
      "publicNetwork": {
        "allow": [
          "ClientConnection"
        ],
        "deny": null
      },
      "privateEndpoints": [
        {
          "name": "mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e",
          "allow": [
            "ServerConnection"
          ],
          "deny": null
        }
      ]
    }
  },
  "kind": "SignalR",
  "location": "eastus",
  "tags": {
    "key1": "value1"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService",
  "name": "mySignalRService",
  "type": "Microsoft.SignalRService/SignalR"
}
Location: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult...
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationStatus...

Definitions

ACLAction

Default action when no other rule matches

ErrorResponse

Contains information about an API error.

ErrorResponseBody

Describes a particular API error with an error code and a message.

FeatureFlags

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.
NetworkACL

Network ACL

PrivateEndpoint

Private endpoint

PrivateEndpointACL

ACL for a private endpoint

PrivateEndpointConnection

A private endpoint connection to SignalR resource

PrivateLinkServiceConnectionState

Connection state of the private endpoint connection

PrivateLinkServiceConnectionStatus

Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.

ProvisioningState

Provisioning state of the resource.

ResourceSku

The billing information of the SignalR resource.

ServerlessUpstreamSettings

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

ServiceKind

The kind of the service - e.g. "SignalR", or "RawWebSockets" for "Microsoft.SignalRService/SignalR"

SignalRCorsSettings

Cross-Origin Resource Sharing (CORS) settings.

SignalRFeature

Feature of a SignalR resource, which controls the SignalR runtime behavior.

SignalRNetworkACLs

Network ACLs for SignalR

SignalRResource

A class represent a SignalR service resource.

SignalRSkuTier

Optional tier of this particular SKU. 'Standard' or 'Free'.

Basic is deprecated, use Standard instead.

UpstreamTemplate

Upstream template item settings. It defines the Upstream URL of the incoming requests. The template defines the pattern of the event, the hub or the category of the incoming request that matches current URL template.

ACLAction

Default action when no other rule matches

Name Type Description
Allow
  • string
Deny
  • string

ErrorResponse

Contains information about an API error.

Name Type Description
error

Describes a particular API error with an error code and a message.

ErrorResponseBody

Describes a particular API error with an error code and a message.

Name Type Description
code
  • string

An error code that describes the error condition more precisely than an HTTP status code. Can be used to programmatically handle specific error cases.

details

Contains nested errors that are related to this error.

message
  • string

A message that describes the error in detail and provides debugging information.

target
  • string

The target of the particular error (for example, the name of the property in error).

FeatureFlags

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.
Name Type Description
EnableConnectivityLogs
  • string
EnableMessagingLogs
  • string
ServiceMode
  • string

NetworkACL

Network ACL

Name Type Description
allow
  • string[]

Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.

deny
  • string[]

Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.

PrivateEndpoint

Private endpoint

Name Type Description
id
  • string

Full qualified Id of the private endpoint

PrivateEndpointACL

ACL for a private endpoint

Name Type Description
allow
  • string[]

Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.

deny
  • string[]

Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.

name
  • string

Name of the private endpoint connection

PrivateEndpointConnection

A private endpoint connection to SignalR resource

Name Type Description
id
  • string

Fully qualified resource Id for the resource.

name
  • string

The name of the resource.

properties.privateEndpoint

Private endpoint associated with the private endpoint connection

properties.privateLinkServiceConnectionState

Connection state

properties.provisioningState

Provisioning state of the private endpoint connection

type
  • string

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

PrivateLinkServiceConnectionState

Connection state of the private endpoint connection

Name Type Description
actionsRequired
  • string

A message indicating if changes on the service provider require any updates on the consumer.

description
  • string

The reason for approval/rejection of the connection.

status

Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.

PrivateLinkServiceConnectionStatus

Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.

Name Type Description
Approved
  • string
Disconnected
  • string
Pending
  • string
Rejected
  • string

ProvisioningState

Provisioning state of the resource.

Name Type Description
Canceled
  • string
Creating
  • string
Deleting
  • string
Failed
  • string
Moving
  • string
Running
  • string
Succeeded
  • string
Unknown
  • string
Updating
  • string

ResourceSku

The billing information of the SignalR resource.

Name Type Description
capacity
  • integer

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

family
  • string

Optional string. For future use.

name
  • string

The name of the SKU. Required.

Allowed values: Standard_S1, Free_F1

size
  • string

Optional string. For future use.

tier

Optional tier of this particular SKU. 'Standard' or 'Free'.

Basic is deprecated, use Standard instead.

ServerlessUpstreamSettings

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

Name Type Description
templates

Gets or sets the list of Upstream URL templates. Order matters, and the first matching template takes effects.

ServiceKind

The kind of the service - e.g. "SignalR", or "RawWebSockets" for "Microsoft.SignalRService/SignalR"

Name Type Description
RawWebSockets
  • string
SignalR
  • string

SignalRCorsSettings

Cross-Origin Resource Sharing (CORS) settings.

Name Type Description
allowedOrigins
  • string[]

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.

SignalRFeature

Feature of a SignalR resource, which controls the SignalR runtime behavior.

Name Type Description
flag

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.
properties
  • object

Optional properties related to this feature.

value
  • string

Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for allowed values.

SignalRNetworkACLs

Network ACLs for SignalR

Name Type Description
defaultAction

Default action when no other rule matches

privateEndpoints

ACLs for requests from private endpoints

publicNetwork

ACL for requests from public network

SignalRResource

A class represent a SignalR service resource.

Name Type Description
id
  • string

Fully qualified resource Id for the resource.

kind

The kind of the service - e.g. "SignalR", or "RawWebSockets" for "Microsoft.SignalRService/SignalR"

location
  • string

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

name
  • string

The name of the resource.

properties.cors

Cross-Origin Resource Sharing (CORS) settings.

properties.externalIP
  • string

The publicly accessible IP of the SignalR service.

properties.features

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.

properties.hostName
  • string

FQDN of the SignalR service instance. Format: xxx.service.signalr.net

properties.hostNamePrefix
  • string

Prefix for the hostName of the SignalR service. Retained for future use. The hostname will be of format: <hostNamePrefix>.service.signalr.net.

properties.networkACLs

Network ACLs

properties.privateEndpointConnections

Private endpoint connections to the SignalR resource.

properties.provisioningState

Provisioning state of the resource.

properties.publicPort
  • integer

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

properties.serverPort
  • integer

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

properties.upstream

Upstream settings when the Azure SignalR is in server-less mode.

properties.version
  • string

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

sku

The billing information of the resource.(e.g. Free, Standard)

tags
  • object

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

type
  • string

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

SignalRSkuTier

Optional tier of this particular SKU. 'Standard' or 'Free'.

Basic is deprecated, use Standard instead.

Name Type Description
Basic
  • string
Free
  • string
Premium
  • string
Standard
  • string

UpstreamTemplate

Upstream template item settings. It defines the Upstream URL of the incoming requests. The template defines the pattern of the event, the hub or the category of the incoming request that matches current URL template.

Name Type Description
categoryPattern
  • string

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"

eventPattern
  • string

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"

hubPattern
  • string

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"

urlTemplate
  • string

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.