azure.mgmt.eventhub.operations module

class azure.mgmt.eventhub.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 objec model deserializer.
Variables:

api_version – Client API Version. Constant value: “2017-04-01”.

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

Lists all of the available Event Hub REST API operations.

Parameters:
Return type:

OperationPaged

Raises:

ErrorResponseException

class azure.mgmt.eventhub.operations.NamespacesOperations(client, config, serializer, deserializer)[source]

Bases: object

NamespacesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Client API Version. Constant value: “2017-04-01”.

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

Check the give Namespace name availability.

Parameters:
  • name (str) – Name to check the namespace name availability
  • 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.
Return type:

CheckNameAvailabilityResult

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

create_or_update(resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • parameters (EHNamespace) – Parameters for creating a namespace resource.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns EHNamespace

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, rights=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates an AuthorizationRule for a Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • authorization_rule_name (str) – The authorization rule name.
  • rights (list of str or AccessRights) – The rights associated with the rule.
  • 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.
Return type:

AuthorizationRule

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

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

Deletes an existing namespace. This operation also removes all associated resources under the namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes an AuthorizationRule for a Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • authorization_rule_name (str) – The authorization rule name.
  • 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.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

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

Gets the description of the specified namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • 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.
Return type:

EHNamespace

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Gets an AuthorizationRule for a Namespace by rule name.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • authorization_rule_name (str) – The authorization rule name.
  • 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.
Return type:

AuthorizationRule

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

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

Lists all the available Namespaces within a subscription, irrespective of the resource groups.

Parameters:
Return type:

EHNamespacePaged

Raises:

ErrorResponseException

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

Gets a list of authorization rules for a Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • 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.
Return type:

AuthorizationRulePaged

Raises:

ErrorResponseException

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

Lists the available Namespaces within a resource group.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure 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.
Return type:

EHNamespacePaged

Raises:

ErrorResponseException

list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the primary and secondary connection strings for the Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • authorization_rule_name (str) – The authorization rule name.
  • 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.
Return type:

AccessKeys

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, key_type, key=None, custom_headers=None, raw=False, **operation_config)[source]

Regenerates the primary or secondary connection strings for the specified Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • authorization_rule_name (str) – The authorization rule name.
  • key_type (str or KeyType) – The access key to regenerate. Possible values include: ‘PrimaryKey’, ‘SecondaryKey’
  • key (str) – Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType
  • 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.
Return type:

AccessKeys

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

update(resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • parameters (EHNamespace) – Parameters for updating a namespace 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.
Return type:

EHNamespace

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

class azure.mgmt.eventhub.operations.EventHubsOperations(client, config, serializer, deserializer)[source]

Bases: object

EventHubsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Client API Version. Constant value: “2017-04-01”.

create_or_update(resource_group_name, namespace_name, event_hub_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a new Event Hub as a nested resource within a Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • parameters (Eventhub) – Parameters supplied to create an Event Hub 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.
Return type:

Eventhub

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

create_or_update_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, rights=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates an AuthorizationRule for the specified Event Hub.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • authorization_rule_name (str) – The authorization rule name.
  • rights (list of str or AccessRights) – The rights associated with the rule.
  • 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.
Return type:

AuthorizationRule

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

delete(resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes an Event Hub from the specified Namespace and resource group.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • 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.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

delete_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes an Event Hub AuthorizationRule.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • authorization_rule_name (str) – The authorization rule name.
  • 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.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

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

Gets an Event Hubs description for the specified Event Hub.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • 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.
Return type:

Eventhub

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

get_authorization_rule(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Gets an AuthorizationRule for an Event Hub by rule name.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • authorization_rule_name (str) – The authorization rule name.
  • 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.
Return type:

AuthorizationRule

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

list_authorization_rules(resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the authorization rules for an Event Hub.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • 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.
Return type:

AuthorizationRulePaged

Raises:

ErrorResponseException

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

Gets all the Event Hubs in a Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • 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.
Return type:

EventhubPaged

Raises:

ErrorResponseException

list_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the ACS and SAS connection strings for the Event Hub.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • authorization_rule_name (str) – The authorization rule name.
  • 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.
Return type:

AccessKeys

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

regenerate_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, key_type, key=None, custom_headers=None, raw=False, **operation_config)[source]

Regenerates the ACS and SAS connection strings for the Event Hub.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • authorization_rule_name (str) – The authorization rule name.
  • key_type (str or KeyType) – The access key to regenerate. Possible values include: ‘PrimaryKey’, ‘SecondaryKey’
  • key (str) – Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType
  • 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.
Return type:

AccessKeys

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

class azure.mgmt.eventhub.operations.ConsumerGroupsOperations(client, config, serializer, deserializer)[source]

Bases: object

ConsumerGroupsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Client API Version. Constant value: “2017-04-01”.

create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, user_metadata=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • consumer_group_name (str) – The consumer group name
  • user_metadata (str) – Usermetadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
  • 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.
Return type:

ConsumerGroup

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

delete(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a consumer group from the specified Event Hub and resource group.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • consumer_group_name (str) – The consumer group name
  • 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.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

get(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a description for the specified consumer group.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • consumer_group_name (str) – The consumer group name
  • 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.
Return type:

ConsumerGroup

Return type:

ClientRawResponse if raw=true

Raises:

ErrorResponseException

list_by_event_hub(resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config)[source]

Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.

Parameters:
  • resource_group_name (str) – Name of the resource group within the azure subscription.
  • namespace_name (str) – The Namespace name
  • event_hub_name (str) – The Event Hub name
  • 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.
Return type:

ConsumerGroupPaged

Raises:

ErrorResponseException