Skip to content

Commit

Permalink
CodeGen from PR 15721 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 0bdb44bc6b6d86c3ebfcd7884cff33b5d305d12c into 3257aac
  • Loading branch information
SDKAuto committed Aug 19, 2021
1 parent 232b79b commit a56c47c
Show file tree
Hide file tree
Showing 16 changed files with 271 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "09d35de8dd3318687eee441d7ddc54a33bf1a9fa",
"commit": "5e3d63ba9d8c18a4c1d1e459e1e444d121e0fa8e",
"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/[email protected] --use=@autorest/[email protected] --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 = "1.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 a56c47c

Please sign in to comment.