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=2018-10-01

URI Parameters

Name In Required Type Description
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.

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.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
location True
  • string

Azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. The geo region of a resource never changes after it is created.

properties

Settings used to provision or configure the resource

sku

The billing information of the resource.(e.g. basic vs. standard)

tags
  • object

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=2018-10-01
{
  "location": "eastus",
  "tags": {
    "key1": "value1"
  },
  "sku": {
    "name": "Standard_S1",
    "tier": "Standard",
    "capacity": 1
  },
  "properties": {
    "hostNamePrefix": null,
    "features": [
      {
        "flag": "ServiceMode",
        "value": "Serverless",
        "properties": {}
      }
    ],
    "cors": {
      "allowedOrigins": [
        "https://foo.com",
        "https://bar.com"
      ]
    }
  }
}

Sample Response

Location: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult...
{
  "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",
    "hostNamePrefix": null,
    "features": [
      {
        "flag": "ServiceMode",
        "value": "Serverless",
        "properties": {}
      }
    ],
    "cors": {
      "allowedOrigins": [
        "https://foo.com",
        "https://bar.com"
      ]
    }
  },
  "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...
{
  "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",
    "hostNamePrefix": null,
    "features": [
      {
        "flag": "ServiceMode",
        "value": "Serverless",
        "properties": {}
      }
    ],
    "cors": {
      "allowedOrigins": [
        "https://foo.com",
        "https://bar.com"
      ]
    }
  },
  "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...

Definitions

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

Provisioning state of the resource.

ResourceSku

The billing information of the SignalR resource.

SignalRCorsSettings

Cross-Origin Resource Sharing (CORS) settings.

SignalRCreateOrUpdateProperties

Settings used to provision or configure the resource.

SignalRCreateParameters

Parameters for SignalR service create/update operation.

Keep the same schema as AzSignalR.Models.SignalRResource

SignalRFeature

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

SignalRResource

A class represent a SignalR service resource.

SignalRSkuTier

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

Basic is deprecated, use Standard instead.

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
ServiceMode
  • 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.

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.

SignalRCreateOrUpdateProperties

Settings used to provision or configure the resource.

Name Type Description
cors

Cross-Origin Resource Sharing (CORS) settings.

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.

hostNamePrefix
  • string

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

SignalRCreateParameters

Parameters for SignalR service create/update operation.

Keep the same schema as AzSignalR.Models.SignalRResource

Name Type Description
location
  • string

Azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. The geo region of a resource never changes after it is created.

properties

Settings used to provision or configure the resource

sku

The billing information of the resource.(e.g. basic vs. standard)

tags
  • object

A list of key value pairs that describe the resource.

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.

SignalRResource

A class represent a SignalR service resource.

Name Type Description
id
  • string

Fully qualified resource Id for the resource.

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.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.version
  • string

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

sku

SKU of the service.

tags
  • object

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

type
  • string

The type of the service - 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