@@ -1669,107 +1669,3 @@ def get_long_running_output(response):
1669
1669
else : polling_method = polling
1670
1670
return LROPoller (self ._client , raw_result , get_long_running_output , polling_method )
1671
1671
get_network_configuration_diagnostic .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic' }
1672
-
1673
-
1674
- def _query_connection_monitors_initial (
1675
- self , resource_group_name , network_watcher_name , connection_monitor_ids = None , custom_headers = None , raw = False , ** operation_config ):
1676
- parameters = models .QueryConnectionMonitorsParameters (connection_monitor_ids = connection_monitor_ids )
1677
-
1678
- # Construct URL
1679
- url = self .query_connection_monitors .metadata ['url' ]
1680
- path_format_arguments = {
1681
- 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
1682
- 'networkWatcherName' : self ._serialize .url ("network_watcher_name" , network_watcher_name , 'str' ),
1683
- 'subscriptionId' : self ._serialize .url ("self.config.subscription_id" , self .config .subscription_id , 'str' )
1684
- }
1685
- url = self ._client .format_url (url , ** path_format_arguments )
1686
-
1687
- # Construct parameters
1688
- query_parameters = {}
1689
- query_parameters ['api-version' ] = self ._serialize .query ("self.api_version" , self .api_version , 'str' )
1690
-
1691
- # Construct headers
1692
- header_parameters = {}
1693
- header_parameters ['Accept' ] = 'application/json'
1694
- header_parameters ['Content-Type' ] = 'application/json; charset=utf-8'
1695
- if self .config .generate_client_request_id :
1696
- header_parameters ['x-ms-client-request-id' ] = str (uuid .uuid1 ())
1697
- if custom_headers :
1698
- header_parameters .update (custom_headers )
1699
- if self .config .accept_language is not None :
1700
- header_parameters ['accept-language' ] = self ._serialize .header ("self.config.accept_language" , self .config .accept_language , 'str' )
1701
-
1702
- # Construct body
1703
- body_content = self ._serialize .body (parameters , 'QueryConnectionMonitorsParameters' )
1704
-
1705
- # Construct and send request
1706
- request = self ._client .post (url , query_parameters , header_parameters , body_content )
1707
- response = self ._client .send (request , stream = False , ** operation_config )
1708
-
1709
- if response .status_code not in [200 , 202 ]:
1710
- raise models .ErrorResponseException (self ._deserialize , response )
1711
-
1712
- deserialized = None
1713
-
1714
- if response .status_code == 200 :
1715
- deserialized = self ._deserialize ('QueryConnectionMonitorsResponse' , response )
1716
- if response .status_code == 202 :
1717
- deserialized = self ._deserialize ('QueryConnectionMonitorsResponse' , response )
1718
-
1719
- if raw :
1720
- client_raw_response = ClientRawResponse (deserialized , response )
1721
- return client_raw_response
1722
-
1723
- return deserialized
1724
-
1725
- def query_connection_monitors (
1726
- self , resource_group_name , network_watcher_name , connection_monitor_ids = None , custom_headers = None , raw = False , polling = True , ** operation_config ):
1727
- """Query connection monitors.
1728
-
1729
- :param resource_group_name: The name of the resource group.
1730
- :type resource_group_name: str
1731
- :param network_watcher_name: The name of the network watcher.
1732
- :type network_watcher_name: str
1733
- :param connection_monitor_ids: List of connection monitors ID.
1734
- :type connection_monitor_ids: list[str]
1735
- :param dict custom_headers: headers that will be added to the request
1736
- :param bool raw: The poller return type is ClientRawResponse, the
1737
- direct response alongside the deserialized response
1738
- :param polling: True for ARMPolling, False for no polling, or a
1739
- polling object for personal polling strategy
1740
- :return: An instance of LROPoller that returns
1741
- QueryConnectionMonitorsResponse or
1742
- ClientRawResponse<QueryConnectionMonitorsResponse> if raw==True
1743
- :rtype:
1744
- ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_06_01.models.QueryConnectionMonitorsResponse]
1745
- or
1746
- ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_06_01.models.QueryConnectionMonitorsResponse]]
1747
- :raises:
1748
- :class:`ErrorResponseException<azure.mgmt.network.v2018_06_01.models.ErrorResponseException>`
1749
- """
1750
- raw_result = self ._query_connection_monitors_initial (
1751
- resource_group_name = resource_group_name ,
1752
- network_watcher_name = network_watcher_name ,
1753
- connection_monitor_ids = connection_monitor_ids ,
1754
- custom_headers = custom_headers ,
1755
- raw = True ,
1756
- ** operation_config
1757
- )
1758
-
1759
- def get_long_running_output (response ):
1760
- deserialized = self ._deserialize ('QueryConnectionMonitorsResponse' , response )
1761
-
1762
- if raw :
1763
- client_raw_response = ClientRawResponse (deserialized , response )
1764
- return client_raw_response
1765
-
1766
- return deserialized
1767
-
1768
- lro_delay = operation_config .get (
1769
- 'long_running_operation_timeout' ,
1770
- self .config .long_running_operation_timeout )
1771
- if polling is True : polling_method = ARMPolling (lro_delay , lro_options = {'final-state-via' : 'location' }, ** operation_config )
1772
- elif polling is False : polling_method = NoPolling ()
1773
- else : polling_method = polling
1774
- return LROPoller (self ._client , raw_result , get_long_running_output , polling_method )
1775
- query_connection_monitors .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryConnectionMonitors' }
0 commit comments