From 83f02430842ded3c03794d8ff74d979e321c77b5 Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Wed, 13 Nov 2024 15:02:31 -0800 Subject: [PATCH 1/5] start --- .../azure/servicebus/_common/_configuration.py | 2 +- .../azure/servicebus/_pyamqp/_connection.py | 9 +++++++-- .../azure/servicebus/_pyamqp/_transport.py | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/_configuration.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/_configuration.py index 79f66e463b01..c923b3287a45 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/_configuration.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/_configuration.py @@ -59,7 +59,7 @@ def __init__(self, **kwargs): if self.custom_endpoint_address.find("//") == -1: self.custom_endpoint_address = "sb://" + self.custom_endpoint_address endpoint = urlparse(self.custom_endpoint_address) - self.transport_type = TransportType.AmqpOverWebsocket + self.transport_type = kwargs.get("transport_type") or TransportType.AmqpOverWebsocket self.custom_endpoint_hostname = endpoint.hostname if amqp_transport.KIND == "pyamqp": self.custom_endpoint_address += "/$servicebus/websocket" diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py index 9849051976dd..421868cf1cb8 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py @@ -136,8 +136,12 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements custom_endpoint = None if custom_endpoint_address: custom_parsed_url = urlparse(custom_endpoint_address) - custom_port = custom_parsed_url.port or WEBSOCKET_PORT - custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" + if transport_type.value == TransportType.Amqp.value: + custom_port = custom_parsed_url.port or SECURE_PORT + custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}" + else: + custom_port = custom_parsed_url.port or WEBSOCKET_PORT + custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" self._container_id = container_id or str(uuid.uuid4()) self._network_trace = network_trace self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": "", "amqpLink": ""} @@ -163,6 +167,7 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements credential=kwargs["sasl_credential"], port=self._port, custom_endpoint=custom_endpoint, + custom_port=custom_port, socket_timeout=self._socket_timeout, network_trace_params=self._network_trace_params, **kwargs, diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py index da81f1fcec1f..d21068cd06ba 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py @@ -179,6 +179,8 @@ def __init__( self.raise_on_initial_eintr = raise_on_initial_eintr self._read_buffer = BytesIO() self.host, self.port = to_host_port(host, port) + self._custom_endpoint = kwargs.get("custom_endpoint") + self._custom_port = kwargs.get("custom_port") self.network_trace_params = kwargs.get("network_trace_params") self.connect_timeout = connect_timeout @@ -491,7 +493,9 @@ class SSLTransport(_AbstractTransport): def __init__(self, host, *, port=AMQPS_PORT, socket_timeout=None, ssl_opts=None, **kwargs): self.sslopts = ssl_opts if isinstance(ssl_opts, dict) else {} - self.sslopts["server_hostname"] = host + self._custom_endpoint = kwargs.get("custom_endpoint") + self._custom_port = kwargs.get("custom_port") + self.sslopts["server_hostname"] = self._custom_endpoint or host self._read_buffer = BytesIO() super(SSLTransport, self).__init__(host, port=port, socket_timeout=socket_timeout, **kwargs) From c51f930c2d4ca019512c38b789c789c0feed15e8 Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Fri, 15 Nov 2024 13:10:41 -0800 Subject: [PATCH 2/5] custom endpoint over amqp --- .../azure/servicebus/_pyamqp/_connection.py | 3 ++- .../azure/servicebus/_pyamqp/_transport.py | 6 ++---- .../azure/servicebus/_pyamqp/aio/_connection_async.py | 10 ++++++++-- .../azure/servicebus/_pyamqp/aio/_transport_async.py | 2 ++ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py index 421868cf1cb8..ce1674fb07db 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_connection.py @@ -134,11 +134,12 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements # Custom Endpoint custom_endpoint_address = kwargs.get("custom_endpoint_address") custom_endpoint = None + custom_port = None if custom_endpoint_address: custom_parsed_url = urlparse(custom_endpoint_address) if transport_type.value == TransportType.Amqp.value: custom_port = custom_parsed_url.port or SECURE_PORT - custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}" + custom_endpoint = f"{custom_parsed_url.hostname}" else: custom_port = custom_parsed_url.port or WEBSOCKET_PORT custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py index d21068cd06ba..f66638387107 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py @@ -179,8 +179,6 @@ def __init__( self.raise_on_initial_eintr = raise_on_initial_eintr self._read_buffer = BytesIO() self.host, self.port = to_host_port(host, port) - self._custom_endpoint = kwargs.get("custom_endpoint") - self._custom_port = kwargs.get("custom_port") self.network_trace_params = kwargs.get("network_trace_params") self.connect_timeout = connect_timeout @@ -495,9 +493,9 @@ def __init__(self, host, *, port=AMQPS_PORT, socket_timeout=None, ssl_opts=None, self.sslopts = ssl_opts if isinstance(ssl_opts, dict) else {} self._custom_endpoint = kwargs.get("custom_endpoint") self._custom_port = kwargs.get("custom_port") - self.sslopts["server_hostname"] = self._custom_endpoint or host + self.sslopts["server_hostname"] = self._custom_endpoint or host self._read_buffer = BytesIO() - super(SSLTransport, self).__init__(host, port=port, socket_timeout=socket_timeout, **kwargs) + super(SSLTransport, self).__init__(self._custom_endpoint or host, port=self._custom_port or port, socket_timeout=socket_timeout, **kwargs) def _setup_transport(self): """Wrap the socket in an SSL object.""" diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_connection_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_connection_async.py index e6a99794d52c..648f12a64060 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_connection_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_connection_async.py @@ -115,10 +115,15 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements # Custom Endpoint custom_endpoint_address = kwargs.get("custom_endpoint_address") custom_endpoint = None + custom_port = None if custom_endpoint_address: custom_parsed_url = urlparse(custom_endpoint_address) - custom_port = custom_parsed_url.port or WEBSOCKET_PORT - custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" + if transport_type.value == TransportType.Amqp.value: + custom_port = custom_parsed_url.port or SECURE_PORT + custom_endpoint = f"{custom_parsed_url.hostname}" + else: + custom_port = custom_parsed_url.port or WEBSOCKET_PORT + custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" self._container_id: str = container_id or str(uuid.uuid4()) self._network_trace = network_trace self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": "", "amqpLink": ""} @@ -145,6 +150,7 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements credential=kwargs["sasl_credential"], port=self._port, custom_endpoint=custom_endpoint, + custom_port=custom_port, socket_timeout=self._socket_timeout, network_trace_params=self._network_trace_params, **kwargs, diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_transport_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_transport_async.py index 59cac3ba9338..c99631dfd885 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_transport_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_transport_async.py @@ -226,6 +226,8 @@ def __init__( self.raise_on_initial_eintr = raise_on_initial_eintr self._read_buffer = BytesIO() self.host, self.port = to_host_port(host, port) + self.host = kwargs.get("custom_endpoint") or self.host + self.port = kwargs.get("custom_port") or self.port self.socket_settings = socket_settings self.socket_lock = asyncio.Lock() self.sslopts = ssl_opts From bf5bd4a8b01a3d39931bb528e9d1b005863f7c8c Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Fri, 15 Nov 2024 13:57:08 -0800 Subject: [PATCH 3/5] fix --- .../azure-eventhub/azure/eventhub/_configuration.py | 2 +- .../azure/eventhub/_pyamqp/_connection.py | 10 ++++++++-- .../azure/eventhub/_pyamqp/_transport.py | 8 ++++++-- .../azure/eventhub/_pyamqp/aio/_connection_async.py | 9 +++++++-- .../azure/eventhub/_pyamqp/aio/_transport_async.py | 2 ++ .../azure/servicebus/_pyamqp/_transport.py | 6 ++++-- 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py index 1ed02ffd947f..dfe4d76aa143 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py @@ -81,7 +81,7 @@ def __init__( if self.custom_endpoint_address.find("//") == -1: self.custom_endpoint_address = "sb://" + self.custom_endpoint_address endpoint = urlparse(self.custom_endpoint_address) - self.transport_type = TransportType.AmqpOverWebsocket + self.transport_type = kwargs.get("transport_type") or TransportType.AmqpOverWebsocket self.custom_endpoint_hostname = endpoint.hostname if amqp_transport.KIND == "pyamqp": self.custom_endpoint_address += "/$servicebus/websocket" diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_connection.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_connection.py index 9849051976dd..ce1674fb07db 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_connection.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_connection.py @@ -134,10 +134,15 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements # Custom Endpoint custom_endpoint_address = kwargs.get("custom_endpoint_address") custom_endpoint = None + custom_port = None if custom_endpoint_address: custom_parsed_url = urlparse(custom_endpoint_address) - custom_port = custom_parsed_url.port or WEBSOCKET_PORT - custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" + if transport_type.value == TransportType.Amqp.value: + custom_port = custom_parsed_url.port or SECURE_PORT + custom_endpoint = f"{custom_parsed_url.hostname}" + else: + custom_port = custom_parsed_url.port or WEBSOCKET_PORT + custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" self._container_id = container_id or str(uuid.uuid4()) self._network_trace = network_trace self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": "", "amqpLink": ""} @@ -163,6 +168,7 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements credential=kwargs["sasl_credential"], port=self._port, custom_endpoint=custom_endpoint, + custom_port=custom_port, socket_timeout=self._socket_timeout, network_trace_params=self._network_trace_params, **kwargs, diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py index da81f1fcec1f..c30eb69ba21d 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py @@ -491,9 +491,13 @@ class SSLTransport(_AbstractTransport): def __init__(self, host, *, port=AMQPS_PORT, socket_timeout=None, ssl_opts=None, **kwargs): self.sslopts = ssl_opts if isinstance(ssl_opts, dict) else {} - self.sslopts["server_hostname"] = host + self._custom_endpoint = kwargs.get("custom_endpoint") + self._custom_port = kwargs.get("custom_port") + self.sslopts["server_hostname"] = self._custom_endpoint or host self._read_buffer = BytesIO() - super(SSLTransport, self).__init__(host, port=port, socket_timeout=socket_timeout, **kwargs) + super(SSLTransport, self).__init__( + self._custom_endpoint or host, port=self._custom_port or port, socket_timeout=socket_timeout, **kwargs + ) def _setup_transport(self): """Wrap the socket in an SSL object.""" diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py index e6a99794d52c..515803074fd5 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py @@ -117,8 +117,12 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements custom_endpoint = None if custom_endpoint_address: custom_parsed_url = urlparse(custom_endpoint_address) - custom_port = custom_parsed_url.port or WEBSOCKET_PORT - custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" + if transport_type.value == TransportType.Amqp.value: + custom_port = custom_parsed_url.port or SECURE_PORT + custom_endpoint = f"{custom_parsed_url.hostname}" + else: + custom_port = custom_parsed_url.port or WEBSOCKET_PORT + custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}" self._container_id: str = container_id or str(uuid.uuid4()) self._network_trace = network_trace self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": "", "amqpLink": ""} @@ -145,6 +149,7 @@ def __init__( # pylint:disable=too-many-locals,too-many-statements credential=kwargs["sasl_credential"], port=self._port, custom_endpoint=custom_endpoint, + custom_port=custom_port, socket_timeout=self._socket_timeout, network_trace_params=self._network_trace_params, **kwargs, diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py index 59cac3ba9338..c99631dfd885 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py @@ -226,6 +226,8 @@ def __init__( self.raise_on_initial_eintr = raise_on_initial_eintr self._read_buffer = BytesIO() self.host, self.port = to_host_port(host, port) + self.host = kwargs.get("custom_endpoint") or self.host + self.port = kwargs.get("custom_port") or self.port self.socket_settings = socket_settings self.socket_lock = asyncio.Lock() self.sslopts = ssl_opts diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py index f66638387107..c30eb69ba21d 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/_transport.py @@ -493,9 +493,11 @@ def __init__(self, host, *, port=AMQPS_PORT, socket_timeout=None, ssl_opts=None, self.sslopts = ssl_opts if isinstance(ssl_opts, dict) else {} self._custom_endpoint = kwargs.get("custom_endpoint") self._custom_port = kwargs.get("custom_port") - self.sslopts["server_hostname"] = self._custom_endpoint or host + self.sslopts["server_hostname"] = self._custom_endpoint or host self._read_buffer = BytesIO() - super(SSLTransport, self).__init__(self._custom_endpoint or host, port=self._custom_port or port, socket_timeout=socket_timeout, **kwargs) + super(SSLTransport, self).__init__( + self._custom_endpoint or host, port=self._custom_port or port, socket_timeout=socket_timeout, **kwargs + ) def _setup_transport(self): """Wrap the socket in an SSL object.""" From 95f2c8f01858dcf4b306e9b507a434791b464a82 Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Fri, 15 Nov 2024 14:21:51 -0800 Subject: [PATCH 4/5] config --- sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py index dfe4d76aa143..f12737fcb724 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_configuration.py @@ -29,7 +29,6 @@ def __init__( retry_backoff_max: int = 120, network_tracing: bool = False, http_proxy: Optional[Dict[str, Any]] = None, - transport_type: TransportType = TransportType.Amqp, auth_timeout: int = 60, prefetch: int = 300, max_batch_size: int = 300, @@ -49,6 +48,7 @@ def __init__( self.backoff_max = retry_backoff_max self.network_tracing = network_tracing self.http_proxy = http_proxy + transport_type = kwargs.get("transport_type", None) or TransportType.Amqp self.transport_type = TransportType.AmqpOverWebsocket if self.http_proxy else transport_type self.auth_timeout = auth_timeout self.prefetch = prefetch @@ -81,7 +81,7 @@ def __init__( if self.custom_endpoint_address.find("//") == -1: self.custom_endpoint_address = "sb://" + self.custom_endpoint_address endpoint = urlparse(self.custom_endpoint_address) - self.transport_type = kwargs.get("transport_type") or TransportType.AmqpOverWebsocket + self.transport_type = kwargs.get("transport_type", None) or TransportType.AmqpOverWebsocket self.custom_endpoint_hostname = endpoint.hostname if amqp_transport.KIND == "pyamqp": self.custom_endpoint_address += "/$servicebus/websocket" From 6d4038d0828cc83b67ffc9009f08777ffd2b0c01 Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Fri, 15 Nov 2024 14:27:44 -0800 Subject: [PATCH 5/5] doc --- sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py | 2 ++ sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py | 2 ++ .../azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py | 3 +++ sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py | 3 +++ .../azure/eventhub/aio/_consumer_client_async.py | 2 ++ .../azure/eventhub/aio/_producer_client_async.py | 2 ++ .../azure/servicebus/_pyamqp/aio/_client_async.py | 3 +++ .../azure-servicebus/azure/servicebus/_pyamqp/client.py | 3 +++ .../azure-servicebus/azure/servicebus/_servicebus_client.py | 2 ++ .../azure/servicebus/aio/_servicebus_client_async.py | 2 ++ 10 files changed, 24 insertions(+) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py index 38f23d621b3e..63dcdcfd5fab 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py @@ -116,6 +116,7 @@ class EventHubConsumerClient(ClientBase): # pylint: disable=client-accepts-api- :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str or None @@ -307,6 +308,7 @@ def from_connection_string( :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str or None diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py index 2da6716af1b6..660682149c4b 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py @@ -122,6 +122,7 @@ class EventHubProducerClient(ClientBase): # pylint: disable=client-accepts-api- :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: Optional[str] @@ -504,6 +505,7 @@ def from_connection_string( :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: Optional[str] diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py index 6ab90f4659fe..1bdfae6b7803 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py @@ -122,6 +122,7 @@ class AMQPClientAsync(AMQPClientSync): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -478,6 +479,7 @@ class SendClientAsync(SendClientSync, AMQPClientAsync): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -686,6 +688,7 @@ class ReceiveClientAsync(ReceiveClientSync, AMQPClientAsync): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py index 88644f6e798f..7c8233e7145c 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py @@ -140,6 +140,7 @@ class AMQPClient(object): # pylint: disable=too-many-instance-attributes :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -561,6 +562,7 @@ class SendClient(AMQPClient): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -786,6 +788,7 @@ class ReceiveClient(AMQPClient): # pylint:disable=too-many-instance-attributes :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py index 5d127b6dbdb4..52915d7117f2 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py @@ -128,6 +128,7 @@ class EventHubConsumerClient(ClientBaseAsync): # pylint: disable=client-accepts :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: Optional[str] @@ -319,6 +320,7 @@ def from_connection_string( :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: Optional[str] diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py index 1b51e01f9aa4..e614a498dcdd 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py @@ -109,6 +109,7 @@ class EventHubProducerClient(ClientBaseAsync): # pylint: disable=client-accepts :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: Optional[str] @@ -471,6 +472,7 @@ def from_connection_string( :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: Optional[str] diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_client_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_client_async.py index 6ab90f4659fe..1bdfae6b7803 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_client_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/aio/_client_async.py @@ -122,6 +122,7 @@ class AMQPClientAsync(AMQPClientSync): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -478,6 +479,7 @@ class SendClientAsync(SendClientSync, AMQPClientAsync): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -686,6 +688,7 @@ class ReceiveClientAsync(ReceiveClientSync, AMQPClientAsync): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/client.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/client.py index 88644f6e798f..7c8233e7145c 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/client.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_pyamqp/client.py @@ -140,6 +140,7 @@ class AMQPClient(object): # pylint: disable=too-many-instance-attributes :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -561,6 +562,7 @@ class SendClient(AMQPClient): :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -786,6 +788,7 @@ class ReceiveClient(AMQPClient): # pylint:disable=too-many-instance-attributes :keyword custom_endpoint_address: The custom endpoint address to use for establishing a connection to the service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :paramtype custom_endpoint_address: str :keyword connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py index 402d651a7c7d..298130fcd40b 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py @@ -81,6 +81,7 @@ class ServiceBusClient(object): # pylint: disable=client-accepts-api-version-ke :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Service Bus service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -233,6 +234,7 @@ def from_connection_string( :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Service Bus service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the custom_endpoint_address, by default port 443 will be used. :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py index 0fa098a7d503..8c668001553b 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py @@ -74,6 +74,7 @@ class ServiceBusClient(object): # pylint: disable=client-accepts-api-version-ke :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Service Bus service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the `custom_endpoint_address`, by default port 443 will be used. :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to @@ -200,6 +201,7 @@ def from_connection_string( :keyword str custom_endpoint_address: The custom endpoint address to use for establishing a connection to the Service Bus service, allowing network requests to be routed through any application gateways or other paths needed for the host environment. Default is None. + Unless specified otherwise, default transport type is TransportType.AmqpOverWebsockets. The format would be like "sb://:". If port is not specified in the custom_endpoint_address, by default port 443 will be used. :keyword str connection_verify: Path to the custom CA_BUNDLE file of the SSL certificate which is used to