diff --git a/azure-mgmt-eventhub/HISTORY.rst b/azure-mgmt-eventhub/HISTORY.rst index d101b7007ffb..d1aa9c9ffed5 100644 --- a/azure-mgmt-eventhub/HISTORY.rst +++ b/azure-mgmt-eventhub/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +1.1.0 (2017-10-26) +++++++++++++++++++ + +**Features** + +- Add disaster_recovery_configs operation group +- Add Geo DR + 1.0.0 (2017-06-27) ++++++++++++++++++ diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/event_hub_management_client.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/event_hub_management_client.py index 4b41663b7b24..d245d98b99da 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/event_hub_management_client.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/event_hub_management_client.py @@ -15,6 +15,7 @@ from .version import VERSION from .operations.operations import Operations from .operations.namespaces_operations import NamespacesOperations +from .operations.disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations from .operations.event_hubs_operations import EventHubsOperations from .operations.consumer_groups_operations import ConsumerGroupsOperations from . import models @@ -66,6 +67,8 @@ class EventHubManagementClient(object): :vartype operations: azure.mgmt.eventhub.operations.Operations :ivar namespaces: Namespaces operations :vartype namespaces: azure.mgmt.eventhub.operations.NamespacesOperations + :ivar disaster_recovery_configs: DisasterRecoveryConfigs operations + :vartype disaster_recovery_configs: azure.mgmt.eventhub.operations.DisasterRecoveryConfigsOperations :ivar event_hubs: EventHubs operations :vartype event_hubs: azure.mgmt.eventhub.operations.EventHubsOperations :ivar consumer_groups: ConsumerGroups operations @@ -96,6 +99,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.namespaces = NamespacesOperations( self._client, self.config, self._serialize, self._deserialize) + self.disaster_recovery_configs = DisasterRecoveryConfigsOperations( + self._client, self.config, self._serialize, self._deserialize) self.event_hubs = EventHubsOperations( self._client, self.config, self._serialize, self._deserialize) self.consumer_groups = ConsumerGroupsOperations( diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py index c26d11e525a5..4b11427822c9 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py @@ -16,6 +16,8 @@ from .authorization_rule import AuthorizationRule from .access_keys import AccessKeys from .regenerate_access_key_parameters import RegenerateAccessKeyParameters +from .destination import Destination +from .capture_description import CaptureDescription from .eventhub import Eventhub from .consumer_group import ConsumerGroup from .check_name_availability_parameter import CheckNameAvailabilityParameter @@ -23,9 +25,11 @@ from .operation_display import OperationDisplay from .operation import Operation from .error_response import ErrorResponse, ErrorResponseException +from .arm_disaster_recovery import ArmDisasterRecovery from .operation_paged import OperationPaged from .eh_namespace_paged import EHNamespacePaged from .authorization_rule_paged import AuthorizationRulePaged +from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged from .eventhub_paged import EventhubPaged from .consumer_group_paged import ConsumerGroupPaged from .event_hub_management_client_enums import ( @@ -34,7 +38,10 @@ AccessRights, KeyType, EntityStatus, + EncodingCaptureDescription, UnavailableReason, + ProvisioningStateDR, + RoleDisasterRecovery, ) __all__ = [ @@ -45,6 +52,8 @@ 'AuthorizationRule', 'AccessKeys', 'RegenerateAccessKeyParameters', + 'Destination', + 'CaptureDescription', 'Eventhub', 'ConsumerGroup', 'CheckNameAvailabilityParameter', @@ -52,9 +61,11 @@ 'OperationDisplay', 'Operation', 'ErrorResponse', 'ErrorResponseException', + 'ArmDisasterRecovery', 'OperationPaged', 'EHNamespacePaged', 'AuthorizationRulePaged', + 'ArmDisasterRecoveryPaged', 'EventhubPaged', 'ConsumerGroupPaged', 'SkuName', @@ -62,5 +73,8 @@ 'AccessRights', 'KeyType', 'EntityStatus', + 'EncodingCaptureDescription', 'UnavailableReason', + 'ProvisioningStateDR', + 'RoleDisasterRecovery', ] diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/access_keys.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/access_keys.py index fcd627193856..3cd0e415dde1 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/access_keys.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/access_keys.py @@ -24,6 +24,12 @@ class AccessKeys(Model): :ivar secondary_connection_string: Secondary connection string of the created namespace AuthorizationRule. :vartype secondary_connection_string: str + :ivar alias_primary_connection_string: Primary connection string of the + alias if GEO DR is enabled + :vartype alias_primary_connection_string: str + :ivar alias_secondary_connection_string: Secondary connection string of + the alias if GEO DR is enabled + :vartype alias_secondary_connection_string: str :ivar primary_key: A base64-encoded 256-bit primary key for signing and validating the SAS token. :vartype primary_key: str @@ -37,6 +43,8 @@ class AccessKeys(Model): _validation = { 'primary_connection_string': {'readonly': True}, 'secondary_connection_string': {'readonly': True}, + 'alias_primary_connection_string': {'readonly': True}, + 'alias_secondary_connection_string': {'readonly': True}, 'primary_key': {'readonly': True}, 'secondary_key': {'readonly': True}, 'key_name': {'readonly': True}, @@ -45,6 +53,8 @@ class AccessKeys(Model): _attribute_map = { 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, + 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, 'primary_key': {'key': 'primaryKey', 'type': 'str'}, 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, 'key_name': {'key': 'keyName', 'type': 'str'}, @@ -53,6 +63,8 @@ class AccessKeys(Model): def __init__(self): self.primary_connection_string = None self.secondary_connection_string = None + self.alias_primary_connection_string = None + self.alias_secondary_connection_string = None self.primary_key = None self.secondary_key = None self.key_name = None diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/arm_disaster_recovery.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/arm_disaster_recovery.py new file mode 100644 index 000000000000..79121594efc2 --- /dev/null +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/arm_disaster_recovery.py @@ -0,0 +1,64 @@ +# 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 ArmDisasterRecovery(Resource): + """Single item in List or Get Alias(Disaster Recovery configuration) + 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 + :ivar provisioning_state: Provisioning state of the Alias(Disaster + Recovery configuration) - possible values 'Accepted' or 'Succeeded' or + 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + :vartype provisioning_state: str or :class:`ProvisioningStateDR + ` + :param partner_namespace: Primary/Secondary eventhub namespace name, which + is part of GEO DR pairning + :type partner_namespace: str + :ivar role: role of namespace in GEO DR - possible values 'Primary' or + 'PrimaryNotReplicating' or 'Secondary'. Possible values include: + 'Primary', 'PrimaryNotReplicating', 'Secondary' + :vartype role: str or :class:`RoleDisasterRecovery + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateDR'}, + 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, + } + + def __init__(self, partner_namespace=None): + super(ArmDisasterRecovery, self).__init__() + self.provisioning_state = None + self.partner_namespace = partner_namespace + self.role = None diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/arm_disaster_recovery_paged.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/arm_disaster_recovery_paged.py new file mode 100644 index 000000000000..bdd10227b649 --- /dev/null +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/arm_disaster_recovery_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 ArmDisasterRecoveryPaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmDisasterRecovery ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmDisasterRecovery]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmDisasterRecoveryPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/authorization_rule_paged.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/authorization_rule_paged.py index 97a33b0098ed..584b91a033ab 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/authorization_rule_paged.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/authorization_rule_paged.py @@ -14,7 +14,7 @@ class AuthorizationRulePaged(Paged): """ - A paging container for iterating over a list of AuthorizationRule object + A paging container for iterating over a list of :class:`AuthorizationRule ` object """ _attribute_map = { diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/capture_description.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/capture_description.py new file mode 100644 index 000000000000..dbb5c8dff4e8 --- /dev/null +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/capture_description.py @@ -0,0 +1,57 @@ +# 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 CaptureDescription(Model): + """Properties to configure capture description for eventhub. + + :param enabled: A value that indicates whether capture description is + enabled. + :type enabled: bool + :param encoding: Enumerates the possible values for the encoding format of + capture description. Possible values include: 'Avro', 'AvroDeflate' + :type encoding: str or :class:`EncodingCaptureDescription + ` + :param interval_in_seconds: The time window allows you to set the + frequency with which the capture to Azure Blobs will happen, value should + between 60 to 900 seconds + :type interval_in_seconds: int + :param size_limit_in_bytes: The size window defines the amount of data + built up in your Event Hub before an capture operation, value should be + between 10485760 to 524288000 bytes + :type size_limit_in_bytes: int + :param destination: Properties of Destination where capture will be + stored. (Storage Account, Blob Names) + :type destination: :class:`Destination + ` + """ + + _validation = { + 'interval_in_seconds': {'maximum': 900, 'minimum': 60}, + 'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encoding': {'key': 'encoding', 'type': 'EncodingCaptureDescription'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'Destination'}, + } + + def __init__(self, enabled=None, encoding=None, interval_in_seconds=None, size_limit_in_bytes=None, destination=None): + self.enabled = enabled + self.encoding = encoding + self.interval_in_seconds = interval_in_seconds + self.size_limit_in_bytes = size_limit_in_bytes + self.destination = destination diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/consumer_group_paged.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/consumer_group_paged.py index b64aa46d54d1..9284a0f41637 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/consumer_group_paged.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/consumer_group_paged.py @@ -14,7 +14,7 @@ class ConsumerGroupPaged(Paged): """ - A paging container for iterating over a list of ConsumerGroup object + A paging container for iterating over a list of :class:`ConsumerGroup ` object """ _attribute_map = { diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/destination.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/destination.py new file mode 100644 index 000000000000..7bdacd2cb1af --- /dev/null +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/destination.py @@ -0,0 +1,43 @@ +# 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 Destination(Model): + """Capture storage details for capture description. + + :param name: Name for capture destination + :type name: str + :param storage_account_resource_id: Resource id of the storage account to + be used to create the blobs + :type storage_account_resource_id: str + :param blob_container: Blob container Name + :type blob_container: str + :param archive_name_format: Blob naming convention for archive, e.g. + {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + Here all the parameters (Namespace,EventHub .. etc) are mandatory + irrespective of order + :type archive_name_format: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, + 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, + } + + def __init__(self, name=None, storage_account_resource_id=None, blob_container=None, archive_name_format=None): + self.name = name + self.storage_account_resource_id = storage_account_resource_id + self.blob_container = blob_container + self.archive_name_format = archive_name_format diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eh_namespace_paged.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eh_namespace_paged.py index fa4b21c83802..b4e66e5f7e9d 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eh_namespace_paged.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eh_namespace_paged.py @@ -14,7 +14,7 @@ class EHNamespacePaged(Paged): """ - A paging container for iterating over a list of EHNamespace object + A paging container for iterating over a list of :class:`EHNamespace ` object """ _attribute_map = { diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/event_hub_management_client_enums.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/event_hub_management_client_enums.py index ca163ae39a08..ac7264c6e77c 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/event_hub_management_client_enums.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/event_hub_management_client_enums.py @@ -50,6 +50,12 @@ class EntityStatus(Enum): unknown = "Unknown" +class EncodingCaptureDescription(Enum): + + avro = "Avro" + avro_deflate = "AvroDeflate" + + class UnavailableReason(Enum): none = "None" @@ -58,3 +64,17 @@ class UnavailableReason(Enum): name_in_use = "NameInUse" name_in_lockdown = "NameInLockdown" too_many_namespace_in_current_subscription = "TooManyNamespaceInCurrentSubscription" + + +class ProvisioningStateDR(Enum): + + accepted = "Accepted" + succeeded = "Succeeded" + failed = "Failed" + + +class RoleDisasterRecovery(Enum): + + primary = "Primary" + primary_not_replicating = "PrimaryNotReplicating" + secondary = "Secondary" diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub.py index ef5986100373..2272b2ddc90c 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub.py @@ -42,6 +42,9 @@ class Eventhub(Resource): 'Unknown' :type status: str or :class:`EntityStatus ` + :param capture_description: Properties of capture description + :type capture_description: :class:`CaptureDescription + ` """ _validation = { @@ -65,9 +68,10 @@ class Eventhub(Resource): 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, } - def __init__(self, message_retention_in_days=None, partition_count=None, status=None): + def __init__(self, message_retention_in_days=None, partition_count=None, status=None, capture_description=None): super(Eventhub, self).__init__() self.partition_ids = None self.created_at = None @@ -75,3 +79,4 @@ def __init__(self, message_retention_in_days=None, partition_count=None, status= self.message_retention_in_days = message_retention_in_days self.partition_count = partition_count self.status = status + self.capture_description = capture_description diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub_paged.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub_paged.py index 29ea5612e8bd..c3627a7bab14 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub_paged.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub_paged.py @@ -14,7 +14,7 @@ class EventhubPaged(Paged): """ - A paging container for iterating over a list of Eventhub object + A paging container for iterating over a list of :class:`Eventhub ` object """ _attribute_map = { diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/operation_paged.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/operation_paged.py index 09def13d5ae2..3fbb5521d2e1 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/models/operation_paged.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/models/operation_paged.py @@ -14,7 +14,7 @@ class OperationPaged(Paged): """ - A paging container for iterating over a list of Operation object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/__init__.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/__init__.py index 4be1f07efcde..754191f262b2 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/__init__.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/__init__.py @@ -11,12 +11,14 @@ from .operations import Operations from .namespaces_operations import NamespacesOperations +from .disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations from .event_hubs_operations import EventHubsOperations from .consumer_groups_operations import ConsumerGroupsOperations __all__ = [ 'Operations', 'NamespacesOperations', + 'DisasterRecoveryConfigsOperations', 'EventHubsOperations', 'ConsumerGroupsOperations', ] diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/consumer_groups_operations.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/consumer_groups_operations.py index a4832e2132e2..7a87966637fd 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/consumer_groups_operations.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/consumer_groups_operations.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse import uuid +from msrest.pipeline import ClientRawResponse from .. import models @@ -58,10 +58,13 @@ def create_or_update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`ConsumerGroup + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`ConsumerGroup - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -72,7 +75,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -133,9 +136,11 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -144,7 +149,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -193,10 +198,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`ConsumerGroup + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`ConsumerGroup - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -205,7 +213,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -260,6 +268,8 @@ def list_by_event_hub( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ConsumerGroup + ` :rtype: :class:`ConsumerGroupPaged ` :raises: @@ -273,7 +283,7 @@ def internal_paging(next_link=None, raw=False): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_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) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/disaster_recovery_configs_operations.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/disaster_recovery_configs_operations.py new file mode 100644 index 000000000000..0d65b19c3ecb --- /dev/null +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/disaster_recovery_configs_operations.py @@ -0,0 +1,431 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DisasterRecoveryConfigsOperations(object): + """DisasterRecoveryConfigsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client API Version. Constant value: "2017-04-01". + """ + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def list( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets all Alias(Disaster Recovery configurations). + + :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 :class:`ArmDisasterRecovery + ` + :rtype: :class:`ArmDisasterRecoveryPaged + ` + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs' + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ArmDisasterRecoveryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ArmDisasterRecoveryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, namespace_name, alias, partner_namespace=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a new Alias(Disaster Recovery configuration). + + :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 alias: The Disaster Recovery configuration name + :type alias: str + :param partner_namespace: Primary/Secondary eventhub namespace name, + which is part of GEO DR pairning + :type partner_namespace: 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: :class:`ArmDisasterRecovery + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`ArmDisasterRecovery + ` or + :class:`ClientRawResponse` + :raises: + :class:`ErrorResponseException` + """ + parameters = models.ArmDisasterRecovery(partner_namespace=partner_namespace) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + 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), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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, 'ArmDisasterRecovery') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ArmDisasterRecovery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """Deletes an Alias(Disaster Recovery configuration). + + :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 alias: The Disaster Recovery configuration name + :type alias: 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 + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + 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), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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 and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **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 + + def get( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """Retrieves Alias(Disaster Recovery configuration) for primary or + secondary 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 alias: The Disaster Recovery configuration name + :type alias: 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: :class:`ArmDisasterRecovery + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`ArmDisasterRecovery + ` or + :class:`ClientRawResponse` + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}' + 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), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **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('ArmDisasterRecovery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def break_pairing( + self, resource_group_name, namespace_name, alias, custom_headers=None, raw=False, **operation_config): + """This operation disables the Disaster Recovery and stops replicating + changes from primary to secondary namespaces. + + :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 alias: The Disaster Recovery configuration name + :type alias: 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 + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing' + 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), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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 + + 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 + secondary 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 alias: The Disaster Recovery configuration name + :type alias: 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 + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover' + 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), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **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 diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/event_hubs_operations.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/event_hubs_operations.py index ba6a1c84961e..13f015f5cc5c 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/event_hubs_operations.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/event_hubs_operations.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse import uuid +from msrest.pipeline import ClientRawResponse from .. import models @@ -48,6 +48,8 @@ def list_by_namespace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Eventhub + ` :rtype: :class:`EventhubPaged ` :raises: @@ -124,9 +126,11 @@ def create_or_update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Eventhub ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Eventhub ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Eventhub ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -135,7 +139,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_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) @@ -192,9 +196,11 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -203,7 +209,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_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) @@ -249,9 +255,11 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Eventhub ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Eventhub ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Eventhub ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -260,7 +268,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_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) @@ -313,6 +321,8 @@ def list_authorization_rules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`AuthorizationRule + ` :rtype: :class:`AuthorizationRulePaged ` :raises: @@ -326,7 +336,7 @@ def internal_paging(next_link=None, raw=False): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_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) @@ -390,10 +400,13 @@ def create_or_update_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AuthorizationRule + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AuthorizationRule - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -404,8 +417,8 @@ def create_or_update_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -464,10 +477,13 @@ def get_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AuthorizationRule + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AuthorizationRule - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -476,8 +492,8 @@ def get_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -532,9 +548,11 @@ def delete_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -543,8 +561,8 @@ def delete_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -592,9 +610,11 @@ def list_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`AccessKeys ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`AccessKeys ` + or :class:`ClientRawResponse` if + raw=true + :rtype: :class:`AccessKeys ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -603,8 +623,8 @@ def list_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -666,9 +686,11 @@ def regenerate_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`AccessKeys ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`AccessKeys ` + or :class:`ClientRawResponse` if + raw=true + :rtype: :class:`AccessKeys ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -679,8 +701,8 @@ def regenerate_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/namespaces_operations.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/namespaces_operations.py index 24ccc42f3336..6239900ff562 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/namespaces_operations.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/namespaces_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -46,10 +46,13 @@ def check_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`CheckNameAvailabilityResult + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`CheckNameAvailabilityResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -108,6 +111,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`EHNamespace + ` :rtype: :class:`EHNamespacePaged ` :raises: @@ -173,6 +178,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`EHNamespace + ` :rtype: :class:`EHNamespacePaged ` :raises: @@ -243,12 +250,15 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`EHNamespace - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -335,11 +345,14 @@ def delete( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -414,9 +427,11 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`EHNamespace ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`EHNamespace ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -481,9 +496,11 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`EHNamespace ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`EHNamespace ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -548,6 +565,8 @@ def list_authorization_rules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`AuthorizationRule + ` :rtype: :class:`AuthorizationRulePaged ` :raises: @@ -622,10 +641,13 @@ def create_or_update_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AuthorizationRule + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AuthorizationRule - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -636,7 +658,7 @@ def create_or_update_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -693,9 +715,11 @@ def delete_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -704,7 +728,7 @@ def delete_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -750,10 +774,13 @@ def get_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AuthorizationRule + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AuthorizationRule - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -762,7 +789,7 @@ def get_authorization_rule( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -815,9 +842,11 @@ def list_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`AccessKeys ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`AccessKeys ` + or :class:`ClientRawResponse` if + raw=true + :rtype: :class:`AccessKeys ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -826,7 +855,7 @@ def list_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -887,9 +916,11 @@ def regenerate_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`AccessKeys ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`AccessKeys ` + or :class:`ClientRawResponse` if + raw=true + :rtype: :class:`AccessKeys ` or + :class:`ClientRawResponse` :raises: :class:`ErrorResponseException` """ @@ -900,7 +931,7 @@ def regenerate_keys( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), - 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/operations.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/operations.py index 5dee6d58f04e..c24742d60960 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/operations.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/operations/operations.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse import uuid +from msrest.pipeline import ClientRawResponse from .. import models @@ -43,6 +43,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Operation + ` :rtype: :class:`OperationPaged ` :raises: diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/version.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/version.py index a39916c162ce..24b9de3384da 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/version.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" diff --git a/azure-mgmt-eventhub/build.json b/azure-mgmt-eventhub/build.json index 791d3af784c2..b05d15d78aca 100644 --- a/azure-mgmt-eventhub/build.json +++ b/azure-mgmt-eventhub/build.json @@ -1 +1 @@ -{"autorest": "1.1.0", "date": "2017-06-27T21:10:14Z", "version": ""} \ No newline at end of file +{"autorest": "1.2.2", "date": "2017-09-26T15:46:46Z", "version": ""} \ No newline at end of file