azure.mgmt.eventgrid.operations module

class azure.mgmt.eventgrid.operations.EventSubscriptionsOperations(client, config, serializer, deserializer)[source]

Bases: object

EventSubscriptionsOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. Constant value: “2018-05-01-preview”.

create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Create or update an event subscription.

Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.

Parameters
  • scope (str) – The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use ‘/subscriptions/{subscriptionId}/’ for a subscription, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for a resource group, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}’ for a resource, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}’ for an EventGrid topic.

  • event_subscription_name (str) – Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only.

  • event_subscription_info (EventSubscription) – Event subscription properties containing the destination and filter information

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns EventSubscription or ClientRawResponse<EventSubscription> if raw==True

Return type

AzureOperationPoller[EventSubscription] or AzureOperationPoller[ClientRawResponse[EventSubscription]]

Raises

CloudError

delete(scope, event_subscription_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Delete an event subscription.

Delete an existing event subscription.

Parameters
  • scope (str) – The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use ‘/subscriptions/{subscriptionId}/’ for a subscription, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for a resource group, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}’ for a resource, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}’ for an EventGrid topic.

  • event_subscription_name (str) – Name of the event subscription

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises

CloudError

get(scope, event_subscription_name, custom_headers=None, raw=False, **operation_config)[source]

Get an event subscription.

Get properties of an event subscription.

Parameters
  • scope (str) – The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use ‘/subscriptions/{subscriptionId}/’ for a subscription, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for a resource group, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}’ for a resource, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}’ for an EventGrid topic.

  • event_subscription_name (str) – Name of the event subscription

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

EventSubscription or ClientRawResponse if raw=true

Return type

EventSubscription or ClientRawResponse

Raises

CloudError

get_full_url(scope, event_subscription_name, custom_headers=None, raw=False, **operation_config)[source]

Get full URL of an event subscription.

Get the full endpoint URL for an event subscription.

Parameters
  • scope (str) – The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use ‘/subscriptions/{subscriptionId}/’ for a subscription, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for a resource group, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}’ for a resource, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}’ for an EventGrid topic.

  • event_subscription_name (str) – Name of the event subscription

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

EventSubscriptionFullUrl or ClientRawResponse if raw=true

Return type

EventSubscriptionFullUrl or ClientRawResponse

Raises

CloudError

list_by_resource(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers=None, raw=False, **operation_config)[source]

List all event subscriptions for a specific topic.

List all event subscriptions that have been created for a specific topic.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • provider_namespace (str) – Namespace of the provider of the topic

  • resource_type_name (str) – Name of the resource type

  • resource_name (str) – Name of the resource

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_global_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

List all global event subscriptions under an Azure subscription and resource group.

List all global event subscriptions under a specific Azure subscription and resource group.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_global_by_resource_group_for_topic_type(resource_group_name, topic_type_name, custom_headers=None, raw=False, **operation_config)[source]

List all global event subscriptions under a resource group for a topic type.

List all global event subscriptions under a resource group for a specific topic type.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • topic_type_name (str) – Name of the topic type

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_global_by_subscription(custom_headers=None, raw=False, **operation_config)[source]

Get an aggregated list of all global event subscriptions under an Azure subscription.

List all aggregated global event subscriptions under a specific Azure subscription.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_global_by_subscription_for_topic_type(topic_type_name, custom_headers=None, raw=False, **operation_config)[source]

List all global event subscriptions for a topic type.

List all global event subscriptions under an Azure subscription for a topic type.

Parameters
  • topic_type_name (str) – Name of the topic type

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_regional_by_resource_group(resource_group_name, location, custom_headers=None, raw=False, **operation_config)[source]

List all regional event subscriptions under an Azure subscription and resource group.

List all event subscriptions from the given location under a specific Azure subscription and resource group.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • location (str) – Name of the location

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, custom_headers=None, raw=False, **operation_config)[source]

List all regional event subscriptions under an Azure subscription and resource group for a topic type.

List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • location (str) – Name of the location

  • topic_type_name (str) – Name of the topic type

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_regional_by_subscription(location, custom_headers=None, raw=False, **operation_config)[source]

List all regional event subscriptions under an Azure subscription.

List all event subscriptions from the given location under a specific Azure subscription.

Parameters
  • location (str) – Name of the location

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

list_regional_by_subscription_for_topic_type(location, topic_type_name, custom_headers=None, raw=False, **operation_config)[source]

List all regional event subscriptions under an Azure subscription for a topic type.

List all event subscriptions from the given location under a specific Azure subscription and topic type.

Parameters
  • location (str) – Name of the location

  • topic_type_name (str) – Name of the topic type

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventSubscription

Return type

EventSubscriptionPaged[EventSubscription]

Raises

CloudError

models = <module 'azure.mgmt.eventgrid.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/eventgrid/models/__init__.py'>
update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Update an event subscription.

Asynchronously updates an existing event subscription.

Parameters
  • scope (str) – The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use ‘/subscriptions/{subscriptionId}/’ for a subscription, ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}’ for a resource group, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}’ for a resource, and ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}’ for an EventGrid topic.

  • event_subscription_name (str) – Name of the event subscription to be updated

  • event_subscription_update_parameters (EventSubscriptionUpdateParameters) – Updated event subscription information

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns EventSubscription or ClientRawResponse<EventSubscription> if raw==True

Return type

AzureOperationPoller[EventSubscription] or AzureOperationPoller[ClientRawResponse[EventSubscription]]

Raises

CloudError

class azure.mgmt.eventgrid.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. Constant value: “2018-05-01-preview”.

list(custom_headers=None, raw=False, **operation_config)[source]

List available operations.

List the available operations supported by the Microsoft.EventGrid resource provider.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Operation

Return type

OperationPaged[Operation]

Raises

CloudError

models = <module 'azure.mgmt.eventgrid.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/eventgrid/models/__init__.py'>
class azure.mgmt.eventgrid.operations.TopicsOperations(client, config, serializer, deserializer)[source]

Bases: object

TopicsOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. Constant value: “2018-05-01-preview”.

create_or_update(resource_group_name, topic_name, topic_info, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Create a topic.

Asynchronously creates a new topic with the specified parameters.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • topic_name (str) – Name of the topic

  • topic_info (Topic) – Topic information

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns Topic or ClientRawResponse<Topic> if raw==True

Return type

AzureOperationPoller[Topic] or AzureOperationPoller[ClientRawResponse[Topic]]

Raises

CloudError

delete(resource_group_name, topic_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Delete a topic.

Delete existing topic.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • topic_name (str) – Name of the topic

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises

CloudError

get(resource_group_name, topic_name, custom_headers=None, raw=False, **operation_config)[source]

Get a topic.

Get properties of a topic.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • topic_name (str) – Name of the topic

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

Topic or ClientRawResponse if raw=true

Return type

Topic or ClientRawResponse

Raises

CloudError

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

List topics under a resource group.

List all the topics under a resource group.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Topic

Return type

TopicPaged[Topic]

Raises

CloudError

list_by_subscription(custom_headers=None, raw=False, **operation_config)[source]

List topics under an Azure subscription.

List all the topics under an Azure subscription.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Topic

Return type

TopicPaged[Topic]

Raises

CloudError

list_event_types(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers=None, raw=False, **operation_config)[source]

List topic event types.

List event types for a topic.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • provider_namespace (str) – Namespace of the provider of the topic

  • resource_type_name (str) – Name of the topic type

  • resource_name (str) – Name of the topic

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventType

Return type

EventTypePaged[EventType]

Raises

CloudError

list_shared_access_keys(resource_group_name, topic_name, custom_headers=None, raw=False, **operation_config)[source]

List keys for a topic.

List the two keys used to publish to a topic.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • topic_name (str) – Name of the topic

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

TopicSharedAccessKeys or ClientRawResponse if raw=true

Return type

TopicSharedAccessKeys or ClientRawResponse

Raises

CloudError

models = <module 'azure.mgmt.eventgrid.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/eventgrid/models/__init__.py'>
regenerate_key(resource_group_name, topic_name, key_name, custom_headers=None, raw=False, **operation_config)[source]

Regenerate key for a topic.

Regenerate a shared access key for a topic.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • topic_name (str) – Name of the topic

  • key_name (str) – Key name to regenerate key1 or key2

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

TopicSharedAccessKeys or ClientRawResponse if raw=true

Return type

TopicSharedAccessKeys or ClientRawResponse

Raises

CloudError

update(resource_group_name, topic_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Update a topic.

Asynchronously updates a topic with the specified parameters.

Parameters
  • resource_group_name (str) – The name of the resource group within the user’s subscription.

  • topic_name (str) – Name of the topic

  • tags (dict[str, str]) – Tags of the resource

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns Topic or ClientRawResponse<Topic> if raw==True

Return type

AzureOperationPoller[Topic] or AzureOperationPoller[ClientRawResponse[Topic]]

Raises

CloudError

class azure.mgmt.eventgrid.operations.TopicTypesOperations(client, config, serializer, deserializer)[source]

Bases: object

TopicTypesOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Version of the API to be used with the client request. Constant value: “2018-05-01-preview”.

get(topic_type_name, custom_headers=None, raw=False, **operation_config)[source]

Get a topic type.

Get information about a topic type.

Parameters
  • topic_type_name (str) – Name of the topic type

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

TopicTypeInfo or ClientRawResponse if raw=true

Return type

TopicTypeInfo or ClientRawResponse

Raises

CloudError

list(custom_headers=None, raw=False, **operation_config)[source]

List topic types.

List all registered topic types.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of TopicTypeInfo

Return type

TopicTypeInfoPaged[TopicTypeInfo]

Raises

CloudError

list_event_types(topic_type_name, custom_headers=None, raw=False, **operation_config)[source]

List event types.

List event types for a topic type.

Parameters
  • topic_type_name (str) – Name of the topic type

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of EventType

Return type

EventTypePaged[EventType]

Raises

CloudError

models = <module 'azure.mgmt.eventgrid.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/eventgrid/models/__init__.py'>