From f33b686c28cc79ecc5ff2b817acc3e6b3922085a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 16 Oct 2018 21:25:52 +0000 Subject: [PATCH 1/4] Generated from d7bcecddf6db2cf2857de2ed818a5b3a33bf4b5f moved VNet and IpFilter rules from 2018-preview to 2017 API version --- .../azure/mgmt/servicebus/models/__init__.py | 12 + .../mgmt/servicebus/models/ip_filter_rule.py | 55 ++ .../servicebus/models/ip_filter_rule_paged.py | 27 + .../servicebus/models/ip_filter_rule_py3.py | 55 ++ .../service_bus_management_client_enums.py | 6 + .../servicebus/models/virtual_network_rule.py | 46 ++ .../models/virtual_network_rule_paged.py | 27 + .../models/virtual_network_rule_py3.py | 46 ++ .../operations/namespaces_operations.py | 527 ++++++++++++++++++ .../azure/mgmt/servicebus/version.py | 2 +- 10 files changed, 802 insertions(+), 1 deletion(-) create mode 100644 azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule.py create mode 100644 azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_paged.py create mode 100644 azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_py3.py create mode 100644 azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule.py create mode 100644 azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_paged.py create mode 100644 azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_py3.py diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py index 28d9624d67c0..5d211fbf8244 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py @@ -41,6 +41,8 @@ from .eventhub_py3 import Eventhub from .arm_disaster_recovery_py3 import ArmDisasterRecovery from .migration_config_properties_py3 import MigrationConfigProperties + from .ip_filter_rule_py3 import IpFilterRule + from .virtual_network_rule_py3 import VirtualNetworkRule except (SyntaxError, ImportError): from .tracked_resource import TrackedResource from .resource import Resource @@ -73,9 +75,13 @@ from .eventhub import Eventhub from .arm_disaster_recovery import ArmDisasterRecovery from .migration_config_properties import MigrationConfigProperties + from .ip_filter_rule import IpFilterRule + from .virtual_network_rule import VirtualNetworkRule from .operation_paged import OperationPaged from .sb_namespace_paged import SBNamespacePaged from .sb_authorization_rule_paged import SBAuthorizationRulePaged +from .ip_filter_rule_paged import IpFilterRulePaged +from .virtual_network_rule_paged import VirtualNetworkRulePaged from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged from .migration_config_properties_paged import MigrationConfigPropertiesPaged from .sb_queue_paged import SBQueuePaged @@ -95,6 +101,7 @@ EncodingCaptureDescription, ProvisioningStateDR, RoleDisasterRecovery, + IPAction, ) __all__ = [ @@ -129,9 +136,13 @@ 'Eventhub', 'ArmDisasterRecovery', 'MigrationConfigProperties', + 'IpFilterRule', + 'VirtualNetworkRule', 'OperationPaged', 'SBNamespacePaged', 'SBAuthorizationRulePaged', + 'IpFilterRulePaged', + 'VirtualNetworkRulePaged', 'ArmDisasterRecoveryPaged', 'MigrationConfigPropertiesPaged', 'SBQueuePaged', @@ -150,4 +161,5 @@ 'EncodingCaptureDescription', 'ProvisioningStateDR', 'RoleDisasterRecovery', + 'IPAction', ] diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule.py new file mode 100644 index 000000000000..927652d86d36 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule.py @@ -0,0 +1,55 @@ +# 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 IpFilterRule(Resource): + """Single item in a List or Get IpFilterRules operation. + + 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 ip_mask: IP Mask + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: 'Accept', + 'Reject' + :type action: str or ~azure.mgmt.servicebus.models.IPAction + :param filter_name: IP Filter name + :type filter_name: str + """ + + _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'}, + 'ip_mask': {'key': 'properties.ipMask', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'str'}, + 'filter_name': {'key': 'properties.filterName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpFilterRule, self).__init__(**kwargs) + self.ip_mask = kwargs.get('ip_mask', None) + self.action = kwargs.get('action', None) + self.filter_name = kwargs.get('filter_name', None) diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_paged.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_paged.py new file mode 100644 index 000000000000..44c2148fff71 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class IpFilterRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`IpFilterRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IpFilterRule]'} + } + + def __init__(self, *args, **kwargs): + + super(IpFilterRulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_py3.py new file mode 100644 index 000000000000..2b74fc97b46c --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/ip_filter_rule_py3.py @@ -0,0 +1,55 @@ +# 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 IpFilterRule(Resource): + """Single item in a List or Get IpFilterRules operation. + + 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 ip_mask: IP Mask + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: 'Accept', + 'Reject' + :type action: str or ~azure.mgmt.servicebus.models.IPAction + :param filter_name: IP Filter name + :type filter_name: str + """ + + _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'}, + 'ip_mask': {'key': 'properties.ipMask', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'str'}, + 'filter_name': {'key': 'properties.filterName', 'type': 'str'}, + } + + def __init__(self, *, ip_mask: str=None, action=None, filter_name: str=None, **kwargs) -> None: + super(IpFilterRule, self).__init__(**kwargs) + self.ip_mask = ip_mask + self.action = action + self.filter_name = filter_name diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py index a313fa144d3b..53552468acd9 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py @@ -86,3 +86,9 @@ class RoleDisasterRecovery(str, Enum): primary = "Primary" primary_not_replicating = "PrimaryNotReplicating" secondary = "Secondary" + + +class IPAction(str, Enum): + + accept = "Accept" + reject = "Reject" diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule.py new file mode 100644 index 000000000000..68c1a893cf4c --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule.py @@ -0,0 +1,46 @@ +# 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 VirtualNetworkRule(Resource): + """Single item in a List or Get VirtualNetworkRules operation. + + 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 virtual_network_subnet_id: Resource ID of Virtual Network Subnet + :type virtual_network_subnet_id: str + """ + + _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'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None) diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_paged.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_paged.py new file mode 100644 index 000000000000..7808ab7872f9 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class VirtualNetworkRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..7fd2e204ca98 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/virtual_network_rule_py3.py @@ -0,0 +1,46 @@ +# 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 VirtualNetworkRule(Resource): + """Single item in a List or Get VirtualNetworkRules operation. + + 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 virtual_network_subnet_id: Resource ID of Virtual Network Subnet + :type virtual_network_subnet_id: str + """ + + _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'}, + 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, + } + + def __init__(self, *, virtual_network_subnet_id: str=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_subnet_id = virtual_network_subnet_id diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py index 24c24da1dfa5..7768f6856311 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py @@ -958,3 +958,530 @@ def regenerate_keys( return deserialized regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'} + + def list_ip_filter_rules( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of IP Filter rules 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 IpFilterRule + :rtype: + ~azure.mgmt.servicebus.models.IpFilterRulePaged[~azure.mgmt.servicebus.models.IpFilterRule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_ip_filter_rules.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) + 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 + deserialized = models.IpFilterRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.IpFilterRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_ip_filter_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/ipfilterrules'} + + def create_or_update_ip_filter_rule( + self, resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an IpFilterRule 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 ip_filter_rule_name: The IP Filter Rule name. + :type ip_filter_rule_name: str + :param parameters: The Namespace IpFilterRule. + :type parameters: ~azure.mgmt.servicebus.models.IpFilterRule + :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: IpFilterRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicebus.models.IpFilterRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update_ip_filter_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), + 'ipFilterRuleName': self._serialize.url("ip_filter_rule_name", ip_filter_rule_name, 'str', 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) + + # 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, 'IpFilterRule') + + # 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('IpFilterRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_ip_filter_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'} + + def delete_ip_filter_rule( + self, resource_group_name, namespace_name, ip_filter_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes an IpFilterRule 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 ip_filter_rule_name: The IP Filter Rule name. + :type ip_filter_rule_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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_ip_filter_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), + 'ipFilterRuleName': self._serialize.url("ip_filter_rule_name", ip_filter_rule_name, 'str', 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) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_ip_filter_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'} + + def get_ip_filter_rule( + self, resource_group_name, namespace_name, ip_filter_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets an IpFilterRule for a Namespace by rule name. + + :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 ip_filter_rule_name: The IP Filter Rule name. + :type ip_filter_rule_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: IpFilterRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicebus.models.IpFilterRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_ip_filter_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), + 'ipFilterRuleName': self._serialize.url("ip_filter_rule_name", ip_filter_rule_name, 'str', 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) + + # 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('IpFilterRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ip_filter_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'} + + def list_virtual_network_rules( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of VirtualNetwork rules 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 VirtualNetworkRule + :rtype: + ~azure.mgmt.servicebus.models.VirtualNetworkRulePaged[~azure.mgmt.servicebus.models.VirtualNetworkRule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_virtual_network_rules.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) + 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 + deserialized = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VirtualNetworkRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_virtual_network_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/virtualnetworkrules'} + + def create_or_update_virtual_network_rule( + self, resource_group_name, namespace_name, virtual_network_rule_name, virtual_network_subnet_id=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an VirtualNetworkRule 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 virtual_network_rule_name: The Virtual Network Rule name. + :type virtual_network_rule_name: str + :param virtual_network_subnet_id: Resource ID of Virtual Network + Subnet + :type virtual_network_subnet_id: 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: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicebus.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.VirtualNetworkRule(virtual_network_subnet_id=virtual_network_subnet_id) + + # Construct URL + url = self.create_or_update_virtual_network_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), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str', 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) + + # 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, 'VirtualNetworkRule') + + # 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('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_virtual_network_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'} + + def delete_virtual_network_rule( + self, resource_group_name, namespace_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Deletes an VirtualNetworkRule 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 virtual_network_rule_name: The Virtual Network Rule name. + :type virtual_network_rule_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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete_virtual_network_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), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str', 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) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_virtual_network_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'} + + def get_virtual_network_rule( + self, resource_group_name, namespace_name, virtual_network_rule_name, custom_headers=None, raw=False, **operation_config): + """Gets an VirtualNetworkRule for a Namespace by rule name. + + :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 virtual_network_rule_name: The Virtual Network Rule name. + :type virtual_network_rule_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: VirtualNetworkRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicebus.models.VirtualNetworkRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_virtual_network_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), + 'virtualNetworkRuleName': self._serialize.url("virtual_network_rule_name", virtual_network_rule_name, 'str', 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) + + # 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('VirtualNetworkRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_virtual_network_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'} diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py index 3c93989b8fef..266f5a486d79 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.5.2" +VERSION = "0.5.0" From 792adf7981370c711cd4fd79e86701f011ac588f Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Tue, 16 Oct 2018 21:32:42 +0000 Subject: [PATCH 2/4] Packaging update of azure-mgmt-servicebus --- azure-mgmt-servicebus/MANIFEST.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-mgmt-servicebus/MANIFEST.in b/azure-mgmt-servicebus/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-servicebus/MANIFEST.in +++ b/azure-mgmt-servicebus/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + From d57e1268981c1c1dccd06be1cdebb4d12d053656 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 16 Oct 2018 23:54:16 +0000 Subject: [PATCH 3/4] Generated from cf8138058fa1001ab7532759064a35de1860aed5 added the readonly enum for type of replication of Alias(Geo DR) --- .../azure/mgmt/servicebus/models/__init__.py | 2 ++ .../azure/mgmt/servicebus/models/arm_disaster_recovery.py | 7 +++++++ .../mgmt/servicebus/models/arm_disaster_recovery_py3.py | 7 +++++++ .../models/service_bus_management_client_enums.py | 5 +++++ 4 files changed, 21 insertions(+) diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py index 5d211fbf8244..7d6422550e29 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py @@ -101,6 +101,7 @@ EncodingCaptureDescription, ProvisioningStateDR, RoleDisasterRecovery, + ReplicationType, IPAction, ) @@ -161,5 +162,6 @@ 'EncodingCaptureDescription', 'ProvisioningStateDR', 'RoleDisasterRecovery', + 'ReplicationType', 'IPAction', ] diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py index b2134935b610..226942e72526 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py @@ -43,6 +43,10 @@ class ArmDisasterRecovery(Resource): 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery + :ivar arm_disaster_recovery_type: Replication Type on the Alias(Disaster + Recovery configurations). Possible values include: 'MetadataReplication' + :vartype arm_disaster_recovery_type: str or + ~azure.mgmt.servicebus.models.ReplicationType """ _validation = { @@ -52,6 +56,7 @@ class ArmDisasterRecovery(Resource): 'provisioning_state': {'readonly': True}, 'pending_replication_operations_count': {'readonly': True}, 'role': {'readonly': True}, + 'arm_disaster_recovery_type': {'readonly': True}, } _attribute_map = { @@ -63,6 +68,7 @@ class ArmDisasterRecovery(Resource): 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, + 'arm_disaster_recovery_type': {'key': 'properties.type', 'type': 'ReplicationType'}, } def __init__(self, **kwargs): @@ -72,3 +78,4 @@ def __init__(self, **kwargs): self.partner_namespace = kwargs.get('partner_namespace', None) self.alternate_name = kwargs.get('alternate_name', None) self.role = None + self.arm_disaster_recovery_type = None diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py index 6b6b91e9c6db..b2248047c2df 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py @@ -43,6 +43,10 @@ class ArmDisasterRecovery(Resource): 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery + :ivar arm_disaster_recovery_type: Replication Type on the Alias(Disaster + Recovery configurations). Possible values include: 'MetadataReplication' + :vartype arm_disaster_recovery_type: str or + ~azure.mgmt.servicebus.models.ReplicationType """ _validation = { @@ -52,6 +56,7 @@ class ArmDisasterRecovery(Resource): 'provisioning_state': {'readonly': True}, 'pending_replication_operations_count': {'readonly': True}, 'role': {'readonly': True}, + 'arm_disaster_recovery_type': {'readonly': True}, } _attribute_map = { @@ -63,6 +68,7 @@ class ArmDisasterRecovery(Resource): 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, + 'arm_disaster_recovery_type': {'key': 'properties.type', 'type': 'ReplicationType'}, } def __init__(self, *, partner_namespace: str=None, alternate_name: str=None, **kwargs) -> None: @@ -72,3 +78,4 @@ def __init__(self, *, partner_namespace: str=None, alternate_name: str=None, **k self.partner_namespace = partner_namespace self.alternate_name = alternate_name self.role = None + self.arm_disaster_recovery_type = None diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py index 53552468acd9..e426e58334f4 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py @@ -88,6 +88,11 @@ class RoleDisasterRecovery(str, Enum): secondary = "Secondary" +class ReplicationType(str, Enum): + + metadata_replication = "MetadataReplication" + + class IPAction(str, Enum): accept = "Accept" From e3d86d7af05a2bad4f4e22355cef0e508cc2dec3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 17 Oct 2018 00:22:22 +0000 Subject: [PATCH 4/4] Generated from fedce30b02d58fee823a40fd8cfb34fe8ddbd514 Removed the type property of DisasterRecoveryConfig --- .../azure/mgmt/servicebus/models/__init__.py | 2 -- .../azure/mgmt/servicebus/models/arm_disaster_recovery.py | 7 ------- .../mgmt/servicebus/models/arm_disaster_recovery_py3.py | 7 ------- .../models/service_bus_management_client_enums.py | 5 ----- 4 files changed, 21 deletions(-) diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py index 7d6422550e29..5d211fbf8244 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py @@ -101,7 +101,6 @@ EncodingCaptureDescription, ProvisioningStateDR, RoleDisasterRecovery, - ReplicationType, IPAction, ) @@ -162,6 +161,5 @@ 'EncodingCaptureDescription', 'ProvisioningStateDR', 'RoleDisasterRecovery', - 'ReplicationType', 'IPAction', ] diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py index 226942e72526..b2134935b610 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py @@ -43,10 +43,6 @@ class ArmDisasterRecovery(Resource): 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery - :ivar arm_disaster_recovery_type: Replication Type on the Alias(Disaster - Recovery configurations). Possible values include: 'MetadataReplication' - :vartype arm_disaster_recovery_type: str or - ~azure.mgmt.servicebus.models.ReplicationType """ _validation = { @@ -56,7 +52,6 @@ class ArmDisasterRecovery(Resource): 'provisioning_state': {'readonly': True}, 'pending_replication_operations_count': {'readonly': True}, 'role': {'readonly': True}, - 'arm_disaster_recovery_type': {'readonly': True}, } _attribute_map = { @@ -68,7 +63,6 @@ class ArmDisasterRecovery(Resource): 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, - 'arm_disaster_recovery_type': {'key': 'properties.type', 'type': 'ReplicationType'}, } def __init__(self, **kwargs): @@ -78,4 +72,3 @@ def __init__(self, **kwargs): self.partner_namespace = kwargs.get('partner_namespace', None) self.alternate_name = kwargs.get('alternate_name', None) self.role = None - self.arm_disaster_recovery_type = None diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py index b2248047c2df..6b6b91e9c6db 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py @@ -43,10 +43,6 @@ class ArmDisasterRecovery(Resource): 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery - :ivar arm_disaster_recovery_type: Replication Type on the Alias(Disaster - Recovery configurations). Possible values include: 'MetadataReplication' - :vartype arm_disaster_recovery_type: str or - ~azure.mgmt.servicebus.models.ReplicationType """ _validation = { @@ -56,7 +52,6 @@ class ArmDisasterRecovery(Resource): 'provisioning_state': {'readonly': True}, 'pending_replication_operations_count': {'readonly': True}, 'role': {'readonly': True}, - 'arm_disaster_recovery_type': {'readonly': True}, } _attribute_map = { @@ -68,7 +63,6 @@ class ArmDisasterRecovery(Resource): 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, - 'arm_disaster_recovery_type': {'key': 'properties.type', 'type': 'ReplicationType'}, } def __init__(self, *, partner_namespace: str=None, alternate_name: str=None, **kwargs) -> None: @@ -78,4 +72,3 @@ def __init__(self, *, partner_namespace: str=None, alternate_name: str=None, **k self.partner_namespace = partner_namespace self.alternate_name = alternate_name self.role = None - self.arm_disaster_recovery_type = None diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py index e426e58334f4..53552468acd9 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py @@ -88,11 +88,6 @@ class RoleDisasterRecovery(str, Enum): secondary = "Secondary" -class ReplicationType(str, Enum): - - metadata_replication = "MetadataReplication" - - class IPAction(str, Enum): accept = "Accept"