Skip to main content

topics

Creates, updates, deletes, gets or lists a topics resource.

Overview​

Nametopics
TypeResource
Idazure.service_bus.topics

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
aliasPrimaryConnectionStringstringPrimary connection string of the alias if GEO DR is enabled.
aliasSecondaryConnectionStringstringSecondary connection string of the alias if GEO DR is enabled.
keyNamestringA string that describes the authorization rule.
primaryConnectionStringstringPrimary connection string of the created namespace authorization rule.
primaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.
secondaryConnectionStringstringSecondary connection string of the created namespace authorization rule.
secondaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_keysselectresource_group_name, namespace_name, topic_name, authorization_rule_name, subscription_idGets the primary and secondary connection strings for the topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720677.aspx
getselectresource_group_name, namespace_name, topic_name, subscription_idReturns a description for the specified topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx
list_by_namespaceselectresource_group_name, namespace_name, subscription_id$skip, $topGets all the topics in a namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx
create_or_updateinsertresource_group_name, namespace_name, topic_name, subscription_idCreates a topic in the specified namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx
create_or_updatereplaceresource_group_name, namespace_name, topic_name, subscription_idCreates a topic in the specified namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx
deletedeleteresource_group_name, namespace_name, topic_name, subscription_idDeletes a topic from the specified namespace and resource group. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx
list_authorization_rulesexecresource_group_name, namespace_name, topic_name, subscription_idGets authorization rules for a topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx
get_authorization_ruleexecresource_group_name, namespace_name, topic_name, authorization_rule_name, subscription_idReturns the specified authorization rule. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx
create_or_update_authorization_ruleexecresource_group_name, namespace_name, topic_name, authorization_rule_name, subscription_idCreates an authorization rule for the specified topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx
delete_authorization_ruleexecresource_group_name, namespace_name, topic_name, authorization_rule_name, subscription_idDeletes a topic authorization rule. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx
regenerate_keysexecresource_group_name, namespace_name, topic_name, authorization_rule_name, subscription_id, keyTypeRegenerates primary or secondary connection strings for the topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx

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.

NameDatatypeDescription
authorization_rule_namestringThe authorization rule name. Required.
namespace_namestringThe namespace name. Required.
resource_group_namestringName of the Resource group within the Azure subscription. Required.
subscription_idstring
topic_namestringThe topic name. Required.
$skipintegerSkip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. Default value is None.
$topintegerMay be used to limit the number of results to the most recent N usageDetails. Default value is None.

SELECT examples​

Gets the primary and secondary connection strings for the topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720677.aspx

SELECT
aliasPrimaryConnectionString,
aliasSecondaryConnectionString,
keyName,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.service_bus.topics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND topic_name = '{{ topic_name }}' -- required
AND authorization_rule_name = '{{ authorization_rule_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples​

Creates a topic in the specified namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx

INSERT INTO azure.service_bus.topics (
properties,
resource_group_name,
namespace_name,
topic_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ topic_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;

REPLACE examples​

Creates a topic in the specified namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639409.aspx

REPLACE azure.service_bus.topics
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND topic_name = '{{ topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;

DELETE examples​

Deletes a topic from the specified namespace and resource group. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639404.aspx

DELETE FROM azure.service_bus.topics
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND topic_name = '{{ topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods​

Gets authorization rules for a topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx

EXEC azure.service_bus.topics.list_authorization_rules 
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@topic_name='{{ topic_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;