web_pub_sub_hubs
Creates, updates, deletes, gets or lists a web_pub_sub_hubs resource.
Overview
| Name | web_pub_sub_hubs |
| Type | Resource |
| Id | azure.web_pubsub.web_pub_sub_hubs |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
anonymousConnectPolicy | string | The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny". |
eventHandlers | array | Event handler of a hub. |
eventListeners | array | Event listener settings for forwarding your client events to listeners. Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients. One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter. Maximum count of event listeners among all hubs is 10. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
webSocketKeepAliveIntervalInSeconds | integer | The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
anonymousConnectPolicy | string | The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny". |
eventHandlers | array | Event handler of a hub. |
eventListeners | array | Event listener settings for forwarding your client events to listeners. Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients. One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter. Maximum count of event listeners among all hubs is 10. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
webSocketKeepAliveIntervalInSeconds | integer | The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | hub_name, resource_group_name, resource_name, subscription_id | Get a hub setting. | |
list | select | resource_group_name, resource_name, subscription_id | List hub settings. | |
create_or_update | insert | hub_name, resource_group_name, resource_name, subscription_id, properties | Create or update a hub setting. | |
create_or_update | replace | hub_name, resource_group_name, resource_name, subscription_id, properties | Create or update a hub setting. | |
delete | delete | hub_name, resource_group_name, resource_name, subscription_id | Delete a hub setting. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
hub_name | string | The hub name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
resource_name | string | The name of the resource. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get a hub setting.
SELECT
id,
name,
anonymousConnectPolicy,
eventHandlers,
eventListeners,
systemData,
type,
webSocketKeepAliveIntervalInSeconds
FROM azure.web_pubsub.web_pub_sub_hubs
WHERE hub_name = '{{ hub_name }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List hub settings.
SELECT
id,
name,
anonymousConnectPolicy,
eventHandlers,
eventListeners,
systemData,
type,
webSocketKeepAliveIntervalInSeconds
FROM azure.web_pubsub.web_pub_sub_hubs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create or update a hub setting.
INSERT INTO azure.web_pubsub.web_pub_sub_hubs (
properties,
hub_name,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ hub_name }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: web_pub_sub_hubs
props:
- name: hub_name
value: "{{ hub_name }}"
description: Required parameter for the web_pub_sub_hubs resource.
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the web_pub_sub_hubs resource.
- name: resource_name
value: "{{ resource_name }}"
description: Required parameter for the web_pub_sub_hubs resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the web_pub_sub_hubs resource.
- name: properties
description: |
Properties of a hub. Required.
value:
eventHandlers:
- urlTemplate: "{{ urlTemplate }}"
userEventPattern: "{{ userEventPattern }}"
systemEvents: "{{ systemEvents }}"
auth:
type: "{{ type }}"
managedIdentity:
resource: "{{ resource }}"
eventListeners:
- filter:
type: "{{ type }}"
endpoint:
type: "{{ type }}"
anonymousConnectPolicy: "{{ anonymousConnectPolicy }}"
webSocketKeepAliveIntervalInSeconds: {{ webSocketKeepAliveIntervalInSeconds }}
REPLACE examples
- create_or_update
Create or update a hub setting.
REPLACE azure.web_pubsub.web_pub_sub_hubs
SET
properties = '{{ properties }}'
WHERE
hub_name = '{{ hub_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete a hub setting.
DELETE FROM azure.web_pubsub.web_pub_sub_hubs
WHERE hub_name = '{{ hub_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;