Skip to content

Commit

Permalink
[AutoRelease] t2-containerinstance-2021-09-17-04542 (Azure#20733)
Browse files Browse the repository at this point in the history
* 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 <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
  • Loading branch information
Azure CLI Bot and SDKAuto authored Sep 22, 2021
1 parent f3144dc commit 518af90
Show file tree
Hide file tree
Showing 18 changed files with 284 additions and 1,441 deletions.
13 changes: 13 additions & 0 deletions sdk/containerinstance/azure-mgmt-containerinstance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release History

## 9.0.0 (2021-09-17)

**Features**

- Model ImageRegistryCredential has a new parameter identity_url
- Model ImageRegistryCredential has a new parameter identity
- Model ContainerGroup has a new parameter subnet_ids
- Added operation ContainerGroupsOperations.get_outbound_network_dependencies_endpoints

**Breaking changes**

- Model ContainerGroup no longer has parameter network_profile

## 8.0.0 (2021-07-20)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "09d35de8dd3318687eee441d7ddc54a33bf1a9fa",
"commit": "6c02b97dd0d7c5fab35a83cc89dbe369bb583b0c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/containerinstance/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-07-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-containerinstance/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-03-01",
"total_api_version_list": ["2021-03-01"],
"chosen_version": "2021-07-01",
"total_api_version_list": ["2021-07-01"],
"client": {
"name": "ContainerInstanceManagementClient",
"filename": "_container_instance_management_client",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "8.0.0"
VERSION = "9.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-07-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-containerinstance/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union
import warnings

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

def prepare_request(next_link=None):
Expand Down Expand Up @@ -136,7 +136,7 @@ def list_by_resource_group(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
accept = "application/json"

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

# Construct URL
Expand Down Expand Up @@ -261,7 +261,7 @@ async def _create_or_update_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

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

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

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

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

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

# Construct URL
Expand Down Expand Up @@ -845,3 +845,64 @@ def get_long_running_output(pipeline_response):
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start'} # type: ignore

async def get_outbound_network_dependencies_endpoints(
self,
resource_group_name: str,
container_group_name: str,
**kwargs: Any
) -> List[str]:
"""Get all network dependencies for container group.
Gets all the network dependencies for this container group to allow complete control of network
setting and configuration. For container groups, this will always be an empty list.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param container_group_name: The name of the container group.
:type container_group_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: list of str, or the result of cls(response)
:rtype: list[str]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[List[str]]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-07-01"
accept = "application/json"

# Construct URL
url = self.get_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize('[str]', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized
get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints'} # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def list_logs(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -148,7 +148,7 @@ async def execute_command(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

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

# Construct URL
Expand Down Expand Up @@ -253,4 +253,4 @@ async def attach(
return cls(pipeline_response, deserialized, {})

return deserialized
attach.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach'} # type: ignore
attach.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach'} # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def list_usage(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -132,7 +132,7 @@ def list_cached_images(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -204,7 +204,7 @@ def list_capabilities(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-07-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from ._models_py3 import ContainerGroupDiagnostics
from ._models_py3 import ContainerGroupIdentity
from ._models_py3 import ContainerGroupListResult
from ._models_py3 import ContainerGroupNetworkProfile
from ._models_py3 import ContainerGroupPropertiesInstanceView
from ._models_py3 import ContainerGroupSubnetId
from ._models_py3 import ContainerHttpGet
from ._models_py3 import ContainerPort
from ._models_py3 import ContainerProbe
Expand All @@ -38,7 +38,7 @@
from ._models_py3 import Event
from ._models_py3 import GitRepoVolume
from ._models_py3 import GpuResource
from ._models_py3 import HttpHeaders
from ._models_py3 import HttpHeader
from ._models_py3 import ImageRegistryCredential
from ._models_py3 import InitContainerDefinition
from ._models_py3 import InitContainerPropertiesDefinitionInstanceView
Expand Down Expand Up @@ -77,8 +77,8 @@
from ._models import ContainerGroupDiagnostics # type: ignore
from ._models import ContainerGroupIdentity # type: ignore
from ._models import ContainerGroupListResult # type: ignore
from ._models import ContainerGroupNetworkProfile # type: ignore
from ._models import ContainerGroupPropertiesInstanceView # type: ignore
from ._models import ContainerGroupSubnetId # type: ignore
from ._models import ContainerHttpGet # type: ignore
from ._models import ContainerPort # type: ignore
from ._models import ContainerProbe # type: ignore
Expand All @@ -90,7 +90,7 @@
from ._models import Event # type: ignore
from ._models import GitRepoVolume # type: ignore
from ._models import GpuResource # type: ignore
from ._models import HttpHeaders # type: ignore
from ._models import HttpHeader # type: ignore
from ._models import ImageRegistryCredential # type: ignore
from ._models import InitContainerDefinition # type: ignore
from ._models import InitContainerPropertiesDefinitionInstanceView # type: ignore
Expand Down Expand Up @@ -144,8 +144,8 @@
'ContainerGroupDiagnostics',
'ContainerGroupIdentity',
'ContainerGroupListResult',
'ContainerGroupNetworkProfile',
'ContainerGroupPropertiesInstanceView',
'ContainerGroupSubnetId',
'ContainerHttpGet',
'ContainerPort',
'ContainerProbe',
Expand All @@ -157,7 +157,7 @@
'Event',
'GitRepoVolume',
'GpuResource',
'HttpHeaders',
'HttpHeader',
'ImageRegistryCredential',
'InitContainerDefinition',
'InitContainerPropertiesDefinitionInstanceView',
Expand Down
Loading

0 comments on commit 518af90

Please sign in to comment.