Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions azure-mgmt-eventhub/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
14 changes: 14 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@
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
from .check_name_availability_result import CheckNameAvailabilityResult
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 (
Expand All @@ -34,7 +38,10 @@
AccessRights,
KeyType,
EntityStatus,
EncodingCaptureDescription,
UnavailableReason,
ProvisioningStateDR,
RoleDisasterRecovery,
)

__all__ = [
Expand All @@ -45,22 +52,29 @@
'AuthorizationRule',
'AccessKeys',
'RegenerateAccessKeyParameters',
'Destination',
'CaptureDescription',
'Eventhub',
'ConsumerGroup',
'CheckNameAvailabilityParameter',
'CheckNameAvailabilityResult',
'OperationDisplay',
'Operation',
'ErrorResponse', 'ErrorResponseException',
'ArmDisasterRecovery',
'OperationPaged',
'EHNamespacePaged',
'AuthorizationRulePaged',
'ArmDisasterRecoveryPaged',
'EventhubPaged',
'ConsumerGroupPaged',
'SkuName',
'SkuTier',
'AccessRights',
'KeyType',
'EntityStatus',
'EncodingCaptureDescription',
'UnavailableReason',
'ProvisioningStateDR',
'RoleDisasterRecovery',
]
12 changes: 12 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/access_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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},
Expand All @@ -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'},
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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
<azure.mgmt.eventhub.models.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
<azure.mgmt.eventhub.models.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
Original file line number Diff line number Diff line change
@@ -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 <azure.mgmt.eventhub.models.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)
Original file line number Diff line number Diff line change
Expand Up @@ -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 <azure.mgmt.eventhub.models.AuthorizationRule>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
<azure.mgmt.eventhub.models.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
<azure.mgmt.eventhub.models.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
Original file line number Diff line number Diff line change
Expand Up @@ -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 <azure.mgmt.eventhub.models.ConsumerGroup>` object
"""

_attribute_map = {
Expand Down
43 changes: 43 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/destination.py
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 <azure.mgmt.eventhub.models.EHNamespace>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ class EntityStatus(Enum):
unknown = "Unknown"


class EncodingCaptureDescription(Enum):

avro = "Avro"
avro_deflate = "AvroDeflate"


class UnavailableReason(Enum):

none = "None"
Expand All @@ -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"
Loading