From bf1dc12f2c9bb7d94486b0368379d4f4d76c1009 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Fri, 6 Dec 2019 22:13:23 +0000 Subject: [PATCH 1/2] Generated from e6fe8982616bc5219be3f69b2486aa9cb00d6cf2 Update EventHub.json --- .../operations/_event_hubs_operations.py | 6 +- .../eventhub/v2017_04_01/models/__init__.py | 2 + .../v2017_04_01/models/_paged_models.py | 13 +++ .../operations/_consumer_groups_operations.py | 8 +- .../operations/_event_hubs_operations.py | 20 +++-- .../operations/_namespaces_operations.py | 72 ++++++++++++++++ .../v2018_01_01_preview/models/__init__.py | 13 +++ ...hub2018_preview_management_client_enums.py | 10 +++ .../v2018_01_01_preview/models/_models.py | 84 ++++++++++++++++++ .../v2018_01_01_preview/models/_models_py3.py | 86 ++++++++++++++++++- 10 files changed, 297 insertions(+), 17 deletions(-) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/operations/_event_hubs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/operations/_event_hubs_operations.py index dd766335d387..dac0334ae47b 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/operations/_event_hubs_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/operations/_event_hubs_operations.py @@ -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. @@ -558,7 +558,7 @@ def postt_authorization_rule( :raises: :class:`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), @@ -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): diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py index c92d44cdcc3e..c31767c81f7c 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py @@ -65,6 +65,7 @@ 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, @@ -108,6 +109,7 @@ 'OperationPaged', 'EHNamespacePaged', 'AuthorizationRulePaged', + 'NetworkRuleSetPaged', 'ArmDisasterRecoveryPaged', 'EventhubPaged', 'ConsumerGroupPaged', diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_paged_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_paged_models.py index e12c4a12fc16..8da0538736d5 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_paged_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_paged_models.py @@ -51,6 +51,19 @@ class AuthorizationRulePaged(Paged): def __init__(self, *args, **kwargs): super(AuthorizationRulePaged, self).__init__(*args, **kwargs) +class NetworkRuleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`NetworkRuleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NetworkRuleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(NetworkRuleSetPaged, self).__init__(*args, **kwargs) class ArmDisasterRecoveryPaged(Paged): """ A paging container for iterating over a list of :class:`ArmDisasterRecovery ` object diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py index f67c245d69b7..01e3b125308f 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_consumer_groups_operations.py @@ -75,7 +75,7 @@ def create_or_update( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -146,7 +146,7 @@ def delete( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -206,7 +206,7 @@ def get( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -282,7 +282,7 @@ def prepare_request(next_link=None): 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py index a29f63419898..3ffb1de61aa3 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_event_hubs_operations.py @@ -153,7 +153,7 @@ def create_or_update( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -220,7 +220,7 @@ def delete( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -277,7 +277,7 @@ def get( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -343,7 +343,7 @@ def prepare_request(next_link=None): 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -392,6 +392,8 @@ def internal_paging(next_link=None): def create_or_update_authorization_rule( self, resource_group_name, namespace_name, event_hub_name, authorization_rule_name, rights, custom_headers=None, raw=False, **operation_config): """Creates or updates an AuthorizationRule for the specified Event Hub. + Creation/update of the AuthorizationRule will take a few seconds to + take effect. :param resource_group_name: Name of the resource group within the azure subscription. @@ -423,7 +425,7 @@ def create_or_update_authorization_rule( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -494,7 +496,7 @@ def get_authorization_rule( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -560,7 +562,7 @@ def delete_authorization_rule( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -620,7 +622,7 @@ def list_keys( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -695,7 +697,7 @@ def regenerate_keys( 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), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_namespaces_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_namespaces_operations.py index aa22918f9d55..39c925056d54 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_namespaces_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_namespaces_operations.py @@ -1149,3 +1149,75 @@ def get_network_rule_set( return deserialized get_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'} + + def list_network_rule_sets( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets list of NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the resource group within the + azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name + :type namespace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NetworkRuleSet + :rtype: + ~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleSetPaged[~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleSet] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_network_rule_sets.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), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NetworkRuleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_network_rule_sets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets'} diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py index 9d1ede2b9be6..48393e2fd96b 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py @@ -18,8 +18,11 @@ from ._models_py3 import EHNamespace from ._models_py3 import EHNamespaceIdContainer from ._models_py3 import EHNamespaceIdListResult + from ._models_py3 import Encryption from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Identity from ._models_py3 import IpFilterRule + from ._models_py3 import KeyVaultProperties from ._models_py3 import NetworkRuleSet from ._models_py3 import NWRuleSetIpRules from ._models_py3 import NWRuleSetVirtualNetworkRules @@ -39,8 +42,11 @@ from ._models import EHNamespace from ._models import EHNamespaceIdContainer from ._models import EHNamespaceIdListResult + from ._models import Encryption from ._models import ErrorResponse, ErrorResponseException + from ._models import Identity from ._models import IpFilterRule + from ._models import KeyVaultProperties from ._models import NetworkRuleSet from ._models import NWRuleSetIpRules from ._models import NWRuleSetVirtualNetworkRules @@ -59,6 +65,8 @@ from ._event_hub2018_preview_management_client_enums import ( SkuName, SkuTier, + IdentityType, + KeySource, IPAction, NetworkRuleIPAction, DefaultAction, @@ -73,8 +81,11 @@ 'EHNamespace', 'EHNamespaceIdContainer', 'EHNamespaceIdListResult', + 'Encryption', 'ErrorResponse', 'ErrorResponseException', + 'Identity', 'IpFilterRule', + 'KeyVaultProperties', 'NetworkRuleSet', 'NWRuleSetIpRules', 'NWRuleSetVirtualNetworkRules', @@ -92,6 +103,8 @@ 'VirtualNetworkRulePaged', 'SkuName', 'SkuTier', + 'IdentityType', + 'KeySource', 'IPAction', 'NetworkRuleIPAction', 'DefaultAction', diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub2018_preview_management_client_enums.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub2018_preview_management_client_enums.py index c4fc0941ad4a..431d94e770a4 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub2018_preview_management_client_enums.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_event_hub2018_preview_management_client_enums.py @@ -24,6 +24,16 @@ class SkuTier(str, Enum): standard = "Standard" +class IdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class KeySource(str, Enum): + + microsoft_key_vault = "Microsoft.KeyVault" + + class IPAction(str, Enum): accept = "Accept" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py index 199ddbc2b6b2..31a86638a98d 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py @@ -264,6 +264,8 @@ class EHNamespace(TrackedResource): :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus operations. :vartype service_bus_endpoint: str + :param cluster_arm_id: Cluster ARM ID of the Namespace. + :type cluster_arm_id: str :ivar metric_id: Identifier for Azure Insights metrics. :vartype metric_id: str :param is_auto_inflate_enabled: Value that indicates whether AutoInflate @@ -279,6 +281,11 @@ class EHNamespace(TrackedResource): :param zone_redundant: Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. :type zone_redundant: bool + :param identity: Properties of BYOK Identity description + :type identity: ~azure.mgmt.eventhub.v2018_01_01_preview.models.Identity + :param encryption: Properties of BYOK Encryption description + :type encryption: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.Encryption """ _validation = { @@ -304,11 +311,14 @@ class EHNamespace(TrackedResource): 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'cluster_arm_id': {'key': 'properties.clusterArmId', 'type': 'str'}, 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, 'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'}, 'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'}, 'kafka_enabled': {'key': 'properties.kafkaEnabled', 'type': 'bool'}, 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'identity': {'key': 'properties.identity', 'type': 'Identity'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, } def __init__(self, **kwargs): @@ -318,11 +328,14 @@ def __init__(self, **kwargs): self.created_at = None self.updated_at = None self.service_bus_endpoint = None + self.cluster_arm_id = kwargs.get('cluster_arm_id', None) self.metric_id = None self.is_auto_inflate_enabled = kwargs.get('is_auto_inflate_enabled', None) self.maximum_throughput_units = kwargs.get('maximum_throughput_units', None) self.kafka_enabled = kwargs.get('kafka_enabled', None) self.zone_redundant = kwargs.get('zone_redundant', None) + self.identity = kwargs.get('identity', None) + self.encryption = kwargs.get('encryption', None) class EHNamespaceIdContainer(Model): @@ -358,6 +371,30 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class Encryption(Model): + """Properties to configure Encryption. + + :param key_vault_properties: Properties of KeyVault + :type key_vault_properties: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.KeyVaultProperties + :param key_source: Enumerates the possible value of keySource for + Encryption. Possible values include: 'Microsoft.KeyVault'. Default value: + "Microsoft.KeyVault" . + :type key_source: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.KeySource + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'key_source': {'key': 'keySource', 'type': 'KeySource'}, + } + + def __init__(self, **kwargs): + super(Encryption, self).__init__(**kwargs) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + self.key_source = kwargs.get('key_source', "Microsoft.KeyVault") + + class ErrorResponse(Model): """Error response that indicates the service is not able to process the incoming request. The reason is provided in the error message. @@ -391,6 +428,33 @@ def __init__(self, deserialize, response, *args): super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) +class Identity(Model): + """Properties to configure Identity for Bring your Own Keys. + + :param principal_id: ObjectId from the KeyVault + :type principal_id: str + :param tenant_id: TenantId from the KeyVault + :type tenant_id: str + :param type: Enumerates the possible value Identity type, which currently + supports only 'SystemAssigned'. Possible values include: 'SystemAssigned'. + Default value: "SystemAssigned" . + :type type: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.IdentityType + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.type = kwargs.get('type', "SystemAssigned") + + class IpFilterRule(Resource): """Single item in a List or Get IpFilterRules operation. @@ -435,6 +499,26 @@ def __init__(self, **kwargs): self.filter_name = kwargs.get('filter_name', None) +class KeyVaultProperties(Model): + """Properties to configure keyVault Properties. + + :param key_name: Name of the Key from KeyVault + :type key_name: str + :param key_vault_uri: Uri of KeyVault + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + + class NetworkRuleSet(Resource): """Description of topic resource. diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py index ff2686722b95..d03aa87bbf33 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py @@ -264,6 +264,8 @@ class EHNamespace(TrackedResource): :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus operations. :vartype service_bus_endpoint: str + :param cluster_arm_id: Cluster ARM ID of the Namespace. + :type cluster_arm_id: str :ivar metric_id: Identifier for Azure Insights metrics. :vartype metric_id: str :param is_auto_inflate_enabled: Value that indicates whether AutoInflate @@ -279,6 +281,11 @@ class EHNamespace(TrackedResource): :param zone_redundant: Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. :type zone_redundant: bool + :param identity: Properties of BYOK Identity description + :type identity: ~azure.mgmt.eventhub.v2018_01_01_preview.models.Identity + :param encryption: Properties of BYOK Encryption description + :type encryption: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.Encryption """ _validation = { @@ -304,25 +311,31 @@ class EHNamespace(TrackedResource): 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'cluster_arm_id': {'key': 'properties.clusterArmId', 'type': 'str'}, 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, 'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'}, 'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'}, 'kafka_enabled': {'key': 'properties.kafkaEnabled', 'type': 'bool'}, 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'identity': {'key': 'properties.identity', 'type': 'Identity'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, } - def __init__(self, *, location: str=None, tags=None, sku=None, is_auto_inflate_enabled: bool=None, maximum_throughput_units: int=None, kafka_enabled: bool=None, zone_redundant: bool=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, sku=None, cluster_arm_id: str=None, is_auto_inflate_enabled: bool=None, maximum_throughput_units: int=None, kafka_enabled: bool=None, zone_redundant: bool=None, identity=None, encryption=None, **kwargs) -> None: super(EHNamespace, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.provisioning_state = None self.created_at = None self.updated_at = None self.service_bus_endpoint = None + self.cluster_arm_id = cluster_arm_id self.metric_id = None self.is_auto_inflate_enabled = is_auto_inflate_enabled self.maximum_throughput_units = maximum_throughput_units self.kafka_enabled = kafka_enabled self.zone_redundant = zone_redundant + self.identity = identity + self.encryption = encryption class EHNamespaceIdContainer(Model): @@ -358,6 +371,30 @@ def __init__(self, *, value=None, **kwargs) -> None: self.value = value +class Encryption(Model): + """Properties to configure Encryption. + + :param key_vault_properties: Properties of KeyVault + :type key_vault_properties: + ~azure.mgmt.eventhub.v2018_01_01_preview.models.KeyVaultProperties + :param key_source: Enumerates the possible value of keySource for + Encryption. Possible values include: 'Microsoft.KeyVault'. Default value: + "Microsoft.KeyVault" . + :type key_source: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.KeySource + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'key_source': {'key': 'keySource', 'type': 'KeySource'}, + } + + def __init__(self, *, key_vault_properties=None, key_source="Microsoft.KeyVault", **kwargs) -> None: + super(Encryption, self).__init__(**kwargs) + self.key_vault_properties = key_vault_properties + self.key_source = key_source + + class ErrorResponse(Model): """Error response that indicates the service is not able to process the incoming request. The reason is provided in the error message. @@ -391,6 +428,33 @@ def __init__(self, deserialize, response, *args): super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) +class Identity(Model): + """Properties to configure Identity for Bring your Own Keys. + + :param principal_id: ObjectId from the KeyVault + :type principal_id: str + :param tenant_id: TenantId from the KeyVault + :type tenant_id: str + :param type: Enumerates the possible value Identity type, which currently + supports only 'SystemAssigned'. Possible values include: 'SystemAssigned'. + Default value: "SystemAssigned" . + :type type: str or + ~azure.mgmt.eventhub.v2018_01_01_preview.models.IdentityType + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, *, principal_id: str=None, tenant_id: str=None, type="SystemAssigned", **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = principal_id + self.tenant_id = tenant_id + self.type = type + + class IpFilterRule(Resource): """Single item in a List or Get IpFilterRules operation. @@ -435,6 +499,26 @@ def __init__(self, *, ip_mask: str=None, action=None, filter_name: str=None, **k self.filter_name = filter_name +class KeyVaultProperties(Model): + """Properties to configure keyVault Properties. + + :param key_name: Name of the Key from KeyVault + :type key_name: str + :param key_vault_uri: Uri of KeyVault + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + } + + def __init__(self, *, key_name: str=None, key_vault_uri: str=None, **kwargs) -> None: + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = key_name + self.key_vault_uri = key_vault_uri + + class NetworkRuleSet(Resource): """Description of topic resource. From 2e95e52129be794af305c9e1c11c3613c53fa0e2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Fri, 6 Dec 2019 22:20:32 +0000 Subject: [PATCH 2/2] Packaging update of azure-mgmt-eventhub --- sdk/eventhub/azure-mgmt-eventhub/README.rst | 2 +- sdk/eventhub/azure-mgmt-eventhub/setup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/eventhub/azure-mgmt-eventhub/README.rst b/sdk/eventhub/azure-mgmt-eventhub/README.rst index 66572afc27fb..2055b4878154 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/README.rst +++ b/sdk/eventhub/azure-mgmt-eventhub/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure EventHub Management Client Library. 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. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/eventhub/azure-mgmt-eventhub/setup.py b/sdk/eventhub/azure-mgmt-eventhub/setup.py index a73cf3ed43fd..0ba86e893081 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/setup.py +++ b/sdk/eventhub/azure-mgmt-eventhub/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',