Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[T2-GA] Eventhub #13805

Merged
merged 1 commit into from
Sep 17, 2020
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 sdk/eventhub/azure-mgmt-eventhub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release History

## 8.0.0 (2020-09-16)

**Features**

- Model NetworkRuleSet has a new parameter trusted_service_access_enabled
- Added operation group PrivateEndpointConnectionsOperations
- Added operation group PrivateLinkResourcesOperations

## 8.0.0b1 (2020-06-17)

This is beta preview version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__all__ = ['EventHubManagementClient']

try:
from ._patch import patch_sdk
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -43,8 +44,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = ['https://management.azure.com/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-eventhub/{}'.format(VERSION))
self._configure(**kwargs)

Expand All @@ -57,6 +57,7 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def __init__(
self._config = EventHubManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(EventHubManagementClient, self).__init__(
credential,
self._config,
api_version=api_version,
profile=profile
)
Expand All @@ -96,7 +94,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} is not available".format(api_version))

@property
def clusters(self):
Expand All @@ -108,7 +106,7 @@ def clusters(self):
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import ClustersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'clusters'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -121,7 +119,7 @@ def configuration(self):
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import ConfigurationOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'configuration'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -140,7 +138,7 @@ def consumer_groups(self):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import ConsumerGroupsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'consumer_groups'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -156,7 +154,7 @@ def disaster_recovery_configs(self):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'disaster_recovery_configs'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -175,7 +173,7 @@ def event_hubs(self):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import EventHubsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'event_hubs'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -194,7 +192,7 @@ def namespaces(self):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import NamespacesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'namespaces'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -213,7 +211,33 @@ def operations(self):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def private_endpoint_connections(self):
"""Instance depends on the API version:

* 2018-01-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def private_link_resources(self):
"""Instance depends on the API version:

* 2018-01-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -229,7 +253,7 @@ def regions(self):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import RegionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'regions'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

def close(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "8.0.0b1"
VERSION = "8.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._event_hub_management_client_async import EventHubManagementClient
from ._event_hub_management_client import EventHubManagementClient
__all__ = ['EventHubManagementClient']
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from .._version import VERSION

Expand All @@ -34,7 +35,6 @@ def __init__(
subscription_id, # type: str
**kwargs # type: Any
) -> None:
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
Expand All @@ -43,8 +43,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = ['https://management.azure.com/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-eventhub/{}'.format(VERSION))
self._configure(**kwargs)

Expand All @@ -56,6 +55,7 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
Expand Down
Loading