TopicsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

EventGridManagementClient's

<xref:topics> attribute.

Inheritance
builtins.object
TopicsOperations

Constructor

TopicsOperations(*args, **kwargs)

Methods

begin_create_or_update

Create a topic.

Asynchronously creates a new topic with the specified parameters.

begin_delete

Delete a topic.

Delete existing topic.

begin_regenerate_key

Regenerate key for a topic.

Regenerate a shared access key for a topic.

begin_update

Update a topic.

Asynchronously updates a topic with the specified parameters.

get

Get a topic.

Get properties of a topic.

list_by_resource_group

List topics under a resource group.

List all the topics under a resource group.

list_by_subscription

List topics under an Azure subscription.

List all the topics under an Azure subscription.

list_event_types

List topic event types.

List event types for a topic.

list_shared_access_keys

List keys for a topic.

List the two keys used to publish to a topic.

begin_create_or_update

Create a topic.

Asynchronously creates a new topic with the specified parameters.

async begin_create_or_update(resource_group_name: str, topic_name: str, topic_info: _models.Topic, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.Topic]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

topic_name
Required
str

Name of the topic. Required.

topic_info
Required
Topic or IO[bytes]

Topic information. Is either a Topic type or a IO[bytes] type. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either Topic or the result of cls(response)

Exceptions

Type Description

begin_delete

Delete a topic.

Delete existing topic.

async begin_delete(resource_group_name: str, topic_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

topic_name
Required
str

Name of the topic. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either None or the result of cls(response)

Exceptions

Type Description

begin_regenerate_key

Regenerate key for a topic.

Regenerate a shared access key for a topic.

async begin_regenerate_key(resource_group_name: str, topic_name: str, regenerate_key_request: _models.TopicRegenerateKeyRequest, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.TopicSharedAccessKeys]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

topic_name
Required
str

Name of the topic. Required.

regenerate_key_request
Required

Request body to regenerate key. Is either a TopicRegenerateKeyRequest type or a IO[bytes] type. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either TopicSharedAccessKeys or the result of cls(response)

Exceptions

Type Description

begin_update

Update a topic.

Asynchronously updates a topic with the specified parameters.

async begin_update(resource_group_name: str, topic_name: str, topic_update_parameters: _models.TopicUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.Topic]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

topic_name
Required
str

Name of the topic. Required.

topic_update_parameters
Required

Topic update information. Is either a TopicUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either Topic or the result of cls(response)

Exceptions

Type Description

get

Get a topic.

Get properties of a topic.

async get(resource_group_name: str, topic_name: str, **kwargs: Any) -> Topic

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

topic_name
Required
str

Name of the topic. Required.

Returns

Type Description

Topic or the result of cls(response)

Exceptions

Type Description

list_by_resource_group

List topics under a resource group.

List all the topics under a resource group.

list_by_resource_group(resource_group_name: str, filter: str | None = None, top: int | None = None, **kwargs: Any) -> AsyncIterable[Topic]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

filter
Required
str

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'. Default value is None.

top
Required
int

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. Default value is None.

Returns

Type Description

An iterator like instance of either Topic or the result of cls(response)

Exceptions

Type Description

list_by_subscription

List topics under an Azure subscription.

List all the topics under an Azure subscription.

list_by_subscription(filter: str | None = None, top: int | None = None, **kwargs: Any) -> AsyncIterable[Topic]

Parameters

Name Description
filter
Required
str

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'. Default value is None.

top
Required
int

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. Default value is None.

Returns

Type Description

An iterator like instance of either Topic or the result of cls(response)

Exceptions

Type Description

list_event_types

List topic event types.

List event types for a topic.

list_event_types(resource_group_name: str, provider_namespace: str, resource_type_name: str, resource_name: str, **kwargs: Any) -> AsyncIterable[EventType]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

provider_namespace
Required
str

Namespace of the provider of the topic. Required.

resource_type_name
Required
str

Name of the topic type. Required.

resource_name
Required
str

Name of the topic. Required.

Returns

Type Description

An iterator like instance of either EventType or the result of cls(response)

Exceptions

Type Description

list_shared_access_keys

List keys for a topic.

List the two keys used to publish to a topic.

async list_shared_access_keys(resource_group_name: str, topic_name: str, **kwargs: Any) -> TopicSharedAccessKeys

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. Required.

topic_name
Required
str

Name of the topic. Required.

Returns

Type Description

TopicSharedAccessKeys or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.eventgrid.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\eventgrid\\models\\__init__.py'>