topics
Creates, updates, deletes, gets or lists a topics
resource.
Overview
Name | topics |
Type | Resource |
Id | azure.event_grid.topics |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list_by_subscription
Name | Datatype | Description |
---|---|---|
extendedLocation | object | Extended location of the resource. |
identity | object | Identity information for the resource. |
kind | string | Kind of the resource. (default: Azure) |
location | string | Location of the resource. |
properties | object | Properties of the topic. |
sku | object | The Sku pricing tier for the topic. |
systemData | object | The system metadata relating to Topic resource. |
tags | object | Tags of the resource. |
Name | Datatype | Description |
---|---|---|
extendedLocation | object | Extended location of the resource. |
identity | object | Identity information for the resource. |
kind | string | Kind of the resource. (default: Azure) |
location | string | Location of the resource. |
properties | object | Properties of the topic. |
sku | object | The Sku pricing tier for the topic. |
systemData | object | The system metadata relating to Topic resource. |
tags | object | Tags of the resource. |
Name | Datatype | Description |
---|---|---|
extendedLocation | object | Extended location of the resource. |
identity | object | Identity information for the resource. |
kind | string | Kind of the resource. (default: Azure) |
location | string | Location of the resource. |
properties | object | Properties of the topic. |
sku | object | The Sku pricing tier for the topic. |
systemData | object | The system metadata relating to Topic resource. |
tags | object | Tags of the resource. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , topicName | Get properties of a topic. | |
list_by_resource_group | select | subscriptionId , resourceGroupName | $filter , $top | List all the topics under a resource group. |
list_by_subscription | select | subscriptionId | $filter , $top | List all the topics under an Azure subscription. |
create_or_update | insert | subscriptionId , resourceGroupName , topicName | Asynchronously creates a new topic with the specified parameters. | |
update | update | subscriptionId , resourceGroupName , topicName | Asynchronously updates a topic with the specified parameters. | |
delete | delete | subscriptionId , resourceGroupName , topicName | Delete existing topic. | |
regenerate_key | exec | subscriptionId , resourceGroupName , topicName , keyName | Regenerate a shared access key for a topic. |
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 |
---|---|---|
resourceGroupName | string | The name of the resource group within the user's subscription. |
subscriptionId | string | Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
topicName | string | Name of the topic. |
$filter | string | The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. |
$top | integer (int32) | The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. |
SELECT
examples
- get
- list_by_resource_group
- list_by_subscription
Get properties of a topic.
SELECT
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags
FROM azure.event_grid.topics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND topicName = '{{ topicName }}' -- required
;
List all the topics under a resource group.
SELECT
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags
FROM azure.event_grid.topics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
;
List all the topics under an Azure subscription.
SELECT
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags
FROM azure.event_grid.topics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
;
INSERT
examples
- create_or_update
- Manifest
Asynchronously creates a new topic with the specified parameters.
INSERT INTO azure.event_grid.topics (
data__location,
data__tags,
data__properties,
data__sku,
data__identity,
data__kind,
data__extendedLocation,
subscriptionId,
resourceGroupName,
topicName
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ sku }}',
'{{ identity }}',
'{{ kind }}',
'{{ extendedLocation }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ topicName }}'
RETURNING
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags
;
# Description fields are for documentation purposes
- name: topics
props:
- name: subscriptionId
value: string
description: Required parameter for the topics resource.
- name: resourceGroupName
value: string
description: Required parameter for the topics resource.
- name: topicName
value: string
description: Required parameter for the topics resource.
- name: location
value: string
description: |
Location of the resource.
- name: tags
value: object
description: |
Tags of the resource.
- name: properties
value: object
description: |
Properties of the topic.
- name: sku
value: object
description: |
The Sku pricing tier for the topic.
- name: identity
value: object
description: |
Identity information for the resource.
- name: kind
value: string
description: |
Kind of the resource.
valid_values: ['Azure', 'AzureArc']
default: Azure
- name: extendedLocation
value: object
description: |
Extended location of the resource.
UPDATE
examples
- update
Asynchronously updates a topic with the specified parameters.
UPDATE azure.event_grid.topics
SET
data__tags = '{{ tags }}',
data__identity = '{{ identity }}',
data__properties = '{{ properties }}',
data__sku = '{{ sku }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND topicName = '{{ topicName }}' --required;
DELETE
examples
- delete
Delete existing topic.
DELETE FROM azure.event_grid.topics
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND topicName = '{{ topicName }}' --required
;
Lifecycle Methods
- regenerate_key
Regenerate a shared access key for a topic.
EXEC azure.event_grid.topics.regenerate_key
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@topicName='{{ topicName }}' --required
@@json=
'{
"keyName": "{{ keyName }}"
}'
;