topics
Creates, updates, deletes, gets or lists a topics resource.
Overview​
| Name | topics |
| Type | Resource |
| Id | azure.service_bus.topics |
Fields​
The following fields are returned by SELECT queries:
- list_keys
- get
- list_by_namespace
| Name | Datatype | Description |
|---|---|---|
aliasPrimaryConnectionString | string | Primary connection string of the alias if GEO DR is enabled. |
aliasSecondaryConnectionString | string | Secondary connection string of the alias if GEO DR is enabled. |
keyName | string | A string that describes the authorization rule. |
primaryConnectionString | string | Primary connection string of the created namespace authorization rule. |
primaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
secondaryConnectionString | string | Secondary connection string of the created namespace authorization rule. |
secondaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accessedAt | string (date-time) | Last time the message was sent, or a request was received, for this topic. |
autoDeleteOnIdle | string | ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. |
countDetails | object | Message count details. |
createdAt | string (date-time) | Exact time the message was created. |
defaultMessageTimeToLive | string | ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. |
duplicateDetectionHistoryTimeWindow | string | ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. |
enableBatchedOperations | boolean | Value that indicates whether server-side batched operations are enabled. |
enableExpress | boolean | Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. |
enablePartitioning | boolean | Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. |
location | string | The geo-location where the resource lives. |
maxMessageSizeInKilobytes | integer | Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. |
maxSizeInMegabytes | integer | Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. |
requiresDuplicateDetection | boolean | Value indicating if this topic requires duplicate detection. |
sizeInBytes | integer | Size of the topic, in bytes. |
status | string | Enumerates the possible values for the status of a messaging entity. Known values are: "Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", and "Unknown". |
subscriptionCount | integer | Number of subscriptions. |
supportOrdering | boolean | Value that indicates whether the topic supports ordering. |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
updatedAt | string (date-time) | The exact time the message was updated. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accessedAt | string (date-time) | Last time the message was sent, or a request was received, for this topic. |
autoDeleteOnIdle | string | ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. |
countDetails | object | Message count details. |
createdAt | string (date-time) | Exact time the message was created. |
defaultMessageTimeToLive | string | ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. |
duplicateDetectionHistoryTimeWindow | string | ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. |
enableBatchedOperations | boolean | Value that indicates whether server-side batched operations are enabled. |
enableExpress | boolean | Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. |
enablePartitioning | boolean | Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. |
location | string | The geo-location where the resource lives. |
maxMessageSizeInKilobytes | integer | Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. |
maxSizeInMegabytes | integer | Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. |
requiresDuplicateDetection | boolean | Value indicating if this topic requires duplicate detection. |
sizeInBytes | integer | Size of the topic, in bytes. |
status | string | Enumerates the possible values for the status of a messaging entity. Known values are: "Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", and "Unknown". |
subscriptionCount | integer | Number of subscriptions. |
supportOrdering | boolean | Value that indicates whether the topic supports ordering. |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
updatedAt | string (date-time) | The exact time the message was updated. |
Methods​
The following methods are available for this resource:
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 |
|---|---|---|
authorization_rule_name | string | The authorization rule name. Required. |
namespace_name | string | The namespace name. Required. |
resource_group_name | string | Name of the Resource group within the Azure subscription. Required. |
subscription_id | string | |
topic_name | string | The topic name. Required. |
$skip | integer | Skip 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. |
$top | integer | May be used to limit the number of results to the most recent N usageDetails. Default value is None. |
SELECT examples​
- list_keys
- get
- list_by_namespace
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
;
Returns a description for the specified topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639399.aspx
SELECT
id,
name,
accessedAt,
autoDeleteOnIdle,
countDetails,
createdAt,
defaultMessageTimeToLive,
duplicateDetectionHistoryTimeWindow,
enableBatchedOperations,
enableExpress,
enablePartitioning,
location,
maxMessageSizeInKilobytes,
maxSizeInMegabytes,
requiresDuplicateDetection,
sizeInBytes,
status,
subscriptionCount,
supportOrdering,
systemData,
type,
updatedAt
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
;
Gets all the topics in a namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639388.aspx
SELECT
id,
name,
accessedAt,
autoDeleteOnIdle,
countDetails,
createdAt,
defaultMessageTimeToLive,
duplicateDetectionHistoryTimeWindow,
enableBatchedOperations,
enableExpress,
enablePartitioning,
location,
maxMessageSizeInKilobytes,
maxSizeInMegabytes,
requiresDuplicateDetection,
sizeInBytes,
status,
subscriptionCount,
supportOrdering,
systemData,
type,
updatedAt
FROM azure.service_bus.topics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $skip = '{{ $skip }}'
AND $top = '{{ $top }}'
;
INSERT examples​
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: topics
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the topics resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the topics resource.
- name: topic_name
value: "{{ topic_name }}"
description: Required parameter for the topics resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the topics resource.
- name: properties
value:
defaultMessageTimeToLive: "{{ defaultMessageTimeToLive }}"
maxSizeInMegabytes: {{ maxSizeInMegabytes }}
maxMessageSizeInKilobytes: {{ maxMessageSizeInKilobytes }}
requiresDuplicateDetection: {{ requiresDuplicateDetection }}
duplicateDetectionHistoryTimeWindow: "{{ duplicateDetectionHistoryTimeWindow }}"
enableBatchedOperations: {{ enableBatchedOperations }}
status: "{{ status }}"
supportOrdering: {{ supportOrdering }}
autoDeleteOnIdle: "{{ autoDeleteOnIdle }}"
enablePartitioning: {{ enablePartitioning }}
enableExpress: {{ enableExpress }}
REPLACE examples​
- create_or_update
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​
- delete
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​
- list_authorization_rules
- get_authorization_rule
- create_or_update_authorization_rule
- delete_authorization_rule
- regenerate_keys
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
;
Returns the specified authorization rule. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720676.aspx
EXEC azure.service_bus.topics.get_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@topic_name='{{ topic_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Creates an authorization rule for the specified topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720678.aspx
EXEC azure.service_bus.topics.create_or_update_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@topic_name='{{ topic_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Deletes a topic authorization rule. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720681.aspx
EXEC azure.service_bus.topics.delete_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@topic_name='{{ topic_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Regenerates primary or secondary connection strings for the topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt720679.aspx
EXEC azure.service_bus.topics.regenerate_keys
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@topic_name='{{ topic_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"keyType": "{{ keyType }}",
"key": "{{ key }}"
}'
;