TopicsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

EventGridManagementClient's

<xref:topics> attribute.

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. The name is case insensitive. Required.

topic_name
Required
str

Name of the topic. Required.

topic_info
Required
Topic or <xref:JSON> or IO[bytes]

Topic information. Is one of the following types: Topic, JSON, IO[bytes] Required.

Returns

Type Description

An instance of AsyncLROPoller that returns Topic. The Topic is compatible with MutableMapping

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. The name is case insensitive. Required.

topic_name
Required
str

Name of the topic. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns None

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. The name is case insensitive. Required.

topic_name
Required
str

Name of the topic. Required.

regenerate_key_request
Required
TopicRegenerateKeyRequest or <xref:JSON> or IO[bytes]

Request body to regenerate key. Is one of the following types: TopicRegenerateKeyRequest, JSON, IO[bytes] Required.

Returns

Type Description

An instance of AsyncLROPoller that returns TopicSharedAccessKeys. The TopicSharedAccessKeys is compatible with MutableMapping

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. The name is case insensitive. Required.

topic_name
Required
str

Name of the topic. Required.

topic_update_parameters
Required
TopicUpdateParameters or <xref:JSON> or IO[bytes]

Topic update information. Is one of the following types: TopicUpdateParameters, JSON, IO[bytes] Required.

Returns

Type Description

An instance of AsyncLROPoller that returns Topic. The Topic is compatible with MutableMapping

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. The name is case insensitive. Required.

topic_name
Required
str

Name of the topic. Required.

Returns

Type Description

Topic. The Topic is compatible with MutableMapping

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) -> AsyncItemPaged[Topic]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

Keyword-Only Parameters

Name Description
filter
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.

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

Default value: None

Returns

Type Description

An iterator like instance of Topic

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) -> AsyncItemPaged[Topic]

Keyword-Only Parameters

Name Description
filter
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.

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

Default value: None

Returns

Type Description

An iterator like instance of Topic

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) -> AsyncItemPaged[EventType]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

provider_namespace
Required
str

the provider namespace. 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 EventType

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. The name is case insensitive. Required.

topic_name
Required
str

Name of the topic. Required.

Returns

Type Description

TopicSharedAccessKeys. The TopicSharedAccessKeys is compatible with MutableMapping

Exceptions

Type Description