diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py index a14be0076987..48ae001b3e1d 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/__init__.py @@ -30,10 +30,6 @@ from .messaging_regions_properties_py3 import MessagingRegionsProperties from .messaging_regions_py3 import MessagingRegions from .messaging_plan_py3 import MessagingPlan - from .subnet_py3 import Subnet - from .nw_rule_set_ip_rules_py3 import NWRuleSetIpRules - from .nw_rule_set_virtual_network_rules_py3 import NWRuleSetVirtualNetworkRules - from .network_rule_set_py3 import NetworkRuleSet except (SyntaxError, ImportError): from .tracked_resource import TrackedResource from .resource import Resource @@ -55,10 +51,6 @@ from .messaging_regions_properties import MessagingRegionsProperties from .messaging_regions import MessagingRegions from .messaging_plan import MessagingPlan - from .subnet import Subnet - from .nw_rule_set_ip_rules import NWRuleSetIpRules - from .nw_rule_set_virtual_network_rules import NWRuleSetVirtualNetworkRules - from .network_rule_set import NetworkRuleSet from .operation_paged import OperationPaged from .eh_namespace_paged import EHNamespacePaged from .authorization_rule_paged import AuthorizationRulePaged @@ -76,8 +68,6 @@ UnavailableReason, ProvisioningStateDR, RoleDisasterRecovery, - NetworkRuleIPAction, - DefaultAction, ) __all__ = [ @@ -101,10 +91,6 @@ 'MessagingRegionsProperties', 'MessagingRegions', 'MessagingPlan', - 'Subnet', - 'NWRuleSetIpRules', - 'NWRuleSetVirtualNetworkRules', - 'NetworkRuleSet', 'OperationPaged', 'EHNamespacePaged', 'AuthorizationRulePaged', @@ -121,6 +107,4 @@ 'UnavailableReason', 'ProvisioningStateDR', 'RoleDisasterRecovery', - 'NetworkRuleIPAction', - 'DefaultAction', ] diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/event_hub_management_client_enums.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/event_hub_management_client_enums.py index 8ee7a46c2aa3..8d281a4fc7f2 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/event_hub_management_client_enums.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/event_hub_management_client_enums.py @@ -78,14 +78,3 @@ class RoleDisasterRecovery(str, Enum): primary = "Primary" primary_not_replicating = "PrimaryNotReplicating" secondary = "Secondary" - - -class NetworkRuleIPAction(str, Enum): - - allow = "Allow" - - -class DefaultAction(str, Enum): - - allow = "Allow" - deny = "Deny" diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/network_rule_set.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/network_rule_set.py deleted file mode 100644 index 3de984dd7ff9..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/network_rule_set.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class NetworkRuleSet(Resource): - """Description of topic resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param default_action: Default Action for Network Rule Set. Possible - values include: 'Allow', 'Deny' - :type default_action: str or - ~azure.mgmt.eventhub.v2017_04_01.models.DefaultAction - :param virtual_network_rules: List VirtualNetwork Rules - :type virtual_network_rules: - list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetVirtualNetworkRules] - :param ip_rules: List of IpRules - :type ip_rules: - list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetIpRules] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, - } - - def __init__(self, **kwargs): - super(NetworkRuleSet, self).__init__(**kwargs) - self.default_action = kwargs.get('default_action', None) - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.ip_rules = kwargs.get('ip_rules', None) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/network_rule_set_py3.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/network_rule_set_py3.py deleted file mode 100644 index 2d32a9ee7a8e..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/network_rule_set_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class NetworkRuleSet(Resource): - """Description of topic resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param default_action: Default Action for Network Rule Set. Possible - values include: 'Allow', 'Deny' - :type default_action: str or - ~azure.mgmt.eventhub.v2017_04_01.models.DefaultAction - :param virtual_network_rules: List VirtualNetwork Rules - :type virtual_network_rules: - list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetVirtualNetworkRules] - :param ip_rules: List of IpRules - :type ip_rules: - list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetIpRules] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, - } - - def __init__(self, *, default_action=None, virtual_network_rules=None, ip_rules=None, **kwargs) -> None: - super(NetworkRuleSet, self).__init__(**kwargs) - self.default_action = default_action - self.virtual_network_rules = virtual_network_rules - self.ip_rules = ip_rules diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_ip_rules.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_ip_rules.py deleted file mode 100644 index 9204a838843b..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_ip_rules.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NWRuleSetIpRules(Model): - """The response from the List namespace operation. - - :param ip_mask: IP Mask - :type ip_mask: str - :param action: The IP Filter Action. Possible values include: 'Allow' - :type action: str or - ~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleIPAction - """ - - _attribute_map = { - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NWRuleSetIpRules, self).__init__(**kwargs) - self.ip_mask = kwargs.get('ip_mask', None) - self.action = kwargs.get('action', None) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_ip_rules_py3.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_ip_rules_py3.py deleted file mode 100644 index e94a06d67ac6..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_ip_rules_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NWRuleSetIpRules(Model): - """The response from the List namespace operation. - - :param ip_mask: IP Mask - :type ip_mask: str - :param action: The IP Filter Action. Possible values include: 'Allow' - :type action: str or - ~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleIPAction - """ - - _attribute_map = { - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - } - - def __init__(self, *, ip_mask: str=None, action=None, **kwargs) -> None: - super(NWRuleSetIpRules, self).__init__(**kwargs) - self.ip_mask = ip_mask - self.action = action diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_virtual_network_rules.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_virtual_network_rules.py deleted file mode 100644 index 0a2b26838bcd..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_virtual_network_rules.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NWRuleSetVirtualNetworkRules(Model): - """The response from the List namespace operation. - - :param subnet: Subnet properties - :type subnet: ~azure.mgmt.eventhub.v2017_04_01.models.Subnet - :param ignore_missing_vnet_service_endpoint: Value that indicates whether - to ignore missing Vnet Service Endpoint - :type ignore_missing_vnet_service_endpoint: bool - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'Subnet'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) - self.subnet = kwargs.get('subnet', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_virtual_network_rules_py3.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_virtual_network_rules_py3.py deleted file mode 100644 index 5ddd6e35188c..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/nw_rule_set_virtual_network_rules_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NWRuleSetVirtualNetworkRules(Model): - """The response from the List namespace operation. - - :param subnet: Subnet properties - :type subnet: ~azure.mgmt.eventhub.v2017_04_01.models.Subnet - :param ignore_missing_vnet_service_endpoint: Value that indicates whether - to ignore missing Vnet Service Endpoint - :type ignore_missing_vnet_service_endpoint: bool - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'Subnet'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - } - - def __init__(self, *, subnet=None, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) - self.subnet = subnet - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/subnet.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/subnet.py deleted file mode 100644 index 8e3c218017bc..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/subnet.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Properties supplied for Subnet. - - :param id: Resource ID of Virtual Network Subnet - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subnet, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/subnet_py3.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/subnet_py3.py deleted file mode 100644 index 82e9dd1413d0..000000000000 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/subnet_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subnet(Model): - """Properties supplied for Subnet. - - :param id: Resource ID of Virtual Network Subnet - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(Subnet, self).__init__(**kwargs) - self.id = id diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/namespaces_operations.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/namespaces_operations.py index e2c1cfe4439a..c666b260e5f5 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/namespaces_operations.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/namespaces_operations.py @@ -1020,134 +1020,3 @@ def regenerate_keys( return deserialized regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'} - - def create_or_update_network_rule_set( - self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update 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 parameters: The Namespace IpFilterRule. - :type parameters: - ~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleSet - :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: NetworkRuleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleSet or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update_network_rule_set.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') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - 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 body - body_content = self._serialize.body(parameters, 'NetworkRuleSet') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NetworkRuleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSet/default'} - - def get_network_rule_set( - self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): - """Gets 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: NetworkRuleSet or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleSet or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_network_rule_set.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') - - # 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) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NetworkRuleSet', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSet/default'}