azure.mgmt.eventhub.operations module

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.
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) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • parameters (NamespaceCreateOrUpdateParameters) – 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 NamespaceResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Creates or updates an authorization rule for a namespace.

Parameters:
  • resource_group_name (str) – The name of the resource group in which the namespace lives.
  • namespace_name (str) – The namespace name.
  • authorization_rule_name (str) – Namespace authorization rule name.
  • parameters (SharedAccessAuthorizationRuleCreateOrUpdateParameters) – The shared access authorization 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:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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) – The name of the resource group in which the namespace lives.
  • namespace_name (str) – The name of the namespace to delete.
  • 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:

CloudError

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

Deletes an authorization rule for a namespace.

Parameters:
  • resource_group_name (str) – The name of the resource group in which the namespace lives.
  • namespace_name (str) – The namespace name.
  • authorization_rule_name (str) – 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:

CloudError

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) – The name of the resource group in which the namespace lives.
  • namespace_name (str) – The name of the specified namespace.
  • 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:

NamespaceResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Gets an authorization rule for a namespace by rule name.

Parameters:
  • resource_group_name (str) – The name of the resource group in which the namespace lives.
  • namespace_name (str) – The namespace name.
  • authorization_rule_name (str) – 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:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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) – The name of the resource group in which the namespace lives.
  • 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:

SharedAccessAuthorizationRuleResourcePaged

Raises:

CloudError

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) – The name of the resource group.
  • 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:

NamespaceResourcePaged

Raises:

CloudError

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

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

Parameters:
Return type:

NamespaceResourcePaged

Raises:

CloudError

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) – The name of the resource group in which the namespace lives.
  • 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:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, policykey=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) – The name of the resource group in which the namespace lives.
  • namespace_name (str) – The namespace name.
  • authorization_rule_name (str) – The authorization rule name.
  • policykey (str or Policykey) – Key that needs to be regenerated. Possible values include: ‘PrimaryKey’, ‘SecondaryKey’
  • 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:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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.
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) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • event_hub_name (str) – The Event Hub name.
  • parameters (EventHubCreateOrUpdateParameters) – 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:

EventHubResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Creates or updates an authorization rule for the specified Event Hub.

Parameters:
Return type:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • event_hub_name (str) – The name of the Event Hub to delete.
  • 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:

CloudError

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 Hubs authorization rule.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • 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:

CloudError

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) – The name of the resource group.
  • 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:

EventHubResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Gets an authorization rule for an Event Hub by rule name.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • 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:

SharedAccessAuthorizationRuleResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list_all(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) – The name of the resource group.
  • 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:

EventHubResourcePaged

Raises:

CloudError

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) – The name of the resource group.
  • 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:

SharedAccessAuthorizationRuleResourcePaged

Raises:

CloudError

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) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • event_hub_name (str) – The Event Hub name.
  • authorization_rule_name (str) – The connection string of the namespace for the specified authorization 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:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

regenerate_keys(resource_group_name, namespace_name, event_hub_name, authorization_rule_name, policykey=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) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • event_hub_name (str) – The Event Hub name.
  • authorization_rule_name (str) – The connection string of the Event Hub for the specified authorization rule.
  • policykey (str or Policykey) – Key that needs to be regenerated. Possible values include: ‘PrimaryKey’, ‘SecondaryKey’
  • 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:

ResourceListKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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.
create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, 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) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • event_hub_name (str) – The Event Hub name.
  • consumer_group_name (str) – The consumer group name.
  • parameters (ConsumerGroupCreateOrUpdateParameters) – Parameters supplied to create a consumer group 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:

ConsumerGroupResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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) – The name of the resource group.
  • namespace_name (str) – The namespace name.
  • event_hub_name (str) – The Event Hub name.
  • consumer_group_name (str) – The Cconsumer 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:

CloudError

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) – The name of the resource group.
  • 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:

ConsumerGroupResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list_all(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) – The name of the resource group.
  • 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:

ConsumerGroupResourcePaged

Raises:

CloudError