diff --git a/azure-mgmt-servicebus/HISTORY.rst b/azure-mgmt-servicebus/HISTORY.rst index 325efcee54e2..453d052c234f 100644 --- a/azure-mgmt-servicebus/HISTORY.rst +++ b/azure-mgmt-servicebus/HISTORY.rst @@ -3,6 +3,22 @@ Release History =============== +0.6.0 (2019-04-09) +++++++++++++++++++ + +**Features** + +- Added operation NamespacesOperations.get_network_rule_set +- Added operation NamespacesOperations.migrate +- Added operation NamespacesOperations.create_or_update_network_rule_set + +0.5.4 (2019-02-15) +++++++++++++++++++ + +**Features** + +- Added operation NamespacesOperations.migrate + 0.5.3 (2018-10-29) ++++++++++++++++++ diff --git a/azure-mgmt-servicebus/MANIFEST.in b/azure-mgmt-servicebus/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/azure-mgmt-servicebus/MANIFEST.in +++ b/azure-mgmt-servicebus/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/azure-mgmt-servicebus/README.rst b/azure-mgmt-servicebus/README.rst index 67e65f0c3aed..4bcd7348bfc5 100644 --- a/azure-mgmt-servicebus/README.rst +++ b/azure-mgmt-servicebus/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py index 28d9624d67c0..d0aa97c6be8f 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py @@ -16,6 +16,7 @@ from .sb_sku_py3 import SBSku from .sb_namespace_py3 import SBNamespace from .sb_namespace_update_parameters_py3 import SBNamespaceUpdateParameters + from .sb_namespace_migrate_py3 import SBNamespaceMigrate from .sb_authorization_rule_py3 import SBAuthorizationRule from .authorization_rule_properties_py3 import AuthorizationRuleProperties from .access_keys_py3 import AccessKeys @@ -41,6 +42,10 @@ from .eventhub_py3 import Eventhub from .arm_disaster_recovery_py3 import ArmDisasterRecovery from .migration_config_properties_py3 import MigrationConfigProperties + 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 @@ -48,6 +53,7 @@ from .sb_sku import SBSku from .sb_namespace import SBNamespace from .sb_namespace_update_parameters import SBNamespaceUpdateParameters + from .sb_namespace_migrate import SBNamespaceMigrate from .sb_authorization_rule import SBAuthorizationRule from .authorization_rule_properties import AuthorizationRuleProperties from .access_keys import AccessKeys @@ -73,6 +79,10 @@ from .eventhub import Eventhub from .arm_disaster_recovery import ArmDisasterRecovery from .migration_config_properties import MigrationConfigProperties + 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 .sb_namespace_paged import SBNamespacePaged from .sb_authorization_rule_paged import SBAuthorizationRulePaged @@ -87,6 +97,7 @@ from .service_bus_management_client_enums import ( SkuName, SkuTier, + NameSpaceType, AccessRights, KeyType, EntityStatus, @@ -95,6 +106,8 @@ EncodingCaptureDescription, ProvisioningStateDR, RoleDisasterRecovery, + NetworkRuleIPAction, + DefaultAction, ) __all__ = [ @@ -104,6 +117,7 @@ 'SBSku', 'SBNamespace', 'SBNamespaceUpdateParameters', + 'SBNamespaceMigrate', 'SBAuthorizationRule', 'AuthorizationRuleProperties', 'AccessKeys', @@ -129,6 +143,10 @@ 'Eventhub', 'ArmDisasterRecovery', 'MigrationConfigProperties', + 'Subnet', + 'NWRuleSetIpRules', + 'NWRuleSetVirtualNetworkRules', + 'NetworkRuleSet', 'OperationPaged', 'SBNamespacePaged', 'SBAuthorizationRulePaged', @@ -142,6 +160,7 @@ 'EventhubPaged', 'SkuName', 'SkuTier', + 'NameSpaceType', 'AccessRights', 'KeyType', 'EntityStatus', @@ -150,4 +169,6 @@ 'EncodingCaptureDescription', 'ProvisioningStateDR', 'RoleDisasterRecovery', + 'NetworkRuleIPAction', + 'DefaultAction', ] 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..fd5cbb1978d6 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 @@ -34,10 +34,10 @@ class ArmDisasterRecovery(Resource): be replicated. :vartype pending_replication_operations_count: long :param partner_namespace: ARM Id of the Primary/Secondary eventhub - namespace name, which is part of GEO DR pairning + namespace name, which is part of GEO DR pairing :type partner_namespace: str :param alternate_name: Primary/Secondary eventhub namespace name, which is - part of GEO DR pairning + part of GEO DR pairing :type alternate_name: str :ivar role: role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 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..e9247b683da8 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 @@ -34,10 +34,10 @@ class ArmDisasterRecovery(Resource): be replicated. :vartype pending_replication_operations_count: long :param partner_namespace: ARM Id of the Primary/Secondary eventhub - namespace name, which is part of GEO DR pairning + namespace name, which is part of GEO DR pairing :type partner_namespace: str :param alternate_name: Primary/Secondary eventhub namespace name, which is - part of GEO DR pairning + part of GEO DR pairing :type alternate_name: str :ivar role: role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values include: diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py index 46029ace9293..1fb6c7d532af 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py @@ -17,7 +17,7 @@ class CheckNameAvailability(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The Name to check the namespce name availability + :param name: Required. The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_py3.py index c04f123ecafa..aa5cedb278ad 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_py3.py @@ -17,7 +17,7 @@ class CheckNameAvailability(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The Name to check the namespce name availability + :param name: Required. The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response.py index a303ca9b634a..094413f37b29 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response.py @@ -14,7 +14,7 @@ class ErrorResponse(Model): - """Error reponse indicates ServiceBus service is not able to process the + """Error response indicates ServiceBus service is not able to process the incoming request. The reason is provided in the error message. :param code: Error code. diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response_py3.py index 85e198147221..e9d51bc83f31 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response_py3.py @@ -14,7 +14,7 @@ class ErrorResponse(Model): - """Error reponse indicates ServiceBus service is not able to process the + """Error response indicates ServiceBus service is not able to process the incoming request. The reason is provided in the error message. :param code: Error code. diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set.py new file mode 100644 index 000000000000..b86e59dfbfae --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set.py @@ -0,0 +1,56 @@ +# 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 NetworkRuleSet 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.servicebus.models.DefaultAction + :param virtual_network_rules: List VirtualNetwork Rules + :type virtual_network_rules: + list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules] + :param ip_rules: List of IpRules + :type ip_rules: list[~azure.mgmt.servicebus.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-servicebus/azure/mgmt/servicebus/models/network_rule_set_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set_py3.py new file mode 100644 index 000000000000..8a15c0e689cf --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set_py3.py @@ -0,0 +1,56 @@ +# 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 NetworkRuleSet 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.servicebus.models.DefaultAction + :param virtual_network_rules: List VirtualNetwork Rules + :type virtual_network_rules: + list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules] + :param ip_rules: List of IpRules + :type ip_rules: list[~azure.mgmt.servicebus.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-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules.py new file mode 100644 index 000000000000..2d3b32b452c0 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules.py @@ -0,0 +1,33 @@ +# 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): + """Description of NetWorkRuleSet - IpRules resource. + + :param ip_mask: IP Mask + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: 'Allow'. + Default value: "Allow" . + :type action: str or ~azure.mgmt.servicebus.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', "Allow") diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules_py3.py new file mode 100644 index 000000000000..e3fc2ba83bd3 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules_py3.py @@ -0,0 +1,33 @@ +# 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): + """Description of NetWorkRuleSet - IpRules resource. + + :param ip_mask: IP Mask + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: 'Allow'. + Default value: "Allow" . + :type action: str or ~azure.mgmt.servicebus.models.NetworkRuleIPAction + """ + + _attribute_map = { + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__(self, *, ip_mask: str=None, action="Allow", **kwargs) -> None: + super(NWRuleSetIpRules, self).__init__(**kwargs) + self.ip_mask = ip_mask + self.action = action diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules.py new file mode 100644 index 000000000000..1dd737cedaf7 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules.py @@ -0,0 +1,33 @@ +# 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): + """Description of VirtualNetworkRules - NetworkRules resource. + + :param subnet: Subnet properties + :type subnet: ~azure.mgmt.servicebus.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-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules_py3.py new file mode 100644 index 000000000000..8ac33e005e27 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules_py3.py @@ -0,0 +1,33 @@ +# 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): + """Description of VirtualNetworkRules - NetworkRules resource. + + :param subnet: Subnet properties + :type subnet: ~azure.mgmt.servicebus.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-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters.py index c54d0d30b21d..a4526b2eba48 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters.py @@ -14,7 +14,7 @@ class RegenerateAccessKeyParameters(Model): """Parameters supplied to the Regenerate Authorization Rule operation, - specifies which key neeeds to be reset. + specifies which key needs to be reset. All required parameters must be populated in order to send to Azure. diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py index 1b51d422ea4c..b18043d81452 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py @@ -14,7 +14,7 @@ class RegenerateAccessKeyParameters(Model): """Parameters supplied to the Regenerate Authorization Rule operation, - specifies which key neeeds to be reset. + specifies which key needs to be reset. All required parameters must be populated in order to send to Azure. diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py index 398be39f0412..94c70ca44055 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py @@ -30,7 +30,7 @@ class SBNamespace(TrackedResource): :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param sku: Porperties of Sku + :param sku: Properties of Sku :type sku: ~azure.mgmt.servicebus.models.SBSku :ivar provisioning_state: Provisioning state of the namespace. :vartype provisioning_state: str diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate.py new file mode 100644 index 000000000000..a428dd686e41 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate.py @@ -0,0 +1,37 @@ +# 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 SBNamespaceMigrate(Model): + """Namespace Migrate Object. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace_type: Required. Type of namespaces. Possible + values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', + 'Relay' + :type target_namespace_type: str or + ~azure.mgmt.servicebus.models.NameSpaceType + """ + + _validation = { + 'target_namespace_type': {'required': True}, + } + + _attribute_map = { + 'target_namespace_type': {'key': 'targetNamespaceType', 'type': 'NameSpaceType'}, + } + + def __init__(self, **kwargs): + super(SBNamespaceMigrate, self).__init__(**kwargs) + self.target_namespace_type = kwargs.get('target_namespace_type', None) diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate_py3.py new file mode 100644 index 000000000000..52e28dbea884 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate_py3.py @@ -0,0 +1,37 @@ +# 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 SBNamespaceMigrate(Model): + """Namespace Migrate Object. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace_type: Required. Type of namespaces. Possible + values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', + 'Relay' + :type target_namespace_type: str or + ~azure.mgmt.servicebus.models.NameSpaceType + """ + + _validation = { + 'target_namespace_type': {'required': True}, + } + + _attribute_map = { + 'target_namespace_type': {'key': 'targetNamespaceType', 'type': 'NameSpaceType'}, + } + + def __init__(self, *, target_namespace_type, **kwargs) -> None: + super(SBNamespaceMigrate, self).__init__(**kwargs) + self.target_namespace_type = target_namespace_type diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_py3.py index d308e48b33a6..72041e6d9a85 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_py3.py @@ -30,7 +30,7 @@ class SBNamespace(TrackedResource): :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param sku: Porperties of Sku + :param sku: Properties of Sku :type sku: ~azure.mgmt.servicebus.models.SBSku :ivar provisioning_state: Provisioning state of the namespace. :vartype provisioning_state: str diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters.py index 5b6274272ba3..76765c7ff07a 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters.py @@ -28,7 +28,7 @@ class SBNamespaceUpdateParameters(ResourceNamespacePatch): :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param sku: Porperties of Sku + :param sku: Properties of Sku :type sku: ~azure.mgmt.servicebus.models.SBSku :ivar provisioning_state: Provisioning state of the namespace. :vartype provisioning_state: str diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters_py3.py index 80ac2a2b3457..d61858aa3328 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters_py3.py @@ -28,7 +28,7 @@ class SBNamespaceUpdateParameters(ResourceNamespacePatch): :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param sku: Porperties of Sku + :param sku: Properties of Sku :type sku: ~azure.mgmt.servicebus.models.SBSku :ivar provisioning_state: Provisioning state of the namespace. :vartype provisioning_state: str diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py index ce92872562e1..d6606145f094 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py @@ -35,7 +35,7 @@ class SBTopic(Resource): :vartype accessed_at: datetime :ivar subscription_count: Number of subscriptions. :vartype subscription_count: int - :ivar count_details: Message count deatils + :ivar count_details: Message count details :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails :param default_message_time_to_live: ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_py3.py index 3f7e90ea3f9f..6a07ddcdfb91 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_py3.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_py3.py @@ -35,7 +35,7 @@ class SBTopic(Resource): :vartype accessed_at: datetime :ivar subscription_count: Number of subscriptions. :vartype subscription_count: int - :ivar count_details: Message count deatils + :ivar count_details: Message count details :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails :param default_message_time_to_live: ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting 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..9c374dec3903 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 @@ -26,6 +26,15 @@ class SkuTier(str, Enum): premium = "Premium" +class NameSpaceType(str, Enum): + + messaging = "Messaging" + notification_hub = "NotificationHub" + mixed = "Mixed" + event_hub = "EventHub" + relay = "Relay" + + class AccessRights(str, Enum): manage = "Manage" @@ -86,3 +95,14 @@ 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-servicebus/azure/mgmt/servicebus/models/subnet.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet.py new file mode 100644 index 000000000000..315dc091e4c3 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet.py @@ -0,0 +1,34 @@ +# 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. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of Virtual Network Subnet + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _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-servicebus/azure/mgmt/servicebus/models/subnet_py3.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet_py3.py new file mode 100644 index 000000000000..ffe67f69d235 --- /dev/null +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet_py3.py @@ -0,0 +1,34 @@ +# 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. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of Virtual Network Subnet + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/disaster_recovery_configs_operations.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/disaster_recovery_configs_operations.py index 954ba0228663..5ee7b0bd605e 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/disaster_recovery_configs_operations.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/disaster_recovery_configs_operations.py @@ -45,7 +45,7 @@ def check_name_availability_method( :type resource_group_name: str :param namespace_name: The namespace name :type namespace_name: str - :param name: The Name to check the namespce name availability and The + :param name: The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. @@ -191,10 +191,10 @@ def create_or_update( :param alias: The Disaster Recovery configuration name :type alias: str :param partner_namespace: ARM Id of the Primary/Secondary eventhub - namespace name, which is part of GEO DR pairning + namespace name, which is part of GEO DR pairing :type partner_namespace: str :param alternate_name: Primary/Secondary eventhub namespace name, - which is part of GEO DR pairning + which is part of GEO DR pairing :type alternate_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -437,7 +437,7 @@ def break_pairing( def fail_over( self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): - """envokes GEO DR failover and reconfigure the alias to point to the + """Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. :param resource_group_name: Name of the Resource group within the @@ -576,7 +576,7 @@ def get_authorization_rule( :type namespace_name: str :param alias: The Disaster Recovery configuration name :type alias: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -644,7 +644,7 @@ def list_keys( :type namespace_name: str :param alias: The Disaster Recovery configuration name :type alias: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/migration_configs_operations.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/migration_configs_operations.py index a0df317c9ff6..1fbda5b37da5 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/migration_configs_operations.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/migration_configs_operations.py @@ -163,7 +163,7 @@ def _create_and_start_migration_initial( def create_and_start_migration( self, resource_group_name, namespace_name, target_namespace, post_migration_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates Migration configuration and starts migration of enties from + """Creates Migration configuration and starts migration of entities from Standard to Premium namespace. :param resource_group_name: Name of the Resource group within the @@ -340,7 +340,7 @@ def get( def complete_migration( self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): """This operation Completes Migration of entities by pointing the - connection strings to Premium namespace and any enties created after + connection strings to Premium namespace and any entities created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration is in-progress. 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..07031de56219 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py @@ -42,7 +42,7 @@ def check_name_availability_method( self, name, custom_headers=None, raw=False, **operation_config): """Check the give namespace name availability. - :param name: The Name to check the namespce name availability and The + :param name: The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. @@ -631,7 +631,7 @@ def create_or_update_authorization_rule( :type resource_group_name: str :param namespace_name: The namespace name :type namespace_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param rights: The rights associated with the rule. :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] @@ -704,7 +704,7 @@ def delete_authorization_rule( :type resource_group_name: str :param namespace_name: The namespace name :type namespace_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -760,7 +760,7 @@ def get_authorization_rule( :type resource_group_name: str :param namespace_name: The namespace name :type namespace_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -825,7 +825,7 @@ def list_keys( :type resource_group_name: str :param namespace_name: The namespace name :type namespace_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -891,7 +891,7 @@ def regenerate_keys( :type resource_group_name: str :param namespace_name: The namespace name :type namespace_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param key_type: The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey' @@ -958,3 +958,196 @@ def regenerate_keys( return deserialized regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'} + + def migrate( + self, resource_group_name, namespace_name, target_namespace_type, custom_headers=None, raw=False, **operation_config): + """This operation Migrate the given namespace to provided name type. + + :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 target_namespace_type: Type of namespaces. Possible values + include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', 'Relay' + :type target_namespace_type: str or + ~azure.mgmt.servicebus.models.NameSpaceType + :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` + """ + parameters = models.SBNamespaceMigrate(target_namespace_type=target_namespace_type) + + # Construct URL + url = self.migrate.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['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, 'SBNamespaceMigrate') + + # Construct and send request + request = self._client.post(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) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + migrate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrate'} + + 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.servicebus.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.servicebus.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.ServiceBus/namespaces/{namespaceName}/networkRuleSets/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.servicebus.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.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'} diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/queues_operations.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/queues_operations.py index 67c1e1d70e91..5e60e0854c50 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/queues_operations.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/queues_operations.py @@ -395,7 +395,7 @@ def create_or_update_authorization_rule( :type namespace_name: str :param queue_name: The queue name. :type queue_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param rights: The rights associated with the rule. :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] @@ -471,7 +471,7 @@ def delete_authorization_rule( :type namespace_name: str :param queue_name: The queue name. :type queue_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -530,7 +530,7 @@ def get_authorization_rule( :type namespace_name: str :param queue_name: The queue name. :type queue_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -598,7 +598,7 @@ def list_keys( :type namespace_name: str :param queue_name: The queue name. :type queue_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -666,7 +666,7 @@ def regenerate_keys( :type namespace_name: str :param queue_name: The queue name. :type queue_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param key_type: The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey' diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/topics_operations.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/topics_operations.py index c23bdff1cfb0..4b8469557ad1 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/topics_operations.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/topics_operations.py @@ -385,7 +385,7 @@ def internal_paging(next_link=None, raw=False): def create_or_update_authorization_rule( self, resource_group_name, namespace_name, topic_name, authorization_rule_name, rights, custom_headers=None, raw=False, **operation_config): - """Creates an authorizatio rule for the specified topic. + """Creates an authorization rule for the specified topic. :param resource_group_name: Name of the Resource group within the Azure subscription. @@ -394,7 +394,7 @@ def create_or_update_authorization_rule( :type namespace_name: str :param topic_name: The topic name. :type topic_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param rights: The rights associated with the rule. :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] @@ -470,7 +470,7 @@ def get_authorization_rule( :type namespace_name: str :param topic_name: The topic name. :type topic_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -538,7 +538,7 @@ def delete_authorization_rule( :type namespace_name: str :param topic_name: The topic name. :type topic_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -597,7 +597,7 @@ def list_keys( :type namespace_name: str :param topic_name: The topic name. :type topic_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -665,7 +665,7 @@ def regenerate_keys( :type namespace_name: str :param topic_name: The topic name. :type topic_name: str - :param authorization_rule_name: The authorizationrule name. + :param authorization_rule_name: The authorization rule name. :type authorization_rule_name: str :param key_type: The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey' diff --git a/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py b/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py index f6765bdb8774..901c89378794 100644 --- a/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py +++ b/azure-mgmt-servicebus/azure/mgmt/servicebus/version.py @@ -9,5 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.5.3" - +VERSION = "0.6.0" diff --git a/azure-mgmt-servicebus/setup.py b/azure-mgmt-servicebus/setup.py index 01b326350489..56179d34d1a1 100644 --- a/azure-mgmt-servicebus/setup.py +++ b/azure-mgmt-servicebus/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com',