Skip to content

Commit 518af90

Browse files
Azure CLI BotSDKAuto
andauthored
[AutoRelease] t2-containerinstance-2021-09-17-04542 (Azure#20733)
* CodeGen from PR 15721 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.ContainerInstance to add version stable/2021-07-01 (Azure#15721) * Adds base for updating Microsoft.ContainerInstance from version stable/2021-03-01 to version 2021-07-01 * Updates readme * Updates API version in new specs and examples * Adding subnet IDs * Adding fixes from pending 03-01 update * Changing definition name to match convention * Adding network dependencies API * Adding MSI+ACR properties * Removing network profile * Updating example * Fixing JSON error * Removing network profile reference * Adding Integer format where missing * Removing comma * Fixing example * Fixing example * Ran Prettier to resolve check failure * Running prettier again for format * version,CHANGELOG * test Co-authored-by: SDKAuto <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent f3144dc commit 518af90

18 files changed

+284
-1441
lines changed

sdk/containerinstance/azure-mgmt-containerinstance/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Release History
22

3+
## 9.0.0 (2021-09-17)
4+
5+
**Features**
6+
7+
- Model ImageRegistryCredential has a new parameter identity_url
8+
- Model ImageRegistryCredential has a new parameter identity
9+
- Model ContainerGroup has a new parameter subnet_ids
10+
- Added operation ContainerGroupsOperations.get_outbound_network_dependencies_endpoints
11+
12+
**Breaking changes**
13+
14+
- Model ContainerGroup no longer has parameter network_profile
15+
316
## 8.0.0 (2021-07-20)
417

518
**Features**

sdk/containerinstance/azure-mgmt-containerinstance/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@autorest/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "09d35de8dd3318687eee441d7ddc54a33bf1a9fa",
7+
"commit": "6c02b97dd0d7c5fab35a83cc89dbe369bb583b0c",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
99
"autorest_command": "autorest specification/containerinstance/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/containerinstance/resource-manager/readme.md"

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2021-03-01"
51+
self.api_version = "2021-07-01"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-containerinstance/{}'.format(VERSION))
5454
self._configure(**kwargs)

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2021-03-01",
3-
"total_api_version_list": ["2021-03-01"],
2+
"chosen_version": "2021-07-01",
3+
"total_api_version_list": ["2021-07-01"],
44
"client": {
55
"name": "ContainerInstanceManagementClient",
66
"filename": "_container_instance_management_client",

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "8.0.0"
9+
VERSION = "9.0.0"

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2021-03-01"
48+
self.api_version = "2021-07-01"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-containerinstance/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py

Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
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
99
import warnings
1010

1111
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -63,7 +63,7 @@ def list(
6363
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6464
}
6565
error_map.update(kwargs.pop('error_map', {}))
66-
api_version = "2021-03-01"
66+
api_version = "2021-07-01"
6767
accept = "application/json"
6868

6969
def prepare_request(next_link=None):
@@ -136,7 +136,7 @@ def list_by_resource_group(
136136
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
137137
}
138138
error_map.update(kwargs.pop('error_map', {}))
139-
api_version = "2021-03-01"
139+
api_version = "2021-07-01"
140140
accept = "application/json"
141141

142142
def prepare_request(next_link=None):
@@ -213,7 +213,7 @@ async def get(
213213
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
214214
}
215215
error_map.update(kwargs.pop('error_map', {}))
216-
api_version = "2021-03-01"
216+
api_version = "2021-07-01"
217217
accept = "application/json"
218218

219219
# Construct URL
@@ -261,7 +261,7 @@ async def _create_or_update_initial(
261261
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
262262
}
263263
error_map.update(kwargs.pop('error_map', {}))
264-
api_version = "2021-03-01"
264+
api_version = "2021-07-01"
265265
content_type = kwargs.pop("content_type", "application/json")
266266
accept = "application/json"
267267

@@ -406,7 +406,7 @@ async def update(
406406
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
407407
}
408408
error_map.update(kwargs.pop('error_map', {}))
409-
api_version = "2021-03-01"
409+
api_version = "2021-07-01"
410410
content_type = kwargs.pop("content_type", "application/json")
411411
accept = "application/json"
412412

@@ -458,7 +458,7 @@ async def _delete_initial(
458458
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
459459
}
460460
error_map.update(kwargs.pop('error_map', {}))
461-
api_version = "2021-03-01"
461+
api_version = "2021-07-01"
462462
accept = "application/json"
463463

464464
# Construct URL
@@ -577,7 +577,7 @@ async def _restart_initial(
577577
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
578578
}
579579
error_map.update(kwargs.pop('error_map', {}))
580-
api_version = "2021-03-01"
580+
api_version = "2021-07-01"
581581
accept = "application/json"
582582

583583
# Construct URL
@@ -702,7 +702,7 @@ async def stop(
702702
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
703703
}
704704
error_map.update(kwargs.pop('error_map', {}))
705-
api_version = "2021-03-01"
705+
api_version = "2021-07-01"
706706
accept = "application/json"
707707

708708
# Construct URL
@@ -746,7 +746,7 @@ async def _start_initial(
746746
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
747747
}
748748
error_map.update(kwargs.pop('error_map', {}))
749-
api_version = "2021-03-01"
749+
api_version = "2021-07-01"
750750
accept = "application/json"
751751

752752
# Construct URL
@@ -845,3 +845,64 @@ def get_long_running_output(pipeline_response):
845845
else:
846846
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
847847
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

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async def list_logs(
7676
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
7777
}
7878
error_map.update(kwargs.pop('error_map', {}))
79-
api_version = "2021-03-01"
79+
api_version = "2021-07-01"
8080
accept = "application/json"
8181

8282
# Construct URL
@@ -148,7 +148,7 @@ async def execute_command(
148148
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
149149
}
150150
error_map.update(kwargs.pop('error_map', {}))
151-
api_version = "2021-03-01"
151+
api_version = "2021-07-01"
152152
content_type = kwargs.pop("content_type", "application/json")
153153
accept = "application/json"
154154

@@ -218,7 +218,7 @@ async def attach(
218218
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
219219
}
220220
error_map.update(kwargs.pop('error_map', {}))
221-
api_version = "2021-03-01"
221+
api_version = "2021-07-01"
222222
accept = "application/json"
223223

224224
# Construct URL
@@ -253,4 +253,4 @@ async def attach(
253253
return cls(pipeline_response, deserialized, {})
254254

255255
return deserialized
256-
attach.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach'} # type: ignore
256+
attach.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach'} # type: ignore

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def list_usage(
6060
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6161
}
6262
error_map.update(kwargs.pop('error_map', {}))
63-
api_version = "2021-03-01"
63+
api_version = "2021-07-01"
6464
accept = "application/json"
6565

6666
def prepare_request(next_link=None):
@@ -132,7 +132,7 @@ def list_cached_images(
132132
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
133133
}
134134
error_map.update(kwargs.pop('error_map', {}))
135-
api_version = "2021-03-01"
135+
api_version = "2021-07-01"
136136
accept = "application/json"
137137

138138
def prepare_request(next_link=None):
@@ -204,7 +204,7 @@ def list_capabilities(
204204
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
205205
}
206206
error_map.update(kwargs.pop('error_map', {}))
207-
api_version = "2021-03-01"
207+
api_version = "2021-07-01"
208208
accept = "application/json"
209209

210210
def prepare_request(next_link=None):

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def list(
5757
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
5858
}
5959
error_map.update(kwargs.pop('error_map', {}))
60-
api_version = "2021-03-01"
60+
api_version = "2021-07-01"
6161
accept = "application/json"
6262

6363
def prepare_request(next_link=None):

0 commit comments

Comments
 (0)