diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json b/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json index bb07d3f53353..07c2a8ec53db 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json +++ b/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json @@ -1,11 +1,11 @@ { - "commit": "e37a57df67daaa82f9c3758fc450bc8655812a08", + "commit": "029b76bb1dd67590bc4b2a9dd1db7a701777b793", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.8", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/containerinstance/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/containerinstance/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/containerinstance/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py index d9400c0b7a31..9db277825757 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -36,14 +30,14 @@ class ContainerInstanceManagementClientConfiguration(Configuration): # pylint: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ContainerInstanceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01-preview"] = kwargs.pop("api_version", "2022-10-01-preview") + api_version: str = kwargs.pop("api_version", "2023-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py index ce10bd8b984c..ca0c4620cbbd 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_container_instance_management_client.py @@ -49,8 +49,8 @@ class ContainerInstanceManagementClient: # pylint: disable=client-accepts-api-v :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -66,7 +66,7 @@ def __init__( self._config = ContainerInstanceManagementClientConfiguration( credential=credential, subscription_id=subscription_id, **kwargs ) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -111,5 +111,5 @@ def __enter__(self) -> "ContainerInstanceManagementClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_serialization.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_serialization.py index 2c170e28dbca..842ae727fbbc 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_serialization.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_serialization.py @@ -38,7 +38,22 @@ import re import sys import codecs -from typing import Optional, Union, AnyStr, IO, Mapping +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) try: from urllib import quote # type: ignore @@ -48,12 +63,14 @@ import isodate # type: ignore -from typing import Dict, Any, cast - from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + class RawDeserializer: @@ -277,8 +294,8 @@ class Model(object): _attribute_map: Dict[str, Dict[str, Any]] = {} _validation: Dict[str, Dict[str, Any]] = {} - def __init__(self, **kwargs): - self.additional_properties = {} + def __init__(self, **kwargs: Any) -> None: + self.additional_properties: Dict[str, Any] = {} for k in kwargs: if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -287,25 +304,25 @@ def __init__(self, **kwargs): else: setattr(self, k, kwargs[k]) - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" return not self.__eq__(other) - def __str__(self): + def __str__(self) -> str: return str(self.__dict__) @classmethod - def enable_additional_properties_sending(cls): + def enable_additional_properties_sending(cls) -> None: cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} @classmethod - def is_xml_model(cls): + def is_xml_model(cls) -> bool: try: cls._xml_map # type: ignore except AttributeError: @@ -322,7 +339,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - def serialize(self, keep_readonly=False, **kwargs): + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: """Return the JSON that would be sent to azure from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -336,8 +353,13 @@ def serialize(self, keep_readonly=False, **kwargs): serializer = Serializer(self._infer_class_models()) return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) - def as_dict(self, keep_readonly=True, key_transformer=attribute_transformer, **kwargs): - """Return a dict that can be JSONify using json.dump. + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. Advanced usage might optionally use a callback as parameter: @@ -384,7 +406,7 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls, data, content_type=None): + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. @@ -396,7 +418,12 @@ def deserialize(cls, data, content_type=None): return deserializer(cls.__name__, data, content_type=content_type) @classmethod - def from_dict(cls, data, key_extractors=None, content_type=None): + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: """Parse a dict using given key extractor return a model. By default consider key @@ -409,8 +436,8 @@ def from_dict(cls, data, key_extractors=None, content_type=None): :raises: DeserializationError if something went wrong """ deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( - [ + deserializer.key_extractors = ( # type: ignore + [ # type: ignore attribute_key_case_insensitive_extractor, rest_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, @@ -518,7 +545,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -534,7 +561,7 @@ def __init__(self, classes=None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -602,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -626,8 +653,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore - unflattened = {k: new_attr} - new_attr = unflattened + new_attr = {k: new_attr} _new_attr = new_attr _serialized = serialized @@ -656,8 +682,8 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type, None) + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: @@ -777,6 +803,8 @@ def serialize_data(self, data, data_type, **kwargs): raise ValueError("No value for given attribute") try: + if data is AzureCoreNull: + return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) @@ -1161,7 +1189,8 @@ def rest_key_extractor(attr, attr_desc, data): working_data = data while "." in key: - dict_keys = _FLATTEN.split(key) + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1242,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type): xml_name = internal_type_xml_map.get("name", internal_type.__name__) xml_ns = internal_type_xml_map.get("ns", None) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1266,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data): # Integrate namespace if necessary xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): @@ -1332,7 +1361,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1352,7 +1381,7 @@ def __init__(self, classes=None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1471,7 +1500,7 @@ def _classify_target(self, target, data): Once classification has been determined, initialize object. :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. """ if target is None: return None, None @@ -1486,7 +1515,7 @@ def _classify_target(self, target, data): target = target._classify(data, self.dependencies) except AttributeError: pass # Target is not a Model, no classify - return target, target.__class__.__name__ + return target, target.__class__.__name__ # type: ignore def failsafe_deserialize(self, target_obj, data, content_type=None): """Ignores any errors encountered in deserialization, @@ -1496,7 +1525,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): a deserialization error. :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. """ try: diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_vendor.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_vendor.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py index b5e2ac841400..e5754a47ce68 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "10.1.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py index 16e01e4a8554..4492d81e388a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -36,14 +30,14 @@ class ContainerInstanceManagementClientConfiguration(Configuration): # pylint: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ContainerInstanceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01-preview"] = kwargs.pop("api_version", "2022-10-01-preview") + api_version: str = kwargs.pop("api_version", "2023-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_container_instance_management_client.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_container_instance_management_client.py index 42339267fbb3..6f207cbe5d89 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_container_instance_management_client.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_container_instance_management_client.py @@ -50,8 +50,8 @@ class ContainerInstanceManagementClient: # pylint: disable=client-accepts-api-v :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -67,7 +67,7 @@ def __init__( self._config = ContainerInstanceManagementClientConfiguration( credential=credential, subscription_id=subscription_id, **kwargs ) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -112,5 +112,5 @@ async def __aenter__(self) -> "ContainerInstanceManagementClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py index 75fb77266a95..a9624d642e4c 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -44,10 +43,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,9 +83,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ContainerGroup"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -142,8 +135,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -178,9 +172,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -233,8 +225,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -278,9 +271,7 @@ async def get(self, resource_group_name: str, container_group_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) request = build_get_request( @@ -295,8 +286,9 @@ async def get(self, resource_group_name: str, container_group_name: str, **kwarg request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -334,9 +326,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -363,8 +353,9 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -481,7 +472,7 @@ async def begin_create_or_update( :param container_group_name: The name of the container group. Required. :type container_group_name: str :param container_group: The properties of the container group to be created or updated. Is - either a model type or a IO type. Required. + either a ContainerGroup type or a IO type. Required. :type container_group: ~azure.mgmt.containerinstance.models.ContainerGroup or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -502,9 +493,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -620,7 +609,7 @@ async def update( :param container_group_name: The name of the container group. Required. :type container_group_name: str :param resource: The container group resource with just the tags to be updated. Is either a - model type or a IO type. Required. + Resource type or a IO type. Required. :type resource: ~azure.mgmt.containerinstance.models.Resource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -641,9 +630,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -670,8 +657,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -705,9 +693,7 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ContainerGroup]] = kwargs.pop("cls", None) request = build_delete_request( @@ -722,8 +708,9 @@ async def _delete_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -774,9 +761,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -832,9 +817,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_restart_request( @@ -849,8 +832,9 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -894,9 +878,7 @@ async def begin_restart( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -965,9 +947,7 @@ async def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -982,8 +962,9 @@ async def stop( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1013,9 +994,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -1030,8 +1009,9 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1075,9 +1055,7 @@ async def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1118,7 +1096,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def get_outbound_network_dependencies_endpoints( + async def get_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long self, resource_group_name: str, container_group_name: str, **kwargs: Any ) -> List[str]: """Get all network dependencies for container group. @@ -1146,9 +1124,7 @@ async def get_outbound_network_dependencies_endpoints( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[List[str]] = kwargs.pop("cls", None) request = build_get_outbound_network_dependencies_endpoints_request( @@ -1163,8 +1139,9 @@ async def get_outbound_network_dependencies_endpoints( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py index db52e8d5bb8d..da3d40ac11c6 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -32,10 +31,6 @@ build_list_logs_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -102,9 +97,7 @@ async def list_logs( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Logs] = kwargs.pop("cls", None) request = build_list_logs_request( @@ -122,8 +115,9 @@ async def list_logs( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -229,8 +223,8 @@ async def execute_command( :type container_group_name: str :param container_name: The name of the container instance. Required. :type container_name: str - :param container_exec_request: The request for the exec command. Is either a model type or a IO - type. Required. + :param container_exec_request: The request for the exec command. Is either a + ContainerExecRequest type or a IO type. Required. :type container_exec_request: ~azure.mgmt.containerinstance.models.ContainerExecRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -251,9 +245,7 @@ async def execute_command( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerExecResponse] = kwargs.pop("cls", None) @@ -281,8 +273,9 @@ async def execute_command( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -333,9 +326,7 @@ async def attach( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerAttachResponse] = kwargs.pop("cls", None) request = build_attach_request( @@ -351,8 +342,9 @@ async def attach( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py index e5ce4c1a921a..8d9e6d6004da 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -34,10 +33,6 @@ build_list_usage_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,9 +70,7 @@ def list_usage(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None) error_map = { @@ -130,8 +123,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -164,9 +158,7 @@ def list_cached_images(self, location: str, **kwargs: Any) -> AsyncIterable["_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CachedImagesListResult] = kwargs.pop("cls", None) error_map = { @@ -219,8 +211,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -253,9 +246,7 @@ def list_capabilities(self, location: str, **kwargs: Any) -> AsyncIterable["_mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CapabilitiesListResult] = kwargs.pop("cls", None) error_map = { @@ -308,8 +299,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py index 34f954eb8465..c67943795cd1 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,9 +64,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -122,8 +115,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_subnet_service_association_link_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_subnet_service_association_link_operations.py index ec7c1542f68d..c113aac2d8f0 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_subnet_service_association_link_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_subnet_service_association_link_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._subnet_service_association_link_operations import build_delete_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,9 +66,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -89,8 +82,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -136,9 +130,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py index fc7aa7cf2494..13597377f7bf 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py @@ -54,6 +54,8 @@ from ._models_py3 import ResourceLimits from ._models_py3 import ResourceRequests from ._models_py3 import ResourceRequirements +from ._models_py3 import SecurityContextCapabilitiesDefinition +from ._models_py3 import SecurityContextDefinition from ._models_py3 import Usage from ._models_py3 import UsageListResult from ._models_py3 import UsageName @@ -127,6 +129,8 @@ "ResourceLimits", "ResourceRequests", "ResourceRequirements", + "SecurityContextCapabilitiesDefinition", + "SecurityContextDefinition", "Usage", "UsageListResult", "UsageName", diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py index abc1e4623f75..ddc9e922ab73 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py @@ -59,8 +59,8 @@ def __init__( storage_account_name: str, read_only: Optional[bool] = None, storage_account_key: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword share_name: The name of the Azure File share to be mounted as a volume. Required. :paramtype share_name: str @@ -102,7 +102,7 @@ class CachedImages(_serialization.Model): "image": {"key": "image", "type": "str"}, } - def __init__(self, *, os_type: str, image: str, **kwargs): + def __init__(self, *, os_type: str, image: str, **kwargs: Any) -> None: """ :keyword os_type: The OS type of the cached image. Required. :paramtype os_type: str @@ -129,8 +129,8 @@ class CachedImagesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.CachedImages"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.CachedImages"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of cached images. :paramtype value: list[~azure.mgmt.containerinstance.models.CachedImages] @@ -179,7 +179,7 @@ class Capabilities(_serialization.Model): "capabilities": {"key": "capabilities", "type": "CapabilitiesCapabilities"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.resource_type = None @@ -215,7 +215,7 @@ class CapabilitiesCapabilities(_serialization.Model): "max_gpu_count": {"key": "maxGpuCount", "type": "float"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.max_memory_in_gb = None @@ -238,8 +238,8 @@ class CapabilitiesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Capabilities"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.Capabilities"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of capabilities. :paramtype value: list[~azure.mgmt.containerinstance.models.Capabilities] @@ -281,8 +281,8 @@ def __init__( message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -314,7 +314,7 @@ class ConfidentialComputeProperties(_serialization.Model): "cce_policy": {"key": "ccePolicy", "type": "str"}, } - def __init__(self, *, cce_policy: Optional[str] = None, **kwargs): + def __init__(self, *, cce_policy: Optional[str] = None, **kwargs: Any) -> None: """ :keyword cce_policy: The base64 encoded confidential compute enforcement policy. :paramtype cce_policy: str @@ -323,7 +323,7 @@ def __init__(self, *, cce_policy: Optional[str] = None, **kwargs): self.cce_policy = cce_policy -class Container(_serialization.Model): +class Container(_serialization.Model): # pylint: disable=too-many-instance-attributes """A container instance. Variables are only populated by the server, and will be ignored when sending a request. @@ -350,6 +350,8 @@ class Container(_serialization.Model): :vartype liveness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe :ivar readiness_probe: The readiness probe. :vartype readiness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe + :ivar security_context: The container security properties. + :vartype security_context: ~azure.mgmt.containerinstance.models.SecurityContextDefinition """ _validation = { @@ -370,6 +372,7 @@ class Container(_serialization.Model): "volume_mounts": {"key": "properties.volumeMounts", "type": "[VolumeMount]"}, "liveness_probe": {"key": "properties.livenessProbe", "type": "ContainerProbe"}, "readiness_probe": {"key": "properties.readinessProbe", "type": "ContainerProbe"}, + "security_context": {"key": "properties.securityContext", "type": "SecurityContextDefinition"}, } def __init__( @@ -384,8 +387,9 @@ def __init__( volume_mounts: Optional[List["_models.VolumeMount"]] = None, liveness_probe: Optional["_models.ContainerProbe"] = None, readiness_probe: Optional["_models.ContainerProbe"] = None, - **kwargs - ): + security_context: Optional["_models.SecurityContextDefinition"] = None, + **kwargs: Any + ) -> None: """ :keyword name: The user-provided name of the container instance. Required. :paramtype name: str @@ -406,6 +410,8 @@ def __init__( :paramtype liveness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe :keyword readiness_probe: The readiness probe. :paramtype readiness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe + :keyword security_context: The container security properties. + :paramtype security_context: ~azure.mgmt.containerinstance.models.SecurityContextDefinition """ super().__init__(**kwargs) self.name = name @@ -418,6 +424,7 @@ def __init__( self.volume_mounts = volume_mounts self.liveness_probe = liveness_probe self.readiness_probe = readiness_probe + self.security_context = security_context class ContainerAttachResponse(_serialization.Model): @@ -435,7 +442,7 @@ class ContainerAttachResponse(_serialization.Model): "password": {"key": "password", "type": "str"}, } - def __init__(self, *, web_socket_uri: Optional[str] = None, password: Optional[str] = None, **kwargs): + def __init__(self, *, web_socket_uri: Optional[str] = None, password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword web_socket_uri: The uri for the output stream from the attach. :paramtype web_socket_uri: str @@ -459,7 +466,7 @@ class ContainerExec(_serialization.Model): "command": {"key": "command", "type": "[str]"}, } - def __init__(self, *, command: Optional[List[str]] = None, **kwargs): + def __init__(self, *, command: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword command: The commands to execute within the container. :paramtype command: list[str] @@ -487,8 +494,8 @@ def __init__( *, command: Optional[str] = None, terminal_size: Optional["_models.ContainerExecRequestTerminalSize"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword command: The command to be executed. :paramtype command: str @@ -514,7 +521,7 @@ class ContainerExecRequestTerminalSize(_serialization.Model): "cols": {"key": "cols", "type": "int"}, } - def __init__(self, *, rows: Optional[int] = None, cols: Optional[int] = None, **kwargs): + def __init__(self, *, rows: Optional[int] = None, cols: Optional[int] = None, **kwargs: Any) -> None: """ :keyword rows: The row size of the terminal. :paramtype rows: int @@ -540,7 +547,7 @@ class ContainerExecResponse(_serialization.Model): "password": {"key": "password", "type": "str"}, } - def __init__(self, *, web_socket_uri: Optional[str] = None, password: Optional[str] = None, **kwargs): + def __init__(self, *, web_socket_uri: Optional[str] = None, password: Optional[str] = None, **kwargs: Any) -> None: """ :keyword web_socket_uri: The uri for the exec websocket. :paramtype web_socket_uri: str @@ -663,8 +670,8 @@ def __init__( extensions: Optional[List["_models.DeploymentExtensionSpec"]] = None, confidential_compute_properties: Optional["_models.ConfidentialComputeProperties"] = None, priority: Optional[Union[str, "_models.ContainerGroupPriority"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the container group, if configured. :paramtype identity: ~azure.mgmt.containerinstance.models.ContainerGroupIdentity @@ -772,8 +779,8 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: The resource location. :paramtype location: str @@ -926,8 +933,8 @@ def __init__( # pylint: disable=too-many-locals location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, zones: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: The identity of the container group, if configured. :paramtype identity: ~azure.mgmt.containerinstance.models.ContainerGroupIdentity @@ -1039,7 +1046,7 @@ class ContainerGroupDiagnostics(_serialization.Model): "log_analytics": {"key": "logAnalytics", "type": "LogAnalytics"}, } - def __init__(self, *, log_analytics: Optional["_models.LogAnalytics"] = None, **kwargs): + def __init__(self, *, log_analytics: Optional["_models.LogAnalytics"] = None, **kwargs: Any) -> None: """ :keyword log_analytics: Container group log analytics information. :paramtype log_analytics: ~azure.mgmt.containerinstance.models.LogAnalytics @@ -1087,8 +1094,8 @@ def __init__( *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentities"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned @@ -1122,8 +1129,8 @@ class ContainerGroupListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.ContainerGroup"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.ContainerGroup"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of container groups. :paramtype value: list[~azure.mgmt.containerinstance.models.ContainerGroup] @@ -1156,7 +1163,7 @@ class ContainerGroupPropertiesInstanceView(_serialization.Model): "state": {"key": "state", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.events = None @@ -1183,7 +1190,9 @@ class ContainerGroupSubnetId(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, id: str, name: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__( + self, *, id: str, name: Optional[str] = None, **kwargs: Any # pylint: disable=redefined-builtin + ) -> None: """ :keyword id: Resource ID of virtual network and subnet. Required. :paramtype id: str @@ -1228,8 +1237,8 @@ def __init__( path: Optional[str] = None, scheme: Optional[Union[str, "_models.Scheme"]] = None, http_headers: Optional[List["_models.HttpHeader"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword path: The path to probe. :paramtype path: str @@ -1268,8 +1277,8 @@ class ContainerPort(_serialization.Model): } def __init__( - self, *, port: int, protocol: Optional[Union[str, "_models.ContainerNetworkProtocol"]] = None, **kwargs - ): + self, *, port: int, protocol: Optional[Union[str, "_models.ContainerNetworkProtocol"]] = None, **kwargs: Any + ) -> None: """ :keyword protocol: The protocol associated with the port. Known values are: "TCP" and "UDP". :paramtype protocol: str or ~azure.mgmt.containerinstance.models.ContainerNetworkProtocol @@ -1320,8 +1329,8 @@ def __init__( failure_threshold: Optional[int] = None, success_threshold: Optional[int] = None, timeout_seconds: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword exec_property: The execution command to probe. :paramtype exec_property: ~azure.mgmt.containerinstance.models.ContainerExec @@ -1377,7 +1386,7 @@ class ContainerPropertiesInstanceView(_serialization.Model): "events": {"key": "events", "type": "[Event]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.restart_count = None @@ -1420,7 +1429,7 @@ class ContainerState(_serialization.Model): "detail_status": {"key": "detailStatus", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.state = None @@ -1467,8 +1476,8 @@ def __init__( version: Optional[str] = None, settings: Optional[JSON] = None, protected_settings: Optional[JSON] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the extension. Required. :paramtype name: str @@ -1513,8 +1522,13 @@ class DnsConfiguration(_serialization.Model): } def __init__( - self, *, name_servers: List[str], search_domains: Optional[str] = None, options: Optional[str] = None, **kwargs - ): + self, + *, + name_servers: List[str], + search_domains: Optional[str] = None, + options: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword name_servers: The DNS servers for the container group. Required. :paramtype name_servers: list[str] @@ -1558,8 +1572,8 @@ class EncryptionProperties(_serialization.Model): } def __init__( - self, *, vault_base_url: str, key_name: str, key_version: str, identity: Optional[str] = None, **kwargs - ): + self, *, vault_base_url: str, key_name: str, key_version: str, identity: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword vault_base_url: The keyvault base url. Required. :paramtype vault_base_url: str @@ -1600,7 +1614,9 @@ class EnvironmentVariable(_serialization.Model): "secure_value": {"key": "secureValue", "type": "str"}, } - def __init__(self, *, name: str, value: Optional[str] = None, secure_value: Optional[str] = None, **kwargs): + def __init__( + self, *, name: str, value: Optional[str] = None, secure_value: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword name: The name of the environment variable. Required. :paramtype name: str @@ -1652,7 +1668,7 @@ class Event(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.count = None @@ -1688,7 +1704,9 @@ class GitRepoVolume(_serialization.Model): "revision": {"key": "revision", "type": "str"}, } - def __init__(self, *, repository: str, directory: Optional[str] = None, revision: Optional[str] = None, **kwargs): + def __init__( + self, *, repository: str, directory: Optional[str] = None, revision: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword directory: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume @@ -1726,7 +1744,7 @@ class GpuResource(_serialization.Model): "sku": {"key": "sku", "type": "str"}, } - def __init__(self, *, count: int, sku: Union[str, "_models.GpuSku"], **kwargs): + def __init__(self, *, count: int, sku: Union[str, "_models.GpuSku"], **kwargs: Any) -> None: """ :keyword count: The count of the GPU resource. Required. :paramtype count: int @@ -1753,7 +1771,7 @@ class HttpHeader(_serialization.Model): "value": {"key": "value", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: The header name. :paramtype name: str @@ -1803,8 +1821,8 @@ def __init__( password: Optional[str] = None, identity: Optional[str] = None, identity_url: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword server: The Docker image registry server without a protocol such as "http" and "https". Required. @@ -1846,6 +1864,8 @@ class InitContainerDefinition(_serialization.Model): ~azure.mgmt.containerinstance.models.InitContainerPropertiesDefinitionInstanceView :ivar volume_mounts: The volume mounts available to the init container. :vartype volume_mounts: list[~azure.mgmt.containerinstance.models.VolumeMount] + :ivar security_context: The container security properties. + :vartype security_context: ~azure.mgmt.containerinstance.models.SecurityContextDefinition """ _validation = { @@ -1860,6 +1880,7 @@ class InitContainerDefinition(_serialization.Model): "environment_variables": {"key": "properties.environmentVariables", "type": "[EnvironmentVariable]"}, "instance_view": {"key": "properties.instanceView", "type": "InitContainerPropertiesDefinitionInstanceView"}, "volume_mounts": {"key": "properties.volumeMounts", "type": "[VolumeMount]"}, + "security_context": {"key": "properties.securityContext", "type": "SecurityContextDefinition"}, } def __init__( @@ -1870,8 +1891,9 @@ def __init__( command: Optional[List[str]] = None, environment_variables: Optional[List["_models.EnvironmentVariable"]] = None, volume_mounts: Optional[List["_models.VolumeMount"]] = None, - **kwargs - ): + security_context: Optional["_models.SecurityContextDefinition"] = None, + **kwargs: Any + ) -> None: """ :keyword name: The name for the init container. Required. :paramtype name: str @@ -1884,6 +1906,8 @@ def __init__( list[~azure.mgmt.containerinstance.models.EnvironmentVariable] :keyword volume_mounts: The volume mounts available to the init container. :paramtype volume_mounts: list[~azure.mgmt.containerinstance.models.VolumeMount] + :keyword security_context: The container security properties. + :paramtype security_context: ~azure.mgmt.containerinstance.models.SecurityContextDefinition """ super().__init__(**kwargs) self.name = name @@ -1892,6 +1916,7 @@ def __init__( self.environment_variables = environment_variables self.instance_view = None self.volume_mounts = volume_mounts + self.security_context = security_context class InitContainerPropertiesDefinitionInstanceView(_serialization.Model): @@ -1923,7 +1948,7 @@ class InitContainerPropertiesDefinitionInstanceView(_serialization.Model): "events": {"key": "events", "type": "[Event]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.restart_count = None @@ -1986,8 +2011,8 @@ def __init__( ip: Optional[str] = None, dns_name_label: Optional[str] = None, auto_generated_domain_name_label_scope: Union[str, "_models.DnsNameLabelReusePolicy"] = "Unsecure", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ports: The list of ports exposed on the container group. Required. :paramtype ports: list[~azure.mgmt.containerinstance.models.Port] @@ -2058,8 +2083,8 @@ def __init__( log_type: Optional[Union[str, "_models.LogAnalyticsLogType"]] = None, metadata: Optional[Dict[str, str]] = None, workspace_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword workspace_id: The workspace id for log analytics. Required. :paramtype workspace_id: str @@ -2092,7 +2117,7 @@ class Logs(_serialization.Model): "content": {"key": "content", "type": "str"}, } - def __init__(self, *, content: Optional[str] = None, **kwargs): + def __init__(self, *, content: Optional[str] = None, **kwargs: Any) -> None: """ :keyword content: The content of the log. :paramtype content: str @@ -2135,8 +2160,8 @@ def __init__( display: "_models.OperationDisplay", properties: Optional[JSON] = None, origin: Optional[Union[str, "_models.ContainerInstanceOperationsOrigin"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the operation. Required. :paramtype name: str @@ -2182,8 +2207,8 @@ def __init__( resource: Optional[str] = None, operation: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider: The name of the provider of the operation. :paramtype provider: str @@ -2215,7 +2240,9 @@ class OperationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of operations. :paramtype value: list[~azure.mgmt.containerinstance.models.Operation] @@ -2248,8 +2275,12 @@ class Port(_serialization.Model): } def __init__( - self, *, port: int, protocol: Optional[Union[str, "_models.ContainerGroupNetworkProtocol"]] = None, **kwargs - ): + self, + *, + port: int, + protocol: Optional[Union[str, "_models.ContainerGroupNetworkProtocol"]] = None, + **kwargs: Any + ) -> None: """ :keyword protocol: The protocol associated with the port. Known values are: "TCP" and "UDP". :paramtype protocol: str or ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProtocol @@ -2284,8 +2315,8 @@ def __init__( memory_in_gb: Optional[float] = None, cpu: Optional[float] = None, gpu: Optional["_models.GpuResource"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword memory_in_gb: The memory limit in GB of this container instance. :paramtype memory_in_gb: float @@ -2324,7 +2355,9 @@ class ResourceRequests(_serialization.Model): "gpu": {"key": "gpu", "type": "GpuResource"}, } - def __init__(self, *, memory_in_gb: float, cpu: float, gpu: Optional["_models.GpuResource"] = None, **kwargs): + def __init__( + self, *, memory_in_gb: float, cpu: float, gpu: Optional["_models.GpuResource"] = None, **kwargs: Any + ) -> None: """ :keyword memory_in_gb: The memory request in GB of this container instance. Required. :paramtype memory_in_gb: float @@ -2360,8 +2393,8 @@ class ResourceRequirements(_serialization.Model): } def __init__( - self, *, requests: "_models.ResourceRequests", limits: Optional["_models.ResourceLimits"] = None, **kwargs - ): + self, *, requests: "_models.ResourceRequests", limits: Optional["_models.ResourceLimits"] = None, **kwargs: Any + ) -> None: """ :keyword requests: The resource requests of this container instance. Required. :paramtype requests: ~azure.mgmt.containerinstance.models.ResourceRequests @@ -2373,6 +2406,99 @@ def __init__( self.limits = limits +class SecurityContextCapabilitiesDefinition(_serialization.Model): + """The capabilities to add or drop from a container. + + :ivar add: The capabilities to add to the container. + :vartype add: list[str] + :ivar drop: The capabilities to drop from the container. + :vartype drop: list[str] + """ + + _attribute_map = { + "add": {"key": "add", "type": "[str]"}, + "drop": {"key": "drop", "type": "[str]"}, + } + + def __init__(self, *, add: Optional[List[str]] = None, drop: Optional[List[str]] = None, **kwargs: Any) -> None: + """ + :keyword add: The capabilities to add to the container. + :paramtype add: list[str] + :keyword drop: The capabilities to drop from the container. + :paramtype drop: list[str] + """ + super().__init__(**kwargs) + self.add = add + self.drop = drop + + +class SecurityContextDefinition(_serialization.Model): + """The security context for the container. + + :ivar privileged: The flag to determine if the container permissions is elevated to Privileged. + :vartype privileged: bool + :ivar allow_privilege_escalation: A boolean value indicating whether the init process can + elevate its privileges. + :vartype allow_privilege_escalation: bool + :ivar capabilities: The capabilities to add or drop from a container. + :vartype capabilities: + ~azure.mgmt.containerinstance.models.SecurityContextCapabilitiesDefinition + :ivar run_as_group: Sets the User GID for the container. + :vartype run_as_group: int + :ivar run_as_user: Sets the User UID for the container. + :vartype run_as_user: int + :ivar seccomp_profile: a base64 encoded string containing the contents of the JSON in the + seccomp profile. + :vartype seccomp_profile: str + """ + + _attribute_map = { + "privileged": {"key": "privileged", "type": "bool"}, + "allow_privilege_escalation": {"key": "allowPrivilegeEscalation", "type": "bool"}, + "capabilities": {"key": "capabilities", "type": "SecurityContextCapabilitiesDefinition"}, + "run_as_group": {"key": "runAsGroup", "type": "int"}, + "run_as_user": {"key": "runAsUser", "type": "int"}, + "seccomp_profile": {"key": "seccompProfile", "type": "str"}, + } + + def __init__( + self, + *, + privileged: Optional[bool] = None, + allow_privilege_escalation: Optional[bool] = None, + capabilities: Optional["_models.SecurityContextCapabilitiesDefinition"] = None, + run_as_group: Optional[int] = None, + run_as_user: Optional[int] = None, + seccomp_profile: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword privileged: The flag to determine if the container permissions is elevated to + Privileged. + :paramtype privileged: bool + :keyword allow_privilege_escalation: A boolean value indicating whether the init process can + elevate its privileges. + :paramtype allow_privilege_escalation: bool + :keyword capabilities: The capabilities to add or drop from a container. + :paramtype capabilities: + ~azure.mgmt.containerinstance.models.SecurityContextCapabilitiesDefinition + :keyword run_as_group: Sets the User GID for the container. + :paramtype run_as_group: int + :keyword run_as_user: Sets the User UID for the container. + :paramtype run_as_user: int + :keyword seccomp_profile: a base64 encoded string containing the contents of the JSON in the + seccomp profile. + :paramtype seccomp_profile: str + """ + super().__init__(**kwargs) + self.privileged = privileged + self.allow_privilege_escalation = allow_privilege_escalation + self.capabilities = capabilities + self.run_as_group = run_as_group + self.run_as_user = run_as_user + self.seccomp_profile = seccomp_profile + + class Usage(_serialization.Model): """A single usage result. @@ -2406,7 +2532,7 @@ class Usage(_serialization.Model): "name": {"key": "name", "type": "UsageName"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -2433,7 +2559,7 @@ class UsageListResult(_serialization.Model): "value": {"key": "value", "type": "[Usage]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2460,7 +2586,7 @@ class UsageName(_serialization.Model): "localized_value": {"key": "localizedValue", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2468,7 +2594,9 @@ def __init__(self, **kwargs): class UserAssignedIdentities(_serialization.Model): - """The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + """The list of user identities associated with the container group. The user identity dictionary + key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. Variables are only populated by the server, and will be ignored when sending a request. @@ -2488,7 +2616,7 @@ class UserAssignedIdentities(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -2532,8 +2660,8 @@ def __init__( empty_dir: Optional[JSON] = None, secret: Optional[Dict[str, str]] = None, git_repo: Optional["_models.GitRepoVolume"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the volume. Required. :paramtype name: str @@ -2579,7 +2707,7 @@ class VolumeMount(_serialization.Model): "read_only": {"key": "readOnly", "type": "bool"}, } - def __init__(self, *, name: str, mount_path: str, read_only: Optional[bool] = None, **kwargs): + def __init__(self, *, name: str, mount_path: str, read_only: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword name: The name of the volume mount. Required. :paramtype name: str diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py index 276a543cda1d..afaa82772f27 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,9 +68,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,9 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -140,9 +129,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,9 +163,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,9 +197,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -245,9 +228,7 @@ def build_restart_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -278,9 +259,7 @@ def build_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -311,9 +290,7 @@ def build_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -338,15 +315,13 @@ def build_start_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_outbound_network_dependencies_endpoints_request( +def build_get_outbound_network_dependencies_endpoints_request( # pylint: disable=name-too-long resource_group_name: str, container_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -406,9 +381,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ContainerGroup"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -460,8 +433,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -493,9 +467,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -548,8 +520,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -593,9 +566,7 @@ def get(self, resource_group_name: str, container_group_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) request = build_get_request( @@ -610,8 +581,9 @@ def get(self, resource_group_name: str, container_group_name: str, **kwargs: Any request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -649,9 +621,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -678,8 +648,9 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -796,7 +767,7 @@ def begin_create_or_update( :param container_group_name: The name of the container group. Required. :type container_group_name: str :param container_group: The properties of the container group to be created or updated. Is - either a model type or a IO type. Required. + either a ContainerGroup type or a IO type. Required. :type container_group: ~azure.mgmt.containerinstance.models.ContainerGroup or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -817,9 +788,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -935,7 +904,7 @@ def update( :param container_group_name: The name of the container group. Required. :type container_group_name: str :param resource: The container group resource with just the tags to be updated. Is either a - model type or a IO type. Required. + Resource type or a IO type. Required. :type resource: ~azure.mgmt.containerinstance.models.Resource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -956,9 +925,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -985,8 +952,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1020,9 +988,7 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ContainerGroup]] = kwargs.pop("cls", None) request = build_delete_request( @@ -1037,8 +1003,9 @@ def _delete_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1089,9 +1056,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1147,9 +1112,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_restart_request( @@ -1164,8 +1127,9 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1207,9 +1171,7 @@ def begin_restart(self, resource_group_name: str, container_group_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1278,9 +1240,7 @@ def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -1295,8 +1255,9 @@ def stop( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1326,9 +1287,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -1343,8 +1302,9 @@ def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1386,9 +1346,7 @@ def begin_start(self, resource_group_name: str, container_group_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1429,7 +1387,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def get_outbound_network_dependencies_endpoints( + def get_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long self, resource_group_name: str, container_group_name: str, **kwargs: Any ) -> List[str]: """Get all network dependencies for container group. @@ -1457,9 +1415,7 @@ def get_outbound_network_dependencies_endpoints( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[List[str]] = kwargs.pop("cls", None) request = build_get_outbound_network_dependencies_endpoints_request( @@ -1474,8 +1430,9 @@ def get_outbound_network_dependencies_endpoints( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py index 0ee7ea50ace9..277332c3a654 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,9 +47,7 @@ def build_list_logs_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,9 +83,7 @@ def build_execute_command_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -127,9 +118,7 @@ def build_attach_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -217,9 +206,7 @@ def list_logs( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Logs] = kwargs.pop("cls", None) request = build_list_logs_request( @@ -237,8 +224,9 @@ def list_logs( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -344,8 +332,8 @@ def execute_command( :type container_group_name: str :param container_name: The name of the container instance. Required. :type container_name: str - :param container_exec_request: The request for the exec command. Is either a model type or a IO - type. Required. + :param container_exec_request: The request for the exec command. Is either a + ContainerExecRequest type or a IO type. Required. :type container_exec_request: ~azure.mgmt.containerinstance.models.ContainerExecRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -366,9 +354,7 @@ def execute_command( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerExecResponse] = kwargs.pop("cls", None) @@ -396,8 +382,9 @@ def execute_command( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -448,9 +435,7 @@ def attach( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ContainerAttachResponse] = kwargs.pop("cls", None) request = build_attach_request( @@ -466,8 +451,9 @@ def attach( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py index aea872d67634..c0cfe232e80a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_usage_request(location: str, subscription_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,9 +68,7 @@ def build_list_cached_images_request(location: str, subscription_id: str, **kwar _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_list_capabilities_request(location: str, subscription_id: str, **kwarg _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -164,9 +153,7 @@ def list_usage(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None) error_map = { @@ -219,8 +206,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -252,9 +240,7 @@ def list_cached_images(self, location: str, **kwargs: Any) -> Iterable["_models. _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CachedImagesListResult] = kwargs.pop("cls", None) error_map = { @@ -307,8 +293,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -340,9 +327,7 @@ def list_capabilities(self, location: str, **kwargs: Any) -> Iterable["_models.C _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CapabilitiesListResult] = kwargs.pop("cls", None) error_map = { @@ -395,8 +380,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py index fbb2aaa743e7..3252348a0655 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,9 +86,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -146,8 +137,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_subnet_service_association_link_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_subnet_service_association_link_operations.py index cef6e2155b6f..d61100345adb 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_subnet_service_association_link_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_subnet_service_association_link_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,9 +101,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -126,8 +117,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -173,9 +165,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/cached_images_list.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/cached_images_list.py index aceb26cfe514..8b7cd6445d03 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/cached_images_list.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/cached_images_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/CachedImagesList.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/CachedImagesList.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/capabilities_list.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/capabilities_list.py index 110f1942e247..a87b989cd4f5 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/capabilities_list.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/capabilities_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/CapabilitiesList.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/CapabilitiesList.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_attach.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_attach.py index 0121f70fce10..bf224a5d78c8 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_attach.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_attach.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerAttach.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerAttach.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_exec.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_exec.py index a461289710a5..48af00573a2e 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_exec.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_exec.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerExec.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerExec.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_create_confidential.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_create_confidential.py index 0963a9fb926b..14f41f58f69d 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_create_confidential.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_create_confidential.py @@ -47,6 +47,7 @@ def main(): "image": "confiimage", "ports": [{"port": 8000}], "resources": {"requests": {"cpu": 1, "memoryInGB": 1.5}}, + "securityContext": {"capabilities": {"add": ["CAP_NET_ADMIN"]}, "privileged": False}, }, } ], @@ -60,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupCreateConfidential.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupCreateConfidential.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_encryption_properties.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_encryption_properties.py index defdd4136c41..f037ed962287 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_encryption_properties.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_encryption_properties.py @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupEncryptionProperties.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupEncryptionProperties.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_extensions.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_extensions.py index e6877e2d22c0..8366013d9cdb 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_extensions.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_extensions.py @@ -76,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupExtensions.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupExtensions.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_usage.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_usage.py index afdc6287ad14..6cf542b0f18c 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_usage.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_usage.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupUsage.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupUsage.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_or_update.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_or_update.py index 03039e52f63b..c91b5967b174 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_or_update.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_or_update.py @@ -106,6 +106,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsCreateOrUpdate.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_priority.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_priority.py index aefbb5e5e8cf..669feee2cb7b 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_priority.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_priority.py @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsCreatePriority.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsCreatePriority.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_delete.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_delete.py index d06e2c05f251..b668f351e487 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_delete.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_delete.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsDelete.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_failed.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_failed.py index 4216302405d1..acb5bdddb7d0 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_failed.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_failed.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsGet_Failed.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsGet_Failed.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_priority.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_priority.py index e5fd8d29630c..80b590ce3948 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_priority.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_priority.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsGetPriority.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsGetPriority.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_succeeded.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_succeeded.py index 35ea4d861bd3..32cd7a87ccc4 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_succeeded.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_succeeded.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsGet_Succeeded.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsGet_Succeeded.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list.py index afeca9773d27..e045d4755eb4 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsList.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsList.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list_by_resource_group.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list_by_resource_group.py index 084f8ddf5f3b..1004d47e11e2 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list_by_resource_group.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_list_by_resource_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsListByResourceGroup.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_restart.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_restart.py index c3799085abd5..e26484aa3519 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_restart.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_restart.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsRestart.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsRestart.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_start.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_start.py index 820bbfaccd40..0ba41154670a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_start.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_start.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsStart.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsStart.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_stop.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_stop.py index eb1f4e958e71..58c6a41b9992 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_stop.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_stop.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerGroupsStop.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerGroupsStop.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_list_logs.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_list_logs.py index 2c8a9f89e7d2..4328f098b5a2 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_list_logs.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_list_logs.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/ContainerListLogs.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/ContainerListLogs.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/operations_list.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/operations_list.py index d2429f930ba3..eaf5f595d3fd 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/operations_list.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/operations_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/OperationsList.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/OperationsList.json if __name__ == "__main__": main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/subnet_service_association_link_delete.py b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/subnet_service_association_link_delete.py index ca5ddb70277b..6d45c381ce37 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/subnet_service_association_link_delete.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/subnet_service_association_link_delete.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/examples/SubnetServiceAssociationLinkDelete.json +# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2023-05-01/examples/SubnetServiceAssociationLinkDelete.json if __name__ == "__main__": main()