diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_private_link_services_operations.py index 43e620556d69..69b483cbef41 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_private_link_services_operations.py @@ -578,9 +578,26 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2019_04_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -613,13 +630,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -628,59 +644,30 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): """Checks the subscription is visible to private link service. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_04_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_04_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2019_04_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -714,13 +701,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -729,57 +715,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks the subscription is visible to private link service. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_04_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_04_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_private_link_services_operations.py index a70283dd71a4..b7d49e01f3e7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_private_link_services_operations.py @@ -578,9 +578,26 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2019_06_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -613,13 +630,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -628,59 +644,30 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): """Checks the subscription is visible to private link service. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_06_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_06_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2019_06_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -714,13 +701,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -729,57 +715,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks the subscription is visible to private link service. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_06_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_06_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_private_link_services_operations.py index 67dde4252f8f..cf0f9df4e77c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_private_link_services_operations.py @@ -578,9 +578,26 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2019_07_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -613,13 +630,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -628,59 +644,31 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service. + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service in + the specified resource group. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_07_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_07_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2019_07_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -714,13 +702,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -729,58 +716,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service in - the specified resource group. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_07_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_07_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_private_link_services_operations.py index 2bd13fbe5615..044961343d0b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_private_link_services_operations.py @@ -578,9 +578,26 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2019_08_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -613,13 +630,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -628,59 +644,31 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service. + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service in + the specified resource group. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_08_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_08_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2019_08_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -714,13 +702,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -729,58 +716,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service in - the specified resource group. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_08_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_08_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/operations/_private_link_services_operations.py index 7156c50c0440..855159310af6 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/operations/_private_link_services_operations.py @@ -720,9 +720,26 @@ def internal_paging(next_link=None): return deserialized list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2019_09_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -755,13 +772,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -770,59 +786,31 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service. + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service in + the specified resource group. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_09_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_09_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2019_09_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -856,13 +844,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -871,58 +858,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service in - the specified resource group. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_09_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_09_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_private_link_services_operations.py index 29cfc2145a96..34d01a04c6f4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_private_link_services_operations.py @@ -720,9 +720,26 @@ def internal_paging(next_link=None): return deserialized list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2019_11_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -755,13 +772,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -770,59 +786,31 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service. + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service in + the specified resource group. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_11_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_11_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2019_11_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -856,13 +844,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -871,58 +858,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service in - the specified resource group. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_11_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_11_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_private_link_services_operations.py index 77f755eeb636..5f28e0b27cf7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_private_link_services_operations.py @@ -720,9 +720,26 @@ def internal_paging(next_link=None): return deserialized list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2019_12_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -755,13 +772,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -770,59 +786,31 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service. + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service in + the specified resource group. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_12_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_12_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2019_12_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -856,13 +844,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -871,58 +858,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service in - the specified resource group. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_12_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_12_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_private_link_services_operations.py index 8130a229a0f2..e39244a537e4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_private_link_services_operations.py @@ -720,9 +720,26 @@ def internal_paging(next_link=None): return deserialized list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2020_03_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -755,13 +772,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -770,59 +786,31 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service. + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service in + the specified resource group. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_03_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_03_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2020_03_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -856,13 +844,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -871,58 +858,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service in - the specified resource group. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_03_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_03_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services( diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models.py index 1dec186ea436..c62716292457 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models.py @@ -8644,10 +8644,12 @@ class HubRouteTable(SubResource): :type labels: list[str] :ivar associated_connections: List of all connections associated with this route table. - :vartype associated_connections: list[str] + :vartype associated_connections: + list[~azure.mgmt.network.v2020_04_01.models.SubResource] :ivar propagating_connections: List of all connections that advertise to this route table. - :vartype propagating_connections: list[str] + :vartype propagating_connections: + list[~azure.mgmt.network.v2020_04_01.models.SubResource] :ivar provisioning_state: The provisioning state of the RouteTable resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -8675,8 +8677,8 @@ class HubRouteTable(SubResource): 'id': {'key': 'id', 'type': 'str'}, 'routes': {'key': 'properties.routes', 'type': '[HubRoute]'}, 'labels': {'key': 'properties.labels', 'type': '[str]'}, - 'associated_connections': {'key': 'properties.associatedConnections', 'type': '[str]'}, - 'propagating_connections': {'key': 'properties.propagatingConnections', 'type': '[str]'}, + 'associated_connections': {'key': 'properties.associatedConnections', 'type': '[SubResource]'}, + 'propagating_connections': {'key': 'properties.propagatingConnections', 'type': '[SubResource]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models_py3.py index 170fc24ea585..1b9fbf32e832 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models_py3.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/models/_models_py3.py @@ -8644,10 +8644,12 @@ class HubRouteTable(SubResource): :type labels: list[str] :ivar associated_connections: List of all connections associated with this route table. - :vartype associated_connections: list[str] + :vartype associated_connections: + list[~azure.mgmt.network.v2020_04_01.models.SubResource] :ivar propagating_connections: List of all connections that advertise to this route table. - :vartype propagating_connections: list[str] + :vartype propagating_connections: + list[~azure.mgmt.network.v2020_04_01.models.SubResource] :ivar provisioning_state: The provisioning state of the RouteTable resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -8675,8 +8677,8 @@ class HubRouteTable(SubResource): 'id': {'key': 'id', 'type': 'str'}, 'routes': {'key': 'properties.routes', 'type': '[HubRoute]'}, 'labels': {'key': 'properties.labels', 'type': '[str]'}, - 'associated_connections': {'key': 'properties.associatedConnections', 'type': '[str]'}, - 'propagating_connections': {'key': 'properties.propagatingConnections', 'type': '[str]'}, + 'associated_connections': {'key': 'properties.associatedConnections', 'type': '[SubResource]'}, + 'propagating_connections': {'key': 'properties.propagatingConnections', 'type': '[SubResource]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_private_link_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_private_link_services_operations.py index 84b53ceda417..3027dfc4d42e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_private_link_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_private_link_services_operations.py @@ -720,9 +720,26 @@ def internal_paging(next_link=None): return deserialized list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections'} - - def _check_private_link_service_visibility_initial( + def check_private_link_service_visibility( self, location, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param private_link_service_alias: The alias of the private link + service. + :type private_link_service_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: PrivateLinkServiceVisibility or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.network.v2020_04_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -755,13 +772,12 @@ def _check_private_link_service_visibility_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -770,59 +786,31 @@ def _check_private_link_service_visibility_initial( return client_raw_response return deserialized + check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - def check_private_link_service_visibility( - self, location, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service. + def check_private_link_service_visibility_by_resource_group( + self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): + """Checks whether the subscription is visible to private link service in + the specified resource group. :param location: The location of the domain name. :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :param private_link_service_alias: The alias of the private link service. :type private_link_service_alias: str :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkServiceVisibility or ClientRawResponse if raw=true :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_04_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_04_01.models.PrivateLinkServiceVisibility]] + ~azure.mgmt.network.v2020_04_01.models.PrivateLinkServiceVisibility or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - raw_result = self._check_private_link_service_visibility_initial( - location=location, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} - - - def _check_private_link_service_visibility_by_resource_group_initial( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, **operation_config): parameters = models.CheckPrivateLinkServiceVisibilityRequest(private_link_service_alias=private_link_service_alias) # Construct URL @@ -856,13 +844,12 @@ def _check_private_link_service_visibility_by_resource_group_initial( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PrivateLinkServiceVisibility', response) @@ -871,58 +858,6 @@ def _check_private_link_service_visibility_by_resource_group_initial( return client_raw_response return deserialized - - def check_private_link_service_visibility_by_resource_group( - self, location, resource_group_name, private_link_service_alias=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Checks whether the subscription is visible to private link service in - the specified resource group. - - :param location: The location of the domain name. - :type location: str - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param private_link_service_alias: The alias of the private link - service. - :type private_link_service_alias: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - PrivateLinkServiceVisibility or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2020_04_01.models.PrivateLinkServiceVisibility] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2020_04_01.models.PrivateLinkServiceVisibility]] - :raises: :class:`CloudError` - """ - raw_result = self._check_private_link_service_visibility_by_resource_group_initial( - location=location, - resource_group_name=resource_group_name, - private_link_service_alias=private_link_service_alias, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('PrivateLinkServiceVisibility', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} def list_auto_approved_private_link_services(