Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions sdk/eventhub/azure-mgmt-eventhub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Release History

## 3.1.0 (2020-05-13)

**Features**

- Model EHNamespace has a new parameter encryption
- Model EHNamespace has a new parameter identity
- Model EHNamespace has a new parameter cluster_arm_id
- Added operation NamespacesOperations.list_keys
- Added operation NamespacesOperations.get_authorization_rule
- Added operation NamespacesOperations.check_name_availability
- Added operation NamespacesOperations.list_authorization_rules
- Added operation NamespacesOperations.regenerate_keys
- Added operation NamespacesOperations.create_or_update_authorization_rule
- Added operation NamespacesOperations.delete_authorization_rule

## 3.0.0 (2019-06-18)

**General Breaking changes**
Expand Down
21 changes: 8 additions & 13 deletions sdk/eventhub/azure-mgmt-eventhub/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
## Microsoft Azure SDK for Python
# Microsoft Azure SDK for Python

This is the Microsoft Azure EventHub Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)

Azure Resource Manager (ARM) is the next generation of management APIs
that replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) library.

For a more complete set of Azure libraries, see the [azure](https://pypi.python.org/pypi/azure) bundle package.

## Usage
# Usage

For code examples, see [EventHub Management](https://docs.microsoft.com/python/api/overview/azure/event-hub)
on docs.microsoft.com.

## Provide Feedback

# Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.

![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-eventhub%2FREADME.png)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-eventhub%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,15 @@ def consumer_groups(self):

* 2015-08-01: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2015_08_01.operations.ConsumerGroupsOperations>`
* 2017-04-01: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2017_04_01.operations.ConsumerGroupsOperations>`
* 2018-01-01-preview: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.ConsumerGroupsOperations>`
"""
api_version = self._get_api_version('consumer_groups')
if api_version == '2015-08-01':
from .v2015_08_01.operations import ConsumerGroupsOperations as OperationClass
elif api_version == '2017-04-01':
from .v2017_04_01.operations import ConsumerGroupsOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import ConsumerGroupsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -134,10 +137,13 @@ def disaster_recovery_configs(self):
"""Instance depends on the API version:

* 2017-04-01: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2017_04_01.operations.DisasterRecoveryConfigsOperations>`
* 2018-01-01-preview: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.DisasterRecoveryConfigsOperations>`
"""
api_version = self._get_api_version('disaster_recovery_configs')
if api_version == '2017-04-01':
from .v2017_04_01.operations import DisasterRecoveryConfigsOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -148,12 +154,15 @@ def event_hubs(self):

* 2015-08-01: :class:`EventHubsOperations<azure.mgmt.eventhub.v2015_08_01.operations.EventHubsOperations>`
* 2017-04-01: :class:`EventHubsOperations<azure.mgmt.eventhub.v2017_04_01.operations.EventHubsOperations>`
* 2018-01-01-preview: :class:`EventHubsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.EventHubsOperations>`
"""
api_version = self._get_api_version('event_hubs')
if api_version == '2015-08-01':
from .v2015_08_01.operations import EventHubsOperations as OperationClass
elif api_version == '2017-04-01':
from .v2017_04_01.operations import EventHubsOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import EventHubsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down Expand Up @@ -201,10 +210,13 @@ def regions(self):
"""Instance depends on the API version:

* 2017-04-01: :class:`RegionsOperations<azure.mgmt.eventhub.v2017_04_01.operations.RegionsOperations>`
* 2018-01-01-preview: :class:`RegionsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.RegionsOperations>`
"""
api_version = self._get_api_version('regions')
if api_version == '2017-04-01':
from .v2017_04_01.operations import RegionsOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import RegionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def get_authorization_rule(
return deserialized
get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'}

def postt_authorization_rule(
def post_authorization_rule(
self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config):
"""Gets an AuthorizationRule for an Event Hub by rule name.

Expand All @@ -558,7 +558,7 @@ def postt_authorization_rule(
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.postt_authorization_rule.metadata['url']
url = self.post_authorization_rule.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6),
Expand Down Expand Up @@ -600,7 +600,7 @@ def postt_authorization_rule(
return client_raw_response

return deserialized
postt_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'}
post_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'}

def delete_authorization_rule(
self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
from msrest import Serializer, Deserializer

from ._configuration import EventHubManagementClientConfiguration
from .operations import Operations
from .operations import NamespacesOperations
from .operations import DisasterRecoveryConfigsOperations
from .operations import EventHubsOperations
from .operations import ConsumerGroupsOperations
from .operations import Operations
from .operations import RegionsOperations
from . import models

Expand All @@ -28,8 +28,6 @@ class EventHubManagementClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: EventHubManagementClientConfiguration

:ivar operations: Operations operations
:vartype operations: azure.mgmt.eventhub.v2017_04_01.operations.Operations
:ivar namespaces: Namespaces operations
:vartype namespaces: azure.mgmt.eventhub.v2017_04_01.operations.NamespacesOperations
:ivar disaster_recovery_configs: DisasterRecoveryConfigs operations
Expand All @@ -38,6 +36,8 @@ class EventHubManagementClient(SDKClient):
:vartype event_hubs: azure.mgmt.eventhub.v2017_04_01.operations.EventHubsOperations
:ivar consumer_groups: ConsumerGroups operations
:vartype consumer_groups: azure.mgmt.eventhub.v2017_04_01.operations.ConsumerGroupsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.eventhub.v2017_04_01.operations.Operations
:ivar regions: Regions operations
:vartype regions: azure.mgmt.eventhub.v2017_04_01.operations.RegionsOperations

Expand All @@ -62,8 +62,6 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.namespaces = NamespacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.disaster_recovery_configs = DisasterRecoveryConfigsOperations(
Expand All @@ -72,5 +70,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.consumer_groups = ConsumerGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.regions = RegionsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,18 @@
from ._paged_models import EHNamespacePaged
from ._paged_models import EventhubPaged
from ._paged_models import MessagingRegionsPaged
from ._paged_models import NetworkRuleSetPaged
from ._paged_models import OperationPaged
from ._event_hub_management_client_enums import (
SkuName,
SkuTier,
AccessRights,
KeyType,
EntityStatus,
EncodingCaptureDescription,
UnavailableReason,
ProvisioningStateDR,
RoleDisasterRecovery,
EncodingCaptureDescription,
EntityStatus,
SkuName,
SkuTier,
NetworkRuleIPAction,
DefaultAction,
)
Expand Down Expand Up @@ -105,22 +106,23 @@
'Sku',
'Subnet',
'TrackedResource',
'OperationPaged',
'EHNamespacePaged',
'AuthorizationRulePaged',
'EHNamespacePaged',
'NetworkRuleSetPaged',
'ArmDisasterRecoveryPaged',
'EventhubPaged',
'ConsumerGroupPaged',
'OperationPaged',
'MessagingRegionsPaged',
'SkuName',
'SkuTier',
'AccessRights',
'KeyType',
'EntityStatus',
'EncodingCaptureDescription',
'UnavailableReason',
'ProvisioningStateDR',
'RoleDisasterRecovery',
'EncodingCaptureDescription',
'EntityStatus',
'SkuName',
'SkuTier',
'NetworkRuleIPAction',
'DefaultAction',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@
from enum import Enum


class SkuName(str, Enum):

basic = "Basic"
standard = "Standard"


class SkuTier(str, Enum):

basic = "Basic"
standard = "Standard"


class AccessRights(str, Enum):

manage = "Manage"
Expand All @@ -37,25 +25,6 @@ class KeyType(str, Enum):
secondary_key = "SecondaryKey"


class EntityStatus(str, Enum):

active = "Active"
disabled = "Disabled"
restoring = "Restoring"
send_disabled = "SendDisabled"
receive_disabled = "ReceiveDisabled"
creating = "Creating"
deleting = "Deleting"
renaming = "Renaming"
unknown = "Unknown"


class EncodingCaptureDescription(str, Enum):

avro = "Avro"
avro_deflate = "AvroDeflate"


class UnavailableReason(str, Enum):

none = "None"
Expand All @@ -80,6 +49,37 @@ class RoleDisasterRecovery(str, Enum):
secondary = "Secondary"


class EncodingCaptureDescription(str, Enum):

avro = "Avro"
avro_deflate = "AvroDeflate"


class EntityStatus(str, Enum):

active = "Active"
disabled = "Disabled"
restoring = "Restoring"
send_disabled = "SendDisabled"
receive_disabled = "ReceiveDisabled"
creating = "Creating"
deleting = "Deleting"
renaming = "Renaming"
unknown = "Unknown"


class SkuName(str, Enum):

basic = "Basic"
standard = "Standard"


class SkuTier(str, Enum):

basic = "Basic"
standard = "Standard"


class NetworkRuleIPAction(str, Enum):

allow = "Allow"
Expand Down
Loading