|
5 | 5 | # Code generated by Microsoft (R) AutoRest Code Generator.
|
6 | 6 | # Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7 | 7 | # --------------------------------------------------------------------------
|
8 |
| -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union |
| 8 | +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union |
9 | 9 | import warnings
|
10 | 10 |
|
11 | 11 | from azure.core.async_paging import AsyncItemPaged, AsyncList
|
@@ -63,7 +63,7 @@ def list(
|
63 | 63 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
64 | 64 | }
|
65 | 65 | error_map.update(kwargs.pop('error_map', {}))
|
66 |
| - api_version = "2021-03-01" |
| 66 | + api_version = "2021-07-01" |
67 | 67 | accept = "application/json"
|
68 | 68 |
|
69 | 69 | def prepare_request(next_link=None):
|
@@ -136,7 +136,7 @@ def list_by_resource_group(
|
136 | 136 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
137 | 137 | }
|
138 | 138 | error_map.update(kwargs.pop('error_map', {}))
|
139 |
| - api_version = "2021-03-01" |
| 139 | + api_version = "2021-07-01" |
140 | 140 | accept = "application/json"
|
141 | 141 |
|
142 | 142 | def prepare_request(next_link=None):
|
@@ -213,7 +213,7 @@ async def get(
|
213 | 213 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
214 | 214 | }
|
215 | 215 | error_map.update(kwargs.pop('error_map', {}))
|
216 |
| - api_version = "2021-03-01" |
| 216 | + api_version = "2021-07-01" |
217 | 217 | accept = "application/json"
|
218 | 218 |
|
219 | 219 | # Construct URL
|
@@ -261,7 +261,7 @@ async def _create_or_update_initial(
|
261 | 261 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
262 | 262 | }
|
263 | 263 | error_map.update(kwargs.pop('error_map', {}))
|
264 |
| - api_version = "2021-03-01" |
| 264 | + api_version = "2021-07-01" |
265 | 265 | content_type = kwargs.pop("content_type", "application/json")
|
266 | 266 | accept = "application/json"
|
267 | 267 |
|
@@ -406,7 +406,7 @@ async def update(
|
406 | 406 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
407 | 407 | }
|
408 | 408 | error_map.update(kwargs.pop('error_map', {}))
|
409 |
| - api_version = "2021-03-01" |
| 409 | + api_version = "2021-07-01" |
410 | 410 | content_type = kwargs.pop("content_type", "application/json")
|
411 | 411 | accept = "application/json"
|
412 | 412 |
|
@@ -458,7 +458,7 @@ async def _delete_initial(
|
458 | 458 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
459 | 459 | }
|
460 | 460 | error_map.update(kwargs.pop('error_map', {}))
|
461 |
| - api_version = "2021-03-01" |
| 461 | + api_version = "2021-07-01" |
462 | 462 | accept = "application/json"
|
463 | 463 |
|
464 | 464 | # Construct URL
|
@@ -577,7 +577,7 @@ async def _restart_initial(
|
577 | 577 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
578 | 578 | }
|
579 | 579 | error_map.update(kwargs.pop('error_map', {}))
|
580 |
| - api_version = "2021-03-01" |
| 580 | + api_version = "2021-07-01" |
581 | 581 | accept = "application/json"
|
582 | 582 |
|
583 | 583 | # Construct URL
|
@@ -702,7 +702,7 @@ async def stop(
|
702 | 702 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
703 | 703 | }
|
704 | 704 | error_map.update(kwargs.pop('error_map', {}))
|
705 |
| - api_version = "2021-03-01" |
| 705 | + api_version = "2021-07-01" |
706 | 706 | accept = "application/json"
|
707 | 707 |
|
708 | 708 | # Construct URL
|
@@ -746,7 +746,7 @@ async def _start_initial(
|
746 | 746 | 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
|
747 | 747 | }
|
748 | 748 | error_map.update(kwargs.pop('error_map', {}))
|
749 |
| - api_version = "2021-03-01" |
| 749 | + api_version = "2021-07-01" |
750 | 750 | accept = "application/json"
|
751 | 751 |
|
752 | 752 | # Construct URL
|
@@ -845,3 +845,64 @@ def get_long_running_output(pipeline_response):
|
845 | 845 | else:
|
846 | 846 | return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
|
847 | 847 | begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start'} # type: ignore
|
| 848 | + |
| 849 | + async def get_outbound_network_dependencies_endpoints( |
| 850 | + self, |
| 851 | + resource_group_name: str, |
| 852 | + container_group_name: str, |
| 853 | + **kwargs: Any |
| 854 | + ) -> List[str]: |
| 855 | + """Get all network dependencies for container group. |
| 856 | +
|
| 857 | + Gets all the network dependencies for this container group to allow complete control of network |
| 858 | + setting and configuration. For container groups, this will always be an empty list. |
| 859 | +
|
| 860 | + :param resource_group_name: The name of the resource group. |
| 861 | + :type resource_group_name: str |
| 862 | + :param container_group_name: The name of the container group. |
| 863 | + :type container_group_name: str |
| 864 | + :keyword callable cls: A custom type or function that will be passed the direct response |
| 865 | + :return: list of str, or the result of cls(response) |
| 866 | + :rtype: list[str] |
| 867 | + :raises: ~azure.core.exceptions.HttpResponseError |
| 868 | + """ |
| 869 | + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] |
| 870 | + error_map = { |
| 871 | + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError |
| 872 | + } |
| 873 | + error_map.update(kwargs.pop('error_map', {})) |
| 874 | + api_version = "2021-07-01" |
| 875 | + accept = "application/json" |
| 876 | + |
| 877 | + # Construct URL |
| 878 | + url = self.get_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore |
| 879 | + path_format_arguments = { |
| 880 | + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), |
| 881 | + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), |
| 882 | + 'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str'), |
| 883 | + } |
| 884 | + url = self._client.format_url(url, **path_format_arguments) |
| 885 | + |
| 886 | + # Construct parameters |
| 887 | + query_parameters = {} # type: Dict[str, Any] |
| 888 | + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') |
| 889 | + |
| 890 | + # Construct headers |
| 891 | + header_parameters = {} # type: Dict[str, Any] |
| 892 | + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') |
| 893 | + |
| 894 | + request = self._client.get(url, query_parameters, header_parameters) |
| 895 | + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) |
| 896 | + response = pipeline_response.http_response |
| 897 | + |
| 898 | + if response.status_code not in [200]: |
| 899 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 900 | + raise HttpResponseError(response=response, error_format=ARMErrorFormat) |
| 901 | + |
| 902 | + deserialized = self._deserialize('[str]', pipeline_response) |
| 903 | + |
| 904 | + if cls: |
| 905 | + return cls(pipeline_response, deserialized, {}) |
| 906 | + |
| 907 | + return deserialized |
| 908 | + get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints'} # type: ignore |
0 commit comments