diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json b/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json index bb07d3f53353..799a35f82410 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json +++ b/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json @@ -1,11 +1,11 @@ { - "commit": "e37a57df67daaa82f9c3758fc450bc8655812a08", + "commit": "7efe20700592916a0ce1f8a80ff941e70712a8b2", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.3", "@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.3 --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..90da5d6b24af 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py @@ -36,14 +36,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 + :keyword api_version: Api Version. Default value is "2023-02-01-preview". 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: Literal["2023-02-01-preview"] = kwargs.pop("api_version", "2023-02-01-preview") 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..cdf6dfeb7351 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,7 +49,7 @@ 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 + :keyword api_version: Api Version. Default value is "2023-02-01-preview". 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 @@ -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..f17c068e833e 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 @@ -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 @@ -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..ef58647cc462 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 @@ -36,14 +36,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 + :keyword api_version: Api Version. Default value is "2023-02-01-preview". 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: Literal["2023-02-01-preview"] = kwargs.pop("api_version", "2023-02-01-preview") 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..a22a1c98a5c7 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,7 +50,7 @@ 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 + :keyword api_version: Api Version. Default value is "2023-02-01-preview". 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 @@ -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..7f2a9c6fdcaf 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 @@ -88,7 +88,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) @@ -142,8 +142,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,7 +179,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) @@ -233,8 +234,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,7 +280,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -295,8 +297,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,7 +337,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: Literal["2023-02-01-preview"] = 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)) @@ -363,8 +366,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 +485,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,7 +506,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: Literal["2023-02-01-preview"] = 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)) @@ -620,7 +624,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,7 +645,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: Literal["2023-02-01-preview"] = 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)) @@ -670,8 +674,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,7 +710,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[Optional[_models.ContainerGroup]] = kwargs.pop("cls", None) @@ -722,8 +727,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,7 +780,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -832,7 +838,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -849,8 +855,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,7 +901,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -965,7 +972,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -982,8 +989,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,7 +1021,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1030,8 +1038,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,7 +1084,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1146,7 +1155,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[List[str]] = kwargs.pop("cls", None) @@ -1163,8 +1172,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..0ccc15df6938 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 @@ -102,7 +102,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.Logs] = kwargs.pop("cls", None) @@ -122,8 +122,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 +230,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,7 +252,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: Literal["2023-02-01-preview"] = 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)) @@ -281,8 +282,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,7 +335,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerAttachResponse] = kwargs.pop("cls", None) @@ -351,8 +353,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..5a7734af71f9 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 @@ -75,7 +75,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None) @@ -130,8 +130,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,7 +165,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.CachedImagesListResult] = kwargs.pop("cls", None) @@ -219,8 +220,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,7 +255,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.CapabilitiesListResult] = kwargs.pop("cls", None) @@ -308,8 +310,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..31a1a122eb5f 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 @@ -69,7 +69,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) @@ -122,8 +122,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..03cb559317c4 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 @@ -71,7 +71,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -89,8 +89,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,7 +137,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) 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..0eafcdb70249 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 @@ -13,7 +13,6 @@ from ._models_py3 import CapabilitiesCapabilities from ._models_py3 import CapabilitiesListResult from ._models_py3 import CloudErrorBody -from ._models_py3 import ConfidentialComputeProperties from ._models_py3 import Container from ._models_py3 import ContainerAttachResponse from ._models_py3 import ContainerExec @@ -63,13 +62,13 @@ from ._container_instance_management_client_enums import ContainerGroupIpAddressType from ._container_instance_management_client_enums import ContainerGroupNetworkProtocol -from ._container_instance_management_client_enums import ContainerGroupPriority from ._container_instance_management_client_enums import ContainerGroupRestartPolicy from ._container_instance_management_client_enums import ContainerGroupSku from ._container_instance_management_client_enums import ContainerInstanceOperationsOrigin from ._container_instance_management_client_enums import ContainerNetworkProtocol from ._container_instance_management_client_enums import DnsNameLabelReusePolicy from ._container_instance_management_client_enums import GpuSku +from ._container_instance_management_client_enums import IsCustomProvisioningTimeout from ._container_instance_management_client_enums import LogAnalyticsLogType from ._container_instance_management_client_enums import OperatingSystemTypes from ._container_instance_management_client_enums import ResourceIdentityType @@ -86,7 +85,6 @@ "CapabilitiesCapabilities", "CapabilitiesListResult", "CloudErrorBody", - "ConfidentialComputeProperties", "Container", "ContainerAttachResponse", "ContainerExec", @@ -135,13 +133,13 @@ "VolumeMount", "ContainerGroupIpAddressType", "ContainerGroupNetworkProtocol", - "ContainerGroupPriority", "ContainerGroupRestartPolicy", "ContainerGroupSku", "ContainerInstanceOperationsOrigin", "ContainerNetworkProtocol", "DnsNameLabelReusePolicy", "GpuSku", + "IsCustomProvisioningTimeout", "LogAnalyticsLogType", "OperatingSystemTypes", "ResourceIdentityType", diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_container_instance_management_client_enums.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_container_instance_management_client_enums.py index b2346dedd4d4..8945af9a556a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_container_instance_management_client_enums.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_container_instance_management_client_enums.py @@ -24,13 +24,6 @@ class ContainerGroupNetworkProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta UDP = "UDP" -class ContainerGroupPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The priority of the container group.""" - - REGULAR = "Regular" - SPOT = "Spot" - - class ContainerGroupRestartPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Restart policy for all containers within the container group. @@ -50,7 +43,6 @@ class ContainerGroupSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): STANDARD = "Standard" DEDICATED = "Dedicated" - CONFIDENTIAL = "Confidential" class ContainerInstanceOperationsOrigin(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -93,6 +85,15 @@ class GpuSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): V100 = "V100" +class IsCustomProvisioningTimeout(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Flag indicating whether a custom value was provided for the provisioningTimeoutInSeconds + property. + """ + + TRUE = "True" + FALSE = "False" + + class LogAnalyticsLogType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The log type to be used.""" 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..a500cd8dcc90 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. @@ -303,26 +303,6 @@ def __init__( self.details = details -class ConfidentialComputeProperties(_serialization.Model): - """The properties for confidential container group. - - :ivar cce_policy: The base64 encoded confidential compute enforcement policy. - :vartype cce_policy: str - """ - - _attribute_map = { - "cce_policy": {"key": "ccePolicy", "type": "str"}, - } - - def __init__(self, *, cce_policy: Optional[str] = None, **kwargs): - """ - :keyword cce_policy: The base64 encoded confidential compute enforcement policy. - :paramtype cce_policy: str - """ - super().__init__(**kwargs) - self.cce_policy = cce_policy - - class Container(_serialization.Model): """A container instance. @@ -384,8 +364,8 @@ def __init__( volume_mounts: Optional[List["_models.VolumeMount"]] = None, liveness_probe: Optional["_models.ContainerProbe"] = None, readiness_probe: Optional["_models.ContainerProbe"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The user-provided name of the container instance. Required. :paramtype name: str @@ -435,7 +415,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 +439,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 +467,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 +494,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 +520,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 @@ -570,6 +550,14 @@ class ContainerGroupProperties(_serialization.Model): # pylint: disable=too-man is created from. :vartype image_registry_credentials: list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] + :ivar provisioning_timeout_in_seconds: Time in seconds in which a container group deployment + would timeout and fail. The allowed maximum value is 1800 seconds. If value is not provided, + property is given maximum value by default. + :vartype provisioning_timeout_in_seconds: int + :ivar is_custom_provisioning_timeout: Flag indicating whether a custom value was provided for + the provisioningTimeoutInSeconds property. Known values are: "True" and "False". + :vartype is_custom_provisioning_timeout: str or + ~azure.mgmt.containerinstance.models.IsCustomProvisioningTimeout :ivar restart_policy: Restart policy for all containers within the container group. @@ -594,8 +582,7 @@ class ContainerGroupProperties(_serialization.Model): # pylint: disable=too-man :vartype subnet_ids: list[~azure.mgmt.containerinstance.models.ContainerGroupSubnetId] :ivar dns_config: The DNS config information for a container group. :vartype dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration - :ivar sku: The SKU for a container group. Known values are: "Standard", "Dedicated", and - "Confidential". + :ivar sku: The SKU for a container group. Known values are: "Standard" and "Dedicated". :vartype sku: str or ~azure.mgmt.containerinstance.models.ContainerGroupSku :ivar encryption_properties: The encryption properties for a container group. :vartype encryption_properties: ~azure.mgmt.containerinstance.models.EncryptionProperties @@ -603,16 +590,12 @@ class ContainerGroupProperties(_serialization.Model): # pylint: disable=too-man :vartype init_containers: list[~azure.mgmt.containerinstance.models.InitContainerDefinition] :ivar extensions: extensions used by virtual kubelet. :vartype extensions: list[~azure.mgmt.containerinstance.models.DeploymentExtensionSpec] - :ivar confidential_compute_properties: The properties for confidential container group. - :vartype confidential_compute_properties: - ~azure.mgmt.containerinstance.models.ConfidentialComputeProperties - :ivar priority: The priority of the container group. Known values are: "Regular" and "Spot". - :vartype priority: str or ~azure.mgmt.containerinstance.models.ContainerGroupPriority """ _validation = { "provisioning_state": {"readonly": True}, "containers": {"required": True}, + "is_custom_provisioning_timeout": {"readonly": True}, "os_type": {"required": True}, "instance_view": {"readonly": True}, } @@ -625,6 +608,8 @@ class ContainerGroupProperties(_serialization.Model): # pylint: disable=too-man "key": "properties.imageRegistryCredentials", "type": "[ImageRegistryCredential]", }, + "provisioning_timeout_in_seconds": {"key": "properties.provisioningTimeoutInSeconds", "type": "int"}, + "is_custom_provisioning_timeout": {"key": "properties.isCustomProvisioningTimeout", "type": "str"}, "restart_policy": {"key": "properties.restartPolicy", "type": "str"}, "ip_address": {"key": "properties.ipAddress", "type": "IpAddress"}, "os_type": {"key": "properties.osType", "type": "str"}, @@ -637,11 +622,6 @@ class ContainerGroupProperties(_serialization.Model): # pylint: disable=too-man "encryption_properties": {"key": "properties.encryptionProperties", "type": "EncryptionProperties"}, "init_containers": {"key": "properties.initContainers", "type": "[InitContainerDefinition]"}, "extensions": {"key": "properties.extensions", "type": "[DeploymentExtensionSpec]"}, - "confidential_compute_properties": { - "key": "properties.confidentialComputeProperties", - "type": "ConfidentialComputeProperties", - }, - "priority": {"key": "properties.priority", "type": "str"}, } def __init__( @@ -651,6 +631,7 @@ def __init__( os_type: Union[str, "_models.OperatingSystemTypes"], identity: Optional["_models.ContainerGroupIdentity"] = None, image_registry_credentials: Optional[List["_models.ImageRegistryCredential"]] = None, + provisioning_timeout_in_seconds: Optional[int] = None, restart_policy: Optional[Union[str, "_models.ContainerGroupRestartPolicy"]] = None, ip_address: Optional["_models.IpAddress"] = None, volumes: Optional[List["_models.Volume"]] = None, @@ -661,10 +642,8 @@ def __init__( encryption_properties: Optional["_models.EncryptionProperties"] = None, init_containers: Optional[List["_models.InitContainerDefinition"]] = None, 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 @@ -674,6 +653,10 @@ def __init__( group is created from. :paramtype image_registry_credentials: list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] + :keyword provisioning_timeout_in_seconds: Time in seconds in which a container group deployment + would timeout and fail. The allowed maximum value is 1800 seconds. If value is not provided, + property is given maximum value by default. + :paramtype provisioning_timeout_in_seconds: int :keyword restart_policy: Restart policy for all containers within the container group. @@ -696,8 +679,7 @@ def __init__( :paramtype subnet_ids: list[~azure.mgmt.containerinstance.models.ContainerGroupSubnetId] :keyword dns_config: The DNS config information for a container group. :paramtype dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration - :keyword sku: The SKU for a container group. Known values are: "Standard", "Dedicated", and - "Confidential". + :keyword sku: The SKU for a container group. Known values are: "Standard" and "Dedicated". :paramtype sku: str or ~azure.mgmt.containerinstance.models.ContainerGroupSku :keyword encryption_properties: The encryption properties for a container group. :paramtype encryption_properties: ~azure.mgmt.containerinstance.models.EncryptionProperties @@ -705,17 +687,14 @@ def __init__( :paramtype init_containers: list[~azure.mgmt.containerinstance.models.InitContainerDefinition] :keyword extensions: extensions used by virtual kubelet. :paramtype extensions: list[~azure.mgmt.containerinstance.models.DeploymentExtensionSpec] - :keyword confidential_compute_properties: The properties for confidential container group. - :paramtype confidential_compute_properties: - ~azure.mgmt.containerinstance.models.ConfidentialComputeProperties - :keyword priority: The priority of the container group. Known values are: "Regular" and "Spot". - :paramtype priority: str or ~azure.mgmt.containerinstance.models.ContainerGroupPriority """ super().__init__(**kwargs) self.identity = identity self.provisioning_state = None self.containers = containers self.image_registry_credentials = image_registry_credentials + self.provisioning_timeout_in_seconds = provisioning_timeout_in_seconds + self.is_custom_provisioning_timeout = None self.restart_policy = restart_policy self.ip_address = ip_address self.os_type = os_type @@ -728,8 +707,6 @@ def __init__( self.encryption_properties = encryption_properties self.init_containers = init_containers self.extensions = extensions - self.confidential_compute_properties = confidential_compute_properties - self.priority = priority class Resource(_serialization.Model): @@ -772,8 +749,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 @@ -809,6 +786,14 @@ class ContainerGroup(Resource, ContainerGroupProperties): # pylint: disable=too is created from. :vartype image_registry_credentials: list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] + :ivar provisioning_timeout_in_seconds: Time in seconds in which a container group deployment + would timeout and fail. The allowed maximum value is 1800 seconds. If value is not provided, + property is given maximum value by default. + :vartype provisioning_timeout_in_seconds: int + :ivar is_custom_provisioning_timeout: Flag indicating whether a custom value was provided for + the provisioningTimeoutInSeconds property. Known values are: "True" and "False". + :vartype is_custom_provisioning_timeout: str or + ~azure.mgmt.containerinstance.models.IsCustomProvisioningTimeout :ivar restart_policy: Restart policy for all containers within the container group. @@ -833,8 +818,7 @@ class ContainerGroup(Resource, ContainerGroupProperties): # pylint: disable=too :vartype subnet_ids: list[~azure.mgmt.containerinstance.models.ContainerGroupSubnetId] :ivar dns_config: The DNS config information for a container group. :vartype dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration - :ivar sku: The SKU for a container group. Known values are: "Standard", "Dedicated", and - "Confidential". + :ivar sku: The SKU for a container group. Known values are: "Standard" and "Dedicated". :vartype sku: str or ~azure.mgmt.containerinstance.models.ContainerGroupSku :ivar encryption_properties: The encryption properties for a container group. :vartype encryption_properties: ~azure.mgmt.containerinstance.models.EncryptionProperties @@ -842,11 +826,6 @@ class ContainerGroup(Resource, ContainerGroupProperties): # pylint: disable=too :vartype init_containers: list[~azure.mgmt.containerinstance.models.InitContainerDefinition] :ivar extensions: extensions used by virtual kubelet. :vartype extensions: list[~azure.mgmt.containerinstance.models.DeploymentExtensionSpec] - :ivar confidential_compute_properties: The properties for confidential container group. - :vartype confidential_compute_properties: - ~azure.mgmt.containerinstance.models.ConfidentialComputeProperties - :ivar priority: The priority of the container group. Known values are: "Regular" and "Spot". - :vartype priority: str or ~azure.mgmt.containerinstance.models.ContainerGroupPriority :ivar id: The resource id. :vartype id: str :ivar name: The resource name. @@ -864,6 +843,7 @@ class ContainerGroup(Resource, ContainerGroupProperties): # pylint: disable=too _validation = { "provisioning_state": {"readonly": True}, "containers": {"required": True}, + "is_custom_provisioning_timeout": {"readonly": True}, "os_type": {"required": True}, "instance_view": {"readonly": True}, "id": {"readonly": True}, @@ -879,6 +859,8 @@ class ContainerGroup(Resource, ContainerGroupProperties): # pylint: disable=too "key": "properties.imageRegistryCredentials", "type": "[ImageRegistryCredential]", }, + "provisioning_timeout_in_seconds": {"key": "properties.provisioningTimeoutInSeconds", "type": "int"}, + "is_custom_provisioning_timeout": {"key": "properties.isCustomProvisioningTimeout", "type": "str"}, "restart_policy": {"key": "properties.restartPolicy", "type": "str"}, "ip_address": {"key": "properties.ipAddress", "type": "IpAddress"}, "os_type": {"key": "properties.osType", "type": "str"}, @@ -891,11 +873,6 @@ class ContainerGroup(Resource, ContainerGroupProperties): # pylint: disable=too "encryption_properties": {"key": "properties.encryptionProperties", "type": "EncryptionProperties"}, "init_containers": {"key": "properties.initContainers", "type": "[InitContainerDefinition]"}, "extensions": {"key": "properties.extensions", "type": "[DeploymentExtensionSpec]"}, - "confidential_compute_properties": { - "key": "properties.confidentialComputeProperties", - "type": "ConfidentialComputeProperties", - }, - "priority": {"key": "properties.priority", "type": "str"}, "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, @@ -911,6 +888,7 @@ def __init__( # pylint: disable=too-many-locals os_type: Union[str, "_models.OperatingSystemTypes"], identity: Optional["_models.ContainerGroupIdentity"] = None, image_registry_credentials: Optional[List["_models.ImageRegistryCredential"]] = None, + provisioning_timeout_in_seconds: Optional[int] = None, restart_policy: Optional[Union[str, "_models.ContainerGroupRestartPolicy"]] = None, ip_address: Optional["_models.IpAddress"] = None, volumes: Optional[List["_models.Volume"]] = None, @@ -921,13 +899,11 @@ def __init__( # pylint: disable=too-many-locals encryption_properties: Optional["_models.EncryptionProperties"] = None, init_containers: Optional[List["_models.InitContainerDefinition"]] = None, extensions: Optional[List["_models.DeploymentExtensionSpec"]] = None, - confidential_compute_properties: Optional["_models.ConfidentialComputeProperties"] = None, - priority: Optional[Union[str, "_models.ContainerGroupPriority"]] = None, 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 @@ -937,6 +913,10 @@ def __init__( # pylint: disable=too-many-locals group is created from. :paramtype image_registry_credentials: list[~azure.mgmt.containerinstance.models.ImageRegistryCredential] + :keyword provisioning_timeout_in_seconds: Time in seconds in which a container group deployment + would timeout and fail. The allowed maximum value is 1800 seconds. If value is not provided, + property is given maximum value by default. + :paramtype provisioning_timeout_in_seconds: int :keyword restart_policy: Restart policy for all containers within the container group. @@ -959,8 +939,7 @@ def __init__( # pylint: disable=too-many-locals :paramtype subnet_ids: list[~azure.mgmt.containerinstance.models.ContainerGroupSubnetId] :keyword dns_config: The DNS config information for a container group. :paramtype dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration - :keyword sku: The SKU for a container group. Known values are: "Standard", "Dedicated", and - "Confidential". + :keyword sku: The SKU for a container group. Known values are: "Standard" and "Dedicated". :paramtype sku: str or ~azure.mgmt.containerinstance.models.ContainerGroupSku :keyword encryption_properties: The encryption properties for a container group. :paramtype encryption_properties: ~azure.mgmt.containerinstance.models.EncryptionProperties @@ -968,11 +947,6 @@ def __init__( # pylint: disable=too-many-locals :paramtype init_containers: list[~azure.mgmt.containerinstance.models.InitContainerDefinition] :keyword extensions: extensions used by virtual kubelet. :paramtype extensions: list[~azure.mgmt.containerinstance.models.DeploymentExtensionSpec] - :keyword confidential_compute_properties: The properties for confidential container group. - :paramtype confidential_compute_properties: - ~azure.mgmt.containerinstance.models.ConfidentialComputeProperties - :keyword priority: The priority of the container group. Known values are: "Regular" and "Spot". - :paramtype priority: str or ~azure.mgmt.containerinstance.models.ContainerGroupPriority :keyword location: The resource location. :paramtype location: str :keyword tags: The resource tags. @@ -987,6 +961,7 @@ def __init__( # pylint: disable=too-many-locals identity=identity, containers=containers, image_registry_credentials=image_registry_credentials, + provisioning_timeout_in_seconds=provisioning_timeout_in_seconds, restart_policy=restart_policy, ip_address=ip_address, os_type=os_type, @@ -998,14 +973,14 @@ def __init__( # pylint: disable=too-many-locals encryption_properties=encryption_properties, init_containers=init_containers, extensions=extensions, - confidential_compute_properties=confidential_compute_properties, - priority=priority, **kwargs ) self.identity = identity self.provisioning_state = None self.containers = containers self.image_registry_credentials = image_registry_credentials + self.provisioning_timeout_in_seconds = provisioning_timeout_in_seconds + self.is_custom_provisioning_timeout = None self.restart_policy = restart_policy self.ip_address = ip_address self.os_type = os_type @@ -1018,8 +993,6 @@ def __init__( # pylint: disable=too-many-locals self.encryption_properties = encryption_properties self.init_containers = init_containers self.extensions = extensions - self.confidential_compute_properties = confidential_compute_properties - self.priority = priority self.id = None self.name = None self.type = None @@ -1039,7 +1012,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 +1060,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 +1095,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 +1129,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 +1156,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 +1203,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 +1243,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 +1295,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 +1352,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 +1395,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 +1442,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 +1488,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 +1538,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 +1580,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 +1634,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 +1670,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 +1710,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 +1737,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 +1787,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. @@ -1870,8 +1854,8 @@ def __init__( command: Optional[List[str]] = None, environment_variables: Optional[List["_models.EnvironmentVariable"]] = None, volume_mounts: Optional[List["_models.VolumeMount"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name for the init container. Required. :paramtype name: str @@ -1923,7 +1907,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 +1970,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 +2042,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 +2076,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 +2119,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 +2166,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 +2199,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 +2234,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 +2274,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 +2314,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 +2352,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 @@ -2406,7 +2398,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 +2425,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 +2452,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 +2460,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 +2482,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 +2526,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 +2573,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..547dcfbcfeaf 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 @@ -47,8 +47,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -75,8 +75,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -107,8 +107,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -140,8 +140,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,8 +176,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,8 +212,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -245,8 +245,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -278,8 +278,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -311,8 +311,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -344,8 +344,8 @@ def build_get_outbound_network_dependencies_endpoints_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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -406,7 +406,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) @@ -460,8 +460,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,7 +494,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroupListResult] = kwargs.pop("cls", None) @@ -548,8 +549,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,7 +595,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -610,8 +612,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,7 +652,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: Literal["2023-02-01-preview"] = 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)) @@ -678,8 +681,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 +800,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,7 +821,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: Literal["2023-02-01-preview"] = 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)) @@ -935,7 +939,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,7 +960,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: Literal["2023-02-01-preview"] = 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)) @@ -985,8 +989,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,7 +1025,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[Optional[_models.ContainerGroup]] = kwargs.pop("cls", None) @@ -1037,8 +1042,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,7 +1095,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerGroup] = kwargs.pop("cls", None) @@ -1147,7 +1153,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1164,8 +1170,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,7 +1214,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1278,7 +1285,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1295,8 +1302,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,7 +1334,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1343,8 +1351,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,7 +1395,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1457,7 +1466,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[List[str]] = kwargs.pop("cls", None) @@ -1474,8 +1483,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..0de083fd852a 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 @@ -52,8 +52,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -90,8 +90,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -127,8 +127,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -217,7 +217,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.Logs] = kwargs.pop("cls", None) @@ -237,8 +237,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 +345,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,7 +367,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: Literal["2023-02-01-preview"] = 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)) @@ -396,8 +397,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,7 +450,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.ContainerAttachResponse] = kwargs.pop("cls", None) @@ -466,8 +468,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..a4f756949ced 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 @@ -45,8 +45,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -75,8 +75,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -105,8 +105,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -164,7 +164,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None) @@ -219,8 +219,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,7 +253,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.CachedImagesListResult] = kwargs.pop("cls", None) @@ -307,8 +308,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,7 +342,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.CapabilitiesListResult] = kwargs.pop("cls", None) @@ -395,8 +397,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..d26579b348a8 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 @@ -45,8 +45,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -93,7 +93,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) @@ -146,8 +146,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..f550b72990bd 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 @@ -47,8 +47,8 @@ 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: Literal["2023-02-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-02-01-preview") ) accept = _headers.pop("Accept", "application/json") @@ -108,7 +108,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) @@ -126,8 +126,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,7 +174,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: Literal["2023-02-01-preview"] = kwargs.pop( "api_version", _params.pop("api-version", self._config.api_version) ) cls: ClsType[None] = kwargs.pop("cls", None) 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..2e8a30d827f8 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/preview/2023-02-01-preview/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..22cfbd4e46c3 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/preview/2023-02-01-preview/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..5350309d2d40 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/preview/2023-02-01-preview/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..b78a560ecb00 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/preview/2023-02-01-preview/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 deleted file mode 100644 index 0963a9fb926b..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_group_create_confidential.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerinstance import ContainerInstanceManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerinstance -# USAGE - python container_group_create_confidential.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerInstanceManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.container_groups.begin_create_or_update( - resource_group_name="demo", - container_group_name="demo1", - container_group={ - "location": "westeurope", - "properties": { - "confidentialComputeProperties": { - "ccePolicy": "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19" - }, - "containers": [ - { - "name": "accdemo", - "properties": { - "command": [], - "environmentVariables": [], - "image": "confiimage", - "ports": [{"port": 8000}], - "resources": {"requests": {"cpu": 1, "memoryInGB": 1.5}}, - }, - } - ], - "imageRegistryCredentials": [], - "ipAddress": {"ports": [{"port": 8000, "protocol": "TCP"}], "type": "Public"}, - "osType": "Linux", - "sku": "Confidential", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/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..d9038cc3c2cd 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/preview/2023-02-01-preview/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..41e4bfdc03c4 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/preview/2023-02-01-preview/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..6a14a25ab29a 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/preview/2023-02-01-preview/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..a7d7356c9268 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 @@ -80,6 +80,7 @@ def main(): "type": "Public", }, "osType": "Linux", + "provisioningTimeoutInSeconds": 600, "subnetIds": [ { "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" @@ -106,6 +107,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/preview/2023-02-01-preview/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 deleted file mode 100644 index aefbb5e5e8cf..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_create_priority.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerinstance import ContainerInstanceManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerinstance -# USAGE - python container_groups_create_priority.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerInstanceManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.container_groups.begin_create_or_update( - resource_group_name="demo", - container_group_name="demo1", - container_group={ - "location": "eastus", - "properties": { - "containers": [ - { - "name": "test-container-001", - "properties": { - "command": ["/bin/sh", "-c", "sleep 10"], - "image": "alpine:latest", - "resources": {"requests": {"cpu": 1, "memoryInGB": 1}}, - }, - } - ], - "osType": "Linux", - "priority": "Spot", - "restartPolicy": "Never", - "sku": "Standard", - }, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/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..86ef40c9f840 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/preview/2023-02-01-preview/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..035ddbb3fa42 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/preview/2023-02-01-preview/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 deleted file mode 100644 index e5fd8d29630c..000000000000 --- a/sdk/containerinstance/azure-mgmt-containerinstance/generated_samples/container_groups_get_priority.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerinstance import ContainerInstanceManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerinstance -# USAGE - python container_groups_get_priority.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerInstanceManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.container_groups.get( - resource_group_name="demo", - container_group_name="demo1", - ) - print(response) - - -# x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/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..80562686ed91 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/preview/2023-02-01-preview/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..faf60cc2d78c 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/preview/2023-02-01-preview/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..f8b2bb907517 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/preview/2023-02-01-preview/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..5b8538b029be 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/preview/2023-02-01-preview/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..3fc88181d31c 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/preview/2023-02-01-preview/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..905ef737bf8b 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/preview/2023-02-01-preview/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..8c7502c253e0 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/preview/2023-02-01-preview/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..328557fec893 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/preview/2023-02-01-preview/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..d0b934d1e1ad 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/preview/2023-02-01-preview/examples/SubnetServiceAssociationLinkDelete.json if __name__ == "__main__": main()