diff --git a/sdk/consumption/azure-mgmt-consumption/_meta.json b/sdk/consumption/azure-mgmt-consumption/_meta.json index 2bff1506a305..5bdd5d1a1c7e 100644 --- a/sdk/consumption/azure-mgmt-consumption/_meta.json +++ b/sdk/consumption/azure-mgmt-consumption/_meta.json @@ -1,11 +1,11 @@ { - "commit": "1be09531e4c6edeafde41d6562371566d39669e8", + "commit": "18ce8edb78070c2a16147825d044a41057b4467e", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.7", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/consumption/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/consumption/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.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/consumption/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py index 013feb87a864..d563dad270b5 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -35,14 +29,14 @@ class ConsumptionManagementClientConfiguration(Configuration): # pylint: disabl :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Azure Subscription ID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ConsumptionManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", "2021-10-01") + api_version: str = kwargs.pop("api_version", "2023-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py index e4acefe4f418..a46e5bc1287d 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py @@ -88,7 +88,7 @@ class ConsumptionManagementClient: # pylint: disable=client-accepts-api-version :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 "2021-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -103,7 +103,7 @@ def __init__( self._config = ConsumptionManagementClientConfiguration( 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) @@ -166,5 +166,5 @@ def __enter__(self) -> "ConsumptionManagementClient": 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_serialization.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_serialization.py index 2c170e28dbca..842ae727fbbc 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_serialization.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_serialization.py @@ -38,7 +38,22 @@ import re import sys import codecs -from typing import Optional, Union, AnyStr, IO, Mapping +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) try: from urllib import quote # type: ignore @@ -48,12 +63,14 @@ import isodate # type: ignore -from typing import Dict, Any, cast - from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + class RawDeserializer: @@ -277,8 +294,8 @@ class Model(object): _attribute_map: Dict[str, Dict[str, Any]] = {} _validation: Dict[str, Dict[str, Any]] = {} - def __init__(self, **kwargs): - self.additional_properties = {} + def __init__(self, **kwargs: Any) -> None: + self.additional_properties: Dict[str, Any] = {} for k in kwargs: if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -287,25 +304,25 @@ def __init__(self, **kwargs): else: setattr(self, k, kwargs[k]) - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" return not self.__eq__(other) - def __str__(self): + def __str__(self) -> str: return str(self.__dict__) @classmethod - def enable_additional_properties_sending(cls): + def enable_additional_properties_sending(cls) -> None: cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} @classmethod - def is_xml_model(cls): + def is_xml_model(cls) -> bool: try: cls._xml_map # type: ignore except AttributeError: @@ -322,7 +339,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - def serialize(self, keep_readonly=False, **kwargs): + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: """Return the JSON that would be sent to azure from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -336,8 +353,13 @@ def serialize(self, keep_readonly=False, **kwargs): serializer = Serializer(self._infer_class_models()) return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) - def as_dict(self, keep_readonly=True, key_transformer=attribute_transformer, **kwargs): - """Return a dict that can be JSONify using json.dump. + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. Advanced usage might optionally use a callback as parameter: @@ -384,7 +406,7 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls, data, content_type=None): + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. @@ -396,7 +418,12 @@ def deserialize(cls, data, content_type=None): return deserializer(cls.__name__, data, content_type=content_type) @classmethod - def from_dict(cls, data, key_extractors=None, content_type=None): + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: """Parse a dict using given key extractor return a model. By default consider key @@ -409,8 +436,8 @@ def from_dict(cls, data, key_extractors=None, content_type=None): :raises: DeserializationError if something went wrong """ deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( - [ + deserializer.key_extractors = ( # type: ignore + [ # type: ignore attribute_key_case_insensitive_extractor, rest_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, @@ -518,7 +545,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -534,7 +561,7 @@ def __init__(self, classes=None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -602,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -626,8 +653,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore - unflattened = {k: new_attr} - new_attr = unflattened + new_attr = {k: new_attr} _new_attr = new_attr _serialized = serialized @@ -656,8 +682,8 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type, None) + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: @@ -777,6 +803,8 @@ def serialize_data(self, data, data_type, **kwargs): raise ValueError("No value for given attribute") try: + if data is AzureCoreNull: + return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) @@ -1161,7 +1189,8 @@ def rest_key_extractor(attr, attr_desc, data): working_data = data while "." in key: - dict_keys = _FLATTEN.split(key) + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1242,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type): xml_name = internal_type_xml_map.get("name", internal_type.__name__) xml_ns = internal_type_xml_map.get("ns", None) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1266,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data): # Integrate namespace if necessary xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): @@ -1332,7 +1361,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1352,7 +1381,7 @@ def __init__(self, classes=None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1471,7 +1500,7 @@ def _classify_target(self, target, data): Once classification has been determined, initialize object. :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. """ if target is None: return None, None @@ -1486,7 +1515,7 @@ def _classify_target(self, target, data): target = target._classify(data, self.dependencies) except AttributeError: pass # Target is not a Model, no classify - return target, target.__class__.__name__ + return target, target.__class__.__name__ # type: ignore def failsafe_deserialize(self, target_obj, data, content_type=None): """Ignores any errors encountered in deserialization, @@ -1496,7 +1525,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): a deserialization error. :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. """ try: diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_vendor.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_vendor.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_version.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_version.py index 75a1436b862f..e5754a47ce68 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_version.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "11.0.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_configuration.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_configuration.py index 92d21cc93087..ad57e1091b4e 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_configuration.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -35,14 +29,14 @@ class ConsumptionManagementClientConfiguration(Configuration): # pylint: disabl :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Azure Subscription ID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ConsumptionManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", "2021-10-01") + api_version: str = kwargs.pop("api_version", "2023-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_consumption_management_client.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_consumption_management_client.py index bbfde391df8d..0271e930d70e 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_consumption_management_client.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_consumption_management_client.py @@ -89,7 +89,7 @@ class ConsumptionManagementClient: # pylint: disable=client-accepts-api-version :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 "2021-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -104,7 +104,7 @@ def __init__( self._config = ConsumptionManagementClientConfiguration( 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) @@ -167,5 +167,5 @@ async def __aenter__(self) -> "ConsumptionManagementClient": 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_aggregated_cost_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_aggregated_cost_operations.py index 719fcf0fd3ef..df32b0e13557 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_aggregated_cost_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_aggregated_cost_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -31,10 +30,6 @@ build_get_for_billing_period_by_management_group_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -65,6 +60,9 @@ async def get_by_management_group( """Provides the aggregate cost of a management group and all child management groups by current billing period. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param management_group_id: Azure Management Group ID. Required. :type management_group_id: str :param filter: May be used to filter aggregated cost by properties/usageStart (Utc time), @@ -88,9 +86,7 @@ async def get_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ManagementGroupAggregatedCostResult] = kwargs.pop("cls", None) request = build_get_by_management_group_request( @@ -104,8 +100,9 @@ async def get_by_management_group( 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 @@ -133,6 +130,9 @@ async def get_for_billing_period_by_management_group( """Provides the aggregate cost of a management group and all child management groups by specified billing period. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param management_group_id: Azure Management Group ID. Required. :type management_group_id: str :param billing_period_name: Billing Period Name. Required. @@ -153,9 +153,7 @@ async def get_for_billing_period_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ManagementGroupAggregatedCostResult] = kwargs.pop("cls", None) request = build_get_for_billing_period_by_management_group_request( @@ -169,8 +167,9 @@ async def get_for_billing_period_by_management_group( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_balances_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_balances_operations.py index bec3e86e7d3d..e42db7652c53 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_balances_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_balances_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -31,10 +30,6 @@ build_get_for_billing_period_by_billing_account_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,6 +58,9 @@ async def get_by_billing_account(self, billing_account_id: str, **kwargs: Any) - """Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -81,9 +79,7 @@ async def get_by_billing_account(self, billing_account_id: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Balance] = kwargs.pop("cls", None) request = build_get_by_billing_account_request( @@ -96,8 +92,9 @@ async def get_by_billing_account(self, billing_account_id: str, **kwargs: Any) - 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 @@ -125,6 +122,9 @@ async def get_for_billing_period_by_billing_account( """Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_period_name: Billing Period Name. Required. @@ -145,9 +145,7 @@ async def get_for_billing_period_by_billing_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Balance] = kwargs.pop("cls", None) request = build_get_for_billing_period_by_billing_account_request( @@ -161,8 +159,9 @@ async def get_for_billing_period_by_billing_account( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_budgets_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_budgets_operations.py index eefdd10b3308..e83e8c1f3f77 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_budgets_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_budgets_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,6 +62,9 @@ def __init__(self, *args, **kwargs) -> None: def list(self, scope: str, **kwargs: Any) -> AsyncIterable["_models.Budget"]: """Lists all budgets for the defined scope. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -79,7 +77,7 @@ def list(self, scope: str, **kwargs: Any) -> AsyncIterable["_models.Budget"]: scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -90,9 +88,7 @@ def list(self, scope: str, **kwargs: Any) -> AsyncIterable["_models.Budget"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BudgetsListResult] = kwargs.pop("cls", None) error_map = { @@ -144,8 +140,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,6 +161,9 @@ async def get_next(next_link=None): async def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: """Gets the budget for the scope by budget name. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -176,7 +176,7 @@ async def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budg scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -197,9 +197,7 @@ async def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Budget] = kwargs.pop("cls", None) request = build_get_request( @@ -213,8 +211,9 @@ async def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budg 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 @@ -247,6 +246,9 @@ async def create_or_update( form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -259,7 +261,7 @@ async def create_or_update( scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -283,6 +285,9 @@ async def create_or_update( form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -295,7 +300,7 @@ async def create_or_update( scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -319,6 +324,9 @@ async def create_or_update( form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -331,12 +339,12 @@ async def create_or_update( scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Is either a model type + :param parameters: Parameters supplied to the Create Budget operation. Is either a Budget type or a IO type. Required. :type parameters: ~azure.mgmt.consumption.models.Budget or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -358,9 +366,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Budget] = kwargs.pop("cls", None) @@ -386,8 +392,9 @@ async def create_or_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 @@ -416,6 +423,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """The operation to delete a budget. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -428,7 +438,7 @@ async def delete( # pylint: disable=inconsistent-return-statements scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -449,9 +459,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -465,8 +473,9 @@ async def delete( # 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 diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_charges_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_charges_operations.py index a5e80610b7c4..20b6bb2a3c8a 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_charges_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_charges_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._charges_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,6 +62,9 @@ async def list( ) -> _models.ChargesListResult: """Lists the charges based for the defined scope. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with charges operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, and @@ -79,9 +77,9 @@ async def list( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. Required. :type scope: str :param start_date: Start date. Default value is None. @@ -114,9 +112,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ChargesListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -133,8 +129,9 @@ async def list( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_credits_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_credits_operations.py index e35c87cd3480..21358f339a84 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_credits_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_credits_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._credits_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,6 +56,9 @@ async def get( ) -> Optional[_models.CreditSummary]: """The credit summary by billingAccountId and billingProfileId. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_profile_id: Azure Billing Profile ID. Required. @@ -81,9 +79,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.CreditSummary]] = kwargs.pop("cls", None) request = build_get_request( @@ -97,8 +93,9 @@ async def get( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_events_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_events_operations.py index 91bc7ae68e49..1eee1c733b02 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_events_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_events_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -33,10 +32,6 @@ build_list_by_billing_profile_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,6 +62,9 @@ def list_by_billing_profile( """Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_profile_id: Azure Billing Profile ID. Required. @@ -83,9 +81,7 @@ def list_by_billing_profile( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Events] = kwargs.pop("cls", None) error_map = { @@ -140,8 +136,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 @@ -165,6 +162,9 @@ def list_by_billing_account( """Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param filter: May be used to filter the events by lotId, lotSource etc. The filter supports @@ -180,9 +180,7 @@ def list_by_billing_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Events] = kwargs.pop("cls", None) error_map = { @@ -235,8 +233,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_lots_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_lots_operations.py index 300c7aafcca8..867738396eef 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_lots_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_lots_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -34,10 +33,6 @@ build_list_by_customer_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,6 +63,9 @@ def list_by_billing_profile( """Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft Customer Agreements (MCA) billing accounts. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_profile_id: Azure Billing Profile ID. Required. @@ -80,9 +78,7 @@ def list_by_billing_profile( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Lots] = kwargs.pop("cls", None) error_map = { @@ -135,8 +131,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 @@ -161,6 +158,9 @@ def list_by_billing_account( supported for Microsoft Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param filter: May be used to filter the lots by Status, Source etc. The filter supports 'eq', @@ -176,9 +176,7 @@ def list_by_billing_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Lots] = kwargs.pop("cls", None) error_map = { @@ -231,8 +229,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 @@ -256,6 +255,9 @@ def list_by_customer( """Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing accounts. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param customer_id: Customer ID. Required. @@ -272,9 +274,7 @@ def list_by_customer( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Lots] = kwargs.pop("cls", None) error_map = { @@ -328,8 +328,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_marketplaces_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_marketplaces_operations.py index 924441566518..d5205ec39232 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_marketplaces_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_marketplaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._marketplaces_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,6 +64,9 @@ def list( """Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, @@ -103,9 +101,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MarketplacesListResult] = kwargs.pop("cls", None) error_map = { @@ -160,8 +156,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py index 715254cec870..034269f50d43 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,9 +64,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -122,8 +115,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_price_sheet_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_price_sheet_operations.py index 4bb0b620ad7f..806db249b89f 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_price_sheet_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_price_sheet_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._price_sheet_operations import build_get_by_billing_period_request, build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,6 +57,9 @@ async def get( """Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param expand: May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. Default value is None. :type expand: str @@ -89,9 +87,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PriceSheetResult] = kwargs.pop("cls", None) request = build_get_request( @@ -107,8 +103,9 @@ async def get( 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 @@ -139,6 +136,9 @@ async def get_by_billing_period( """Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_period_name: Billing Period Name. Required. :type billing_period_name: str :param expand: May be used to expand the properties/meterDetails within a price sheet. By @@ -168,9 +168,7 @@ async def get_by_billing_period( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PriceSheetResult] = kwargs.pop("cls", None) request = build_get_by_billing_period_request( @@ -187,8 +185,9 @@ async def get_by_billing_period( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendation_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendation_details_operations.py index dd832048dc3e..cf56ed85051e 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendation_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendation_details_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._reservation_recommendation_details_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -68,6 +63,9 @@ async def get( ) -> Optional[_models.ReservationRecommendationDetailsModel]: """Details of a reservation recommendation for what-if analysis of reserved instances. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param resource_scope: The scope associated with reservation recommendation details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, @@ -105,9 +103,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReservationRecommendationDetailsModel]] = kwargs.pop("cls", None) request = build_get_request( @@ -125,8 +121,9 @@ async def get( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendations_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendations_operations.py index b23a984c7447..942e3fe419ae 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendations_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._reservation_recommendations_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,6 +58,9 @@ def list( ) -> AsyncIterable["_models.ReservationRecommendation"]: """List of recommendations for purchasing reserved instances. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param resource_scope: The scope associated with reservation recommendations operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, @@ -88,9 +86,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationRecommendationsListResult] = kwargs.pop("cls", None) error_map = { @@ -143,8 +139,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_transactions_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_transactions_operations.py index 15671e3cf4a9..a8ab0cbae649 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_transactions_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_transactions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._reservation_transactions_operations import build_list_by_billing_profile_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,13 +54,23 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list( - self, billing_account_id: str, filter: Optional[str] = None, **kwargs: Any + self, + billing_account_id: str, + filter: Optional[str] = None, + use_markup_if_partner: Optional[bool] = None, + preview_markup_percentage: Optional[float] = None, + **kwargs: Any ) -> AsyncIterable["_models.ReservationTransaction"]: """List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was - made. + made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the + response size exceeds the ARM limit. In such cases, API call should be made with smaller date + ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str @@ -76,6 +81,12 @@ def list( the entire December 2020 month (i.e. will contain records for dates December 30 and 31). Default value is None. :type filter: str + :param use_markup_if_partner: Applies mark up to the transactions if the caller is a partner. + Default value is None. + :type use_markup_if_partner: bool + :param preview_markup_percentage: Preview markup percentage to be applied. Default value is + None. + :type preview_markup_percentage: float :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ReservationTransaction or the result of cls(response) @@ -86,9 +97,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationTransactionsListResult] = kwargs.pop("cls", None) error_map = { @@ -105,6 +114,8 @@ def prepare_request(next_link=None): request = build_list_request( billing_account_id=billing_account_id, filter=filter, + use_markup_if_partner=use_markup_if_partner, + preview_markup_percentage=preview_markup_percentage, api_version=api_version, template_url=self.list.metadata["url"], headers=_headers, @@ -141,8 +152,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 @@ -166,7 +178,12 @@ def list_by_billing_profile( """List of transactions for reserved instances on billing profile scope. The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as - May 2021 but the billing month as April 2020 when the reservation purchase was made. + May 2021 but the billing month as April 2020 when the reservation purchase was made. Note: ARM + has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds + the ARM limit. In such cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str @@ -189,9 +206,7 @@ def list_by_billing_profile( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ModernReservationTransactionsListResult] = kwargs.pop("cls", None) error_map = { @@ -245,8 +260,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_details_operations.py index cb74a06054b8..1e8e43be488d 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_details_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -34,10 +33,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,8 +61,14 @@ def list_by_reservation_order( self, reservation_order_id: str, filter: str, **kwargs: Any ) -> AsyncIterable["_models.ReservationDetail"]: """Lists the reservations details for provided date range. Note: ARM has a payload size limit of - 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, - API call should be made with smaller date ranges. + 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data + size is too large, customers may also get 504 as the API timed out preparing the data. In such + cases, API call should be made with smaller date ranges or a call to Generate Reservation + Details Report API should be made as it is asynchronous and will not run into response size + time outs. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -83,9 +84,7 @@ def list_by_reservation_order( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -138,8 +137,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 @@ -161,8 +161,14 @@ def list_by_reservation_order_and_reservation( self, reservation_order_id: str, reservation_id: str, filter: str, **kwargs: Any ) -> AsyncIterable["_models.ReservationDetail"]: """Lists the reservations details for provided date range. Note: ARM has a payload size limit of - 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, - API call should be made with smaller date ranges. + 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data + size is too large, customers may also get 504 as the API timed out preparing the data. In such + cases, API call should be made with smaller date ranges or a call to Generate Reservation + Details Report API should be made as it is asynchronous and will not run into response size + time outs. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -180,9 +186,7 @@ def list_by_reservation_order_and_reservation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -236,8 +240,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 @@ -265,9 +270,15 @@ def list( reservation_order_id: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.ReservationDetail"]: - """Lists the reservations details for the defined scope and provided date range. Note: ARM has a - payload size limit of 12MB, so currently callers get 502 when the response size exceeds the ARM - limit. In such cases, API call should be made with smaller date ranges. + """Lists the reservations details for provided date range. Note: ARM has a payload size limit of + 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data + size is too large, customers may also get 504 as the API timed out preparing the data. In such + cases, API call should be made with smaller date ranges or a call to Generate Reservation + Details Report API should be made as it is asynchronous and will not run into response size + time outs. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param resource_scope: The scope associated with reservations details operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope @@ -300,9 +311,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -359,8 +368,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_summaries_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_summaries_operations.py index 2c5bb97e1b10..e10e1629a279 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_summaries_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_summaries_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union import urllib.parse @@ -34,10 +33,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +64,12 @@ def list_by_reservation_order( filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.ReservationSummary"]: - """Lists the reservations summaries for daily or monthly grain. + """Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit + of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -87,9 +87,7 @@ def list_by_reservation_order( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationSummariesListResult] = kwargs.pop("cls", None) error_map = { @@ -143,8 +141,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 @@ -170,7 +169,12 @@ def list_by_reservation_order_and_reservation( filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.ReservationSummary"]: - """Lists the reservations summaries for daily or monthly grain. + """Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit + of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -190,9 +194,7 @@ def list_by_reservation_order_and_reservation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationSummariesListResult] = kwargs.pop("cls", None) error_map = { @@ -247,8 +249,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 @@ -277,7 +280,12 @@ def list( reservation_order_id: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.ReservationSummary"]: - """Lists the reservations summaries for the defined scope daily or monthly grain. + """Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a + payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM + limit. In such cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param resource_scope: The scope associated with reservations summaries operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount @@ -312,9 +320,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationSummariesListResult] = kwargs.pop("cls", None) error_map = { @@ -372,8 +378,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_tags_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_tags_operations.py index ec7c05804fe9..4cda20322294 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_tags_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_tags_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._tags_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,6 +54,9 @@ def __init__(self, *args, **kwargs) -> None: async def get(self, scope: str, **kwargs: Any) -> Optional[_models.TagsResult]: """Get all available tag keys for the defined scope. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -86,9 +84,7 @@ async def get(self, scope: str, **kwargs: Any) -> Optional[_models.TagsResult]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.TagsResult]] = kwargs.pop("cls", None) request = build_get_request( @@ -101,8 +97,9 @@ async def get(self, scope: str, **kwargs: Any) -> Optional[_models.TagsResult]: 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_usage_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_usage_details_operations.py index 9b7ee901cf4c..7134246ef2bd 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_usage_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_usage_details_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._usage_details_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,6 +66,17 @@ def list( """Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. + !Note : + + Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do + not recommend that you take a new dependency on this API. Please use the Cost Details API + instead. We will notify customers once a date for retirement has been determined.For Cost + Details API see, + https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, @@ -86,9 +92,9 @@ def list( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. Required. :type scope: str :param expand: May be used to expand the properties/additionalInfo or properties/meterDetails @@ -122,9 +128,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsageDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -181,8 +185,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py index ecb66e0217dd..c546fa0e8806 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py @@ -22,6 +22,7 @@ class BudgetOperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The operator to use for comparison.""" IN = "In" + IN_ENUM = "In" class CategoryType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -66,10 +67,10 @@ class CultureCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Datagrain(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Datagrain.""" - #: Daily grain of data DAILY_GRAIN = "daily" - #: Monthly grain of data + """Daily grain of data""" MONTHLY_GRAIN = "monthly" + """Monthly grain of data""" class EventType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -88,12 +89,12 @@ class EventType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class LookBackPeriod(str, Enum, metaclass=CaseInsensitiveEnumMeta): """LookBackPeriod.""" - #: Use 7 days of data for recommendations LAST07_DAYS = "Last7Days" - #: Use 30 days of data for recommendations + """Use 7 days of data for recommendations""" LAST30_DAYS = "Last30Days" - #: Use 60 days of data for recommendations + """Use 30 days of data for recommendations""" LAST60_DAYS = "Last60Days" + """Use 60 days of data for recommendations""" class LotSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -107,27 +108,27 @@ class LotSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Metrictype(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Metrictype.""" - #: Actual cost data. ACTUAL_COST_METRIC_TYPE = "actualcost" - #: Amortized cost data. + """Actual cost data.""" AMORTIZED_COST_METRIC_TYPE = "amortizedcost" - #: Usage data. + """Amortized cost data.""" USAGE_METRIC_TYPE = "usage" + """Usage data.""" class OperatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The comparison operator.""" - #: Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not + EQUAL_TO = "EqualTo" + """Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not #: recommended to use this OperatorType as there’s low chance of cost being exactly the same as #: threshold value, leading to missing of your alert. This OperatorType will be deprecated in - #: future. - EQUAL_TO = "EqualTo" - #: Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This - #: is the recommended OperatorType while configuring Budget Alert. + #: future.""" GREATER_THAN = "GreaterThan" - #: Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. + """Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This + #: is the recommended OperatorType while configuring Budget Alert.""" GREATER_THAN_OR_EQUAL_TO = "GreaterThanOrEqualTo" + """Alert will be triggered if the evaluated cost is greater than or equal to the threshold value.""" class PricingModelType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -166,20 +167,20 @@ class Status(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Term(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Term.""" - #: 1 year reservation term P1_Y = "P1Y" - #: 3 year reservation term + """1 year reservation term""" P3_Y = "P3Y" + """3 year reservation term""" class ThresholdType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of threshold.""" - #: Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . ACTUAL = "Actual" - #: Forecasted costs budget alerts provide advanced notification that your spending trends are - #: likely to exceed your allocated budget, as it relies on forecasted cost predictions. + """Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget .""" FORECASTED = "Forecasted" + """Forecasted costs budget alerts provide advanced notification that your spending trends are + #: likely to exceed your allocated budget, as it relies on forecasted cost predictions.""" class TimeGrainType(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py index a3d280e095a9..0f7edcf90f96 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from .. import _serialization @@ -38,7 +38,7 @@ class Amount(_serialization.Model): "value": {"key": "value", "type": "float"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.currency = None @@ -74,7 +74,7 @@ class AmountWithExchangeRate(Amount): "exchange_rate_month": {"key": "exchangeRateMonth", "type": "int"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.exchange_rate = None @@ -114,7 +114,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -167,6 +167,8 @@ class Balance(Resource): # pylint: disable=too-many-instance-attributes :vartype billing_frequency: str or ~azure.mgmt.consumption.models.BillingFrequency :ivar price_hidden: Price is hidden or not. :vartype price_hidden: bool + :ivar overage_refund: Overage Refunds. + :vartype overage_refund: float :ivar new_purchases_details: List of new purchases. :vartype new_purchases_details: list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] @@ -193,6 +195,7 @@ class Balance(Resource): # pylint: disable=too-many-instance-attributes "total_usage": {"readonly": True}, "azure_marketplace_service_charges": {"readonly": True}, "price_hidden": {"readonly": True}, + "overage_refund": {"readonly": True}, "new_purchases_details": {"readonly": True}, "adjustment_details": {"readonly": True}, } @@ -216,6 +219,7 @@ class Balance(Resource): # pylint: disable=too-many-instance-attributes "azure_marketplace_service_charges": {"key": "properties.azureMarketplaceServiceCharges", "type": "float"}, "billing_frequency": {"key": "properties.billingFrequency", "type": "str"}, "price_hidden": {"key": "properties.priceHidden", "type": "bool"}, + "overage_refund": {"key": "properties.overageRefund", "type": "float"}, "new_purchases_details": { "key": "properties.newPurchasesDetails", "type": "[BalancePropertiesNewPurchasesDetailsItem]", @@ -226,7 +230,9 @@ class Balance(Resource): # pylint: disable=too-many-instance-attributes }, } - def __init__(self, *, billing_frequency: Optional[Union[str, "_models.BillingFrequency"]] = None, **kwargs): + def __init__( + self, *, billing_frequency: Optional[Union[str, "_models.BillingFrequency"]] = None, **kwargs: Any + ) -> None: """ :keyword billing_frequency: The billing frequency. Known values are: "Month", "Quarter", and "Year". @@ -246,6 +252,7 @@ def __init__(self, *, billing_frequency: Optional[Union[str, "_models.BillingFre self.azure_marketplace_service_charges = None self.billing_frequency = billing_frequency self.price_hidden = None + self.overage_refund = None self.new_purchases_details = None self.adjustment_details = None @@ -271,7 +278,7 @@ class BalancePropertiesAdjustmentDetailsItem(_serialization.Model): "value": {"key": "value", "type": "float"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -299,7 +306,7 @@ class BalancePropertiesNewPurchasesDetailsItem(_serialization.Model): "value": {"key": "value", "type": "float"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -335,7 +342,7 @@ class ProxyResource(_serialization.Model): "e_tag": {"key": "eTag", "type": "str"}, } - def __init__(self, *, e_tag: Optional[str] = None, **kwargs): + def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: """ :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. @@ -420,8 +427,8 @@ def __init__( time_period: Optional["_models.BudgetTimePeriod"] = None, filter: Optional["_models.BudgetFilter"] = None, # pylint: disable=redefined-builtin notifications: Optional[Dict[str, "_models.Notification"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. @@ -464,7 +471,7 @@ class BudgetComparisonExpression(_serialization.Model): :ivar name: The name of the column to use in comparison. Required. :vartype name: str - :ivar operator: The operator to use for comparison. Required. "In" + :ivar operator: The operator to use for comparison. Required. Known values are: "In" and "In". :vartype operator: str or ~azure.mgmt.consumption.models.BudgetOperatorType :ivar values: Array of values to use for comparison. Required. :vartype values: list[str] @@ -482,11 +489,14 @@ class BudgetComparisonExpression(_serialization.Model): "values": {"key": "values", "type": "[str]"}, } - def __init__(self, *, name: str, operator: Union[str, "_models.BudgetOperatorType"], values: List[str], **kwargs): + def __init__( + self, *, name: str, operator: Union[str, "_models.BudgetOperatorType"], values: List[str], **kwargs: Any + ) -> None: """ :keyword name: The name of the column to use in comparison. Required. :paramtype name: str - :keyword operator: The operator to use for comparison. Required. "In" + :keyword operator: The operator to use for comparison. Required. Known values are: "In" and + "In". :paramtype operator: str or ~azure.mgmt.consumption.models.BudgetOperatorType :keyword values: Array of values to use for comparison. Required. :paramtype values: list[str] @@ -520,8 +530,8 @@ def __init__( and_property: Optional[List["_models.BudgetFilterProperties"]] = None, dimensions: Optional["_models.BudgetComparisonExpression"] = None, tags: Optional["_models.BudgetComparisonExpression"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword and_property: The logical "AND" expression. Must have at least 2 items. :paramtype and_property: list[~azure.mgmt.consumption.models.BudgetFilterProperties] @@ -555,8 +565,8 @@ def __init__( *, dimensions: Optional["_models.BudgetComparisonExpression"] = None, tags: Optional["_models.BudgetComparisonExpression"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword dimensions: Has comparison expression for a dimension. :paramtype dimensions: ~azure.mgmt.consumption.models.BudgetComparisonExpression @@ -589,7 +599,7 @@ class BudgetsListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -617,7 +627,9 @@ class BudgetTimePeriod(_serialization.Model): "end_date": {"key": "endDate", "type": "iso-8601"}, } - def __init__(self, *, start_date: datetime.datetime, end_date: Optional[datetime.datetime] = None, **kwargs): + def __init__( + self, *, start_date: datetime.datetime, end_date: Optional[datetime.datetime] = None, **kwargs: Any + ) -> None: """ :keyword start_date: The start date for the budget. Required. :paramtype start_date: ~datetime.datetime @@ -647,13 +659,13 @@ class ChargesListResult(_serialization.Model): "value": {"key": "value", "type": "[ChargeSummary]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None -class ChargeSummary(Resource): +class ChargeSummary(ProxyResource): """A charge summary resource. You probably want to use the sub-classes and not this class directly. Known sub-classes are: @@ -663,16 +675,15 @@ class ChargeSummary(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The full qualified ARM ID of an event. + :ivar id: Resource Id. :vartype id: str - :ivar name: The ID that uniquely identifies an event. + :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :ivar etag: The etag for the resource. - :vartype etag: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] + :ivar e_tag: eTag of the resource. To handle concurrent update scenario, this field will be + used to determine whether the user is updating the latest version or not. + :vartype e_tag: str :ivar kind: Specifies the kind of charge summary. Required. Known values are: "legacy" and "modern". :vartype kind: str or ~azure.mgmt.consumption.models.ChargeSummaryKind @@ -682,8 +693,6 @@ class ChargeSummary(Resource): "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, - "etag": {"readonly": True}, - "tags": {"readonly": True}, "kind": {"required": True}, } @@ -691,16 +700,19 @@ class ChargeSummary(Resource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, + "e_tag": {"key": "eTag", "type": "str"}, "kind": {"key": "kind", "type": "str"}, } _subtype_map = {"kind": {"legacy": "LegacyChargeSummary", "modern": "ModernChargeSummary"}} - def __init__(self, **kwargs): - """ """ - super().__init__(**kwargs) + def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be + used to determine whether the user is updating the latest version or not. + :paramtype e_tag: str + """ + super().__init__(e_tag=e_tag, **kwargs) self.kind: Optional[str] = None @@ -733,7 +745,7 @@ class CreditBalanceSummary(_serialization.Model): }, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.estimated_balance = None @@ -769,6 +781,9 @@ class CreditSummary(ProxyResource): # pylint: disable=too-many-instance-attribu :vartype billing_currency: str :ivar reseller: Credit's reseller. :vartype reseller: ~azure.mgmt.consumption.models.Reseller + :ivar is_estimated_balance: If true, the listed details are based on an estimation and it will + be subjected to change. + :vartype is_estimated_balance: bool :ivar e_tag_properties_e_tag: The eTag for the resource. :vartype e_tag_properties_e_tag: str """ @@ -784,6 +799,7 @@ class CreditSummary(ProxyResource): # pylint: disable=too-many-instance-attribu "credit_currency": {"readonly": True}, "billing_currency": {"readonly": True}, "reseller": {"readonly": True}, + "is_estimated_balance": {"readonly": True}, "e_tag_properties_e_tag": {"readonly": True}, } @@ -799,10 +815,11 @@ class CreditSummary(ProxyResource): # pylint: disable=too-many-instance-attribu "credit_currency": {"key": "properties.creditCurrency", "type": "str"}, "billing_currency": {"key": "properties.billingCurrency", "type": "str"}, "reseller": {"key": "properties.reseller", "type": "Reseller"}, + "is_estimated_balance": {"key": "properties.isEstimatedBalance", "type": "bool"}, "e_tag_properties_e_tag": {"key": "properties.eTag", "type": "str"}, } - def __init__(self, *, e_tag: Optional[str] = None, **kwargs): + def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: """ :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. @@ -816,6 +833,7 @@ def __init__(self, *, e_tag: Optional[str] = None, **kwargs): self.credit_currency = None self.billing_currency = None self.reseller = None + self.is_estimated_balance = None self.e_tag_properties_e_tag = None @@ -840,7 +858,7 @@ class CurrentSpend(_serialization.Model): "unit": {"key": "unit", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.amount = None @@ -868,7 +886,7 @@ class DownloadProperties(_serialization.Model): "valid_till": {"key": "validTill", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.download_url = None @@ -896,7 +914,7 @@ class ErrorDetails(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -904,26 +922,29 @@ def __init__(self, **kwargs): class ErrorResponse(_serialization.Model): - """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. + """Error response indicates that the service is not able to process the incoming request. The + reason is provided in the error message. Some Error responses: * - 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header. + 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the + "x-ms-ratelimit-microsoft.consumption-retry-after" header. * - 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. + 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time + specified in the "Retry-After" header. - :ivar error: The details of the error. - :vartype error: ~azure.mgmt.consumption.models.ErrorDetails + :ivar error: The details of the error. + :vartype error: ~azure.mgmt.consumption.models.ErrorDetails """ _attribute_map = { "error": {"key": "error", "type": "ErrorDetails"}, } - def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.ErrorDetails"] = None, **kwargs: Any) -> None: """ :keyword error: The details of the error. :paramtype error: ~azure.mgmt.consumption.models.ErrorDetails @@ -953,7 +974,7 @@ class Events(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -1033,6 +1054,9 @@ class EventSummary(ProxyResource): # pylint: disable=too-many-instance-attribut :ivar closed_balance_in_billing_currency: The balance in billing currency after the event. :vartype closed_balance_in_billing_currency: ~azure.mgmt.consumption.models.AmountWithExchangeRate + :ivar is_estimated_balance: If true, the listed details are based on an estimation and it will + be subjected to change. + :vartype is_estimated_balance: bool :ivar e_tag_properties_e_tag: The eTag for the resource. :vartype e_tag_properties_e_tag: str """ @@ -1062,6 +1086,7 @@ class EventSummary(ProxyResource): # pylint: disable=too-many-instance-attribut "adjustments_in_billing_currency": {"readonly": True}, "charges_in_billing_currency": {"readonly": True}, "closed_balance_in_billing_currency": {"readonly": True}, + "is_estimated_balance": {"readonly": True}, "e_tag_properties_e_tag": {"readonly": True}, } @@ -1104,12 +1129,17 @@ class EventSummary(ProxyResource): # pylint: disable=too-many-instance-attribut "key": "properties.closedBalanceInBillingCurrency", "type": "AmountWithExchangeRate", }, + "is_estimated_balance": {"key": "properties.isEstimatedBalance", "type": "bool"}, "e_tag_properties_e_tag": {"key": "properties.eTag", "type": "str"}, } def __init__( # pylint: disable=too-many-locals - self, *, e_tag: Optional[str] = None, event_type: Optional[Union[str, "_models.EventType"]] = None, **kwargs - ): + self, + *, + e_tag: Optional[str] = None, + event_type: Optional[Union[str, "_models.EventType"]] = None, + **kwargs: Any + ) -> None: """ :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. @@ -1142,6 +1172,7 @@ def __init__( # pylint: disable=too-many-locals self.adjustments_in_billing_currency = None self.charges_in_billing_currency = None self.closed_balance_in_billing_currency = None + self.is_estimated_balance = None self.e_tag_properties_e_tag = None @@ -1167,7 +1198,7 @@ class ForecastSpend(_serialization.Model): "unit": {"key": "unit", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.amount = None @@ -1195,7 +1226,7 @@ class HighCasedErrorDetails(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -1203,26 +1234,29 @@ def __init__(self, **kwargs): class HighCasedErrorResponse(_serialization.Model): - """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. + """Error response indicates that the service is not able to process the incoming request. The + reason is provided in the error message. Some Error responses: * - 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header. + 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the + "x-ms-ratelimit-microsoft.consumption-retry-after" header. * - 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. + 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time + specified in the "Retry-After" header. - :ivar error: The details of the error. - :vartype error: ~azure.mgmt.consumption.models.HighCasedErrorDetails + :ivar error: The details of the error. + :vartype error: ~azure.mgmt.consumption.models.HighCasedErrorDetails """ _attribute_map = { "error": {"key": "error", "type": "HighCasedErrorDetails"}, } - def __init__(self, *, error: Optional["_models.HighCasedErrorDetails"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.HighCasedErrorDetails"] = None, **kwargs: Any) -> None: """ :keyword error: The details of the error. :paramtype error: ~azure.mgmt.consumption.models.HighCasedErrorDetails @@ -1238,16 +1272,15 @@ class LegacyChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a All required parameters must be populated in order to send to Azure. - :ivar id: The full qualified ARM ID of an event. + :ivar id: Resource Id. :vartype id: str - :ivar name: The ID that uniquely identifies an event. + :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :ivar etag: The etag for the resource. - :vartype etag: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] + :ivar e_tag: eTag of the resource. To handle concurrent update scenario, this field will be + used to determine whether the user is updating the latest version or not. + :vartype e_tag: str :ivar kind: Specifies the kind of charge summary. Required. Known values are: "legacy" and "modern". :vartype kind: str or ~azure.mgmt.consumption.models.ChargeSummaryKind @@ -1271,8 +1304,6 @@ class LegacyChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, - "etag": {"readonly": True}, - "tags": {"readonly": True}, "kind": {"required": True}, "billing_period_id": {"readonly": True}, "usage_start": {"readonly": True}, @@ -1287,8 +1318,7 @@ class LegacyChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, + "e_tag": {"key": "eTag", "type": "str"}, "kind": {"key": "kind", "type": "str"}, "billing_period_id": {"key": "properties.billingPeriodId", "type": "str"}, "usage_start": {"key": "properties.usageStart", "type": "str"}, @@ -1299,9 +1329,13 @@ class LegacyChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a "currency": {"key": "properties.currency", "type": "str"}, } - def __init__(self, **kwargs): - """ """ - super().__init__(**kwargs) + def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be + used to determine whether the user is updating the latest version or not. + :paramtype e_tag: str + """ + super().__init__(e_tag=e_tag, **kwargs) self.kind: str = "legacy" self.billing_period_id = None self.usage_start = None @@ -1333,7 +1367,7 @@ class ResourceAttributes(_serialization.Model): "sku": {"key": "sku", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.location = None @@ -1393,7 +1427,7 @@ class ReservationRecommendation(Resource, ResourceAttributes): _subtype_map = {"kind": {"legacy": "LegacyReservationRecommendation", "modern": "ModernReservationRecommendation"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.location = None @@ -1514,7 +1548,7 @@ class LegacyReservationRecommendation(ReservationRecommendation): # pylint: dis "sku_properties": {"key": "properties.skuProperties", "type": "[SkuProperty]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kind: str = "legacy" @@ -1621,7 +1655,7 @@ class LegacyReservationRecommendationProperties(_serialization.Model): # pylint } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.look_back_period = None @@ -1670,7 +1704,7 @@ class ReservationTransactionResource(_serialization.Model): "tags": {"key": "tags", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1805,7 +1839,7 @@ class ReservationTransaction(ReservationTransactionResource): # pylint: disable "overage": {"key": "properties.overage", "type": "float"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) self.event_date = None @@ -1959,7 +1993,7 @@ class LegacyReservationTransaction(ReservationTransaction): # pylint: disable=t "overage": {"key": "properties.overage", "type": "float"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) @@ -2041,7 +2075,7 @@ class LegacySharedScopeReservationRecommendationProperties( "sku_properties": {"key": "skuProperties", "type": "[SkuProperty]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.scope: str = "Shared" @@ -2128,7 +2162,7 @@ class LegacySingleScopeReservationRecommendationProperties( "subscription_id": {"key": "subscriptionId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.scope: str = "Single" @@ -2180,7 +2214,7 @@ class UsageDetail(Resource): _subtype_map = {"kind": {"legacy": "LegacyUsageDetail", "modern": "ModernUsageDetail"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.kind: Optional[str] = None @@ -2428,7 +2462,7 @@ class LegacyUsageDetail(UsageDetail): # pylint: disable=too-many-instance-attri "pricing_model": {"key": "properties.pricingModel", "type": "str"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) self.kind: str = "legacy" @@ -2501,7 +2535,7 @@ class Lots(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2554,6 +2588,9 @@ class LotSummary(ProxyResource): # pylint: disable=too-many-instance-attributes ~azure.mgmt.consumption.models.AmountWithExchangeRate :ivar reseller: The reseller of the lot. :vartype reseller: ~azure.mgmt.consumption.models.Reseller + :ivar is_estimated_balance: If true, the listed details are based on an estimation and it will + be subjected to change. + :vartype is_estimated_balance: bool :ivar e_tag_properties_e_tag: The eTag for the resource. :vartype e_tag_properties_e_tag: str """ @@ -2575,6 +2612,7 @@ class LotSummary(ProxyResource): # pylint: disable=too-many-instance-attributes "original_amount_in_billing_currency": {"readonly": True}, "closed_balance_in_billing_currency": {"readonly": True}, "reseller": {"readonly": True}, + "is_estimated_balance": {"readonly": True}, "e_tag_properties_e_tag": {"readonly": True}, } @@ -2602,10 +2640,11 @@ class LotSummary(ProxyResource): # pylint: disable=too-many-instance-attributes "type": "AmountWithExchangeRate", }, "reseller": {"key": "properties.reseller", "type": "Reseller"}, + "is_estimated_balance": {"key": "properties.isEstimatedBalance", "type": "bool"}, "e_tag_properties_e_tag": {"key": "properties.eTag", "type": "str"}, } - def __init__(self, *, e_tag: Optional[str] = None, **kwargs): + def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: """ :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. @@ -2625,6 +2664,7 @@ def __init__(self, *, e_tag: Optional[str] = None, **kwargs): self.original_amount_in_billing_currency = None self.closed_balance_in_billing_currency = None self.reseller = None + self.is_estimated_balance = None self.e_tag_properties_e_tag = None @@ -2707,8 +2747,8 @@ def __init__( children: Optional[List["_models.ManagementGroupAggregatedCostResult"]] = None, included_subscriptions: Optional[List[str]] = None, excluded_subscriptions: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword children: Children of a management group. :paramtype children: list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] @@ -2871,7 +2911,7 @@ class Marketplace(Resource): # pylint: disable=too-many-instance-attributes "is_recurring_charge": {"key": "properties.isRecurringCharge", "type": "bool"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) self.billing_period_id = None @@ -2903,7 +2943,8 @@ def __init__(self, **kwargs): # pylint: disable=too-many-locals class MarketplacesListResult(_serialization.Model): - """Result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period. + """Result of listing marketplaces. It contains a list of available marketplaces in reverse + chronological order by billing period. Variables are only populated by the server, and will be ignored when sending a request. @@ -2923,7 +2964,7 @@ class MarketplacesListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -2982,7 +3023,7 @@ class MeterDetails(_serialization.Model): "service_tier": {"key": "serviceTier", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.meter_name = None @@ -3032,7 +3073,7 @@ class MeterDetailsResponse(_serialization.Model): "service_family": {"key": "serviceFamily", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.meter_name = None @@ -3049,16 +3090,15 @@ class ModernChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a All required parameters must be populated in order to send to Azure. - :ivar id: The full qualified ARM ID of an event. + :ivar id: Resource Id. :vartype id: str - :ivar name: The ID that uniquely identifies an event. + :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str - :ivar etag: The etag for the resource. - :vartype etag: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] + :ivar e_tag: eTag of the resource. To handle concurrent update scenario, this field will be + used to determine whether the user is updating the latest version or not. + :vartype e_tag: str :ivar kind: Specifies the kind of charge summary. Required. Known values are: "legacy" and "modern". :vartype kind: str or ~azure.mgmt.consumption.models.ChargeSummaryKind @@ -3084,14 +3124,14 @@ class ModernChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a :vartype customer_id: str :ivar is_invoiced: Is charge Invoiced. :vartype is_invoiced: bool + :ivar subscription_id: Subscription guid. + :vartype subscription_id: str """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, - "etag": {"readonly": True}, - "tags": {"readonly": True}, "kind": {"required": True}, "billing_period_id": {"readonly": True}, "usage_start": {"readonly": True}, @@ -3104,14 +3144,14 @@ class ModernChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a "invoice_section_id": {"readonly": True}, "customer_id": {"readonly": True}, "is_invoiced": {"readonly": True}, + "subscription_id": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, + "e_tag": {"key": "eTag", "type": "str"}, "kind": {"key": "kind", "type": "str"}, "billing_period_id": {"key": "properties.billingPeriodId", "type": "str"}, "usage_start": {"key": "properties.usageStart", "type": "str"}, @@ -3124,11 +3164,16 @@ class ModernChargeSummary(ChargeSummary): # pylint: disable=too-many-instance-a "invoice_section_id": {"key": "properties.invoiceSectionId", "type": "str"}, "customer_id": {"key": "properties.customerId", "type": "str"}, "is_invoiced": {"key": "properties.isInvoiced", "type": "bool"}, + "subscription_id": {"key": "properties.subscriptionId", "type": "str"}, } - def __init__(self, **kwargs): - """ """ - super().__init__(**kwargs) + def __init__(self, *, e_tag: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be + used to determine whether the user is updating the latest version or not. + :paramtype e_tag: str + """ + super().__init__(e_tag=e_tag, **kwargs) self.kind: str = "modern" self.billing_period_id = None self.usage_start = None @@ -3141,6 +3186,7 @@ def __init__(self, **kwargs): self.invoice_section_id = None self.customer_id = None self.is_invoiced = None + self.subscription_id = None class ModernReservationRecommendation(ReservationRecommendation): # pylint: disable=too-many-instance-attributes @@ -3259,7 +3305,7 @@ class ModernReservationRecommendation(ReservationRecommendation): # pylint: dis "sku_name": {"key": "properties.skuName", "type": "str"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) self.kind: str = "modern" @@ -3376,7 +3422,7 @@ class ModernReservationRecommendationProperties(_serialization.Model): # pylint } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.location = None @@ -3511,7 +3557,7 @@ class ModernReservationTransaction(ReservationTransactionResource): # pylint: d "term": {"key": "properties.term", "type": "str"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) self.amount = None @@ -3557,7 +3603,7 @@ class ModernReservationTransactionsListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3649,7 +3695,7 @@ class ModernSharedScopeReservationRecommendationProperties( "sku_name": {"key": "skuName", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.scope: str = "Shared" @@ -3744,7 +3790,7 @@ class ModernSingleScopeReservationRecommendationProperties( "subscription_id": {"key": "subscriptionId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.scope: str = "Single" @@ -4126,7 +4172,7 @@ class ModernUsageDetail(UsageDetail): # pylint: disable=too-many-instance-attri "cost_allocation_rule_name": {"key": "properties.costAllocationRuleName", "type": "str"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) self.kind: str = "modern" @@ -4268,8 +4314,8 @@ def __init__( contact_groups: Optional[List[str]] = None, threshold_type: Union[str, "_models.ThresholdType"] = "Actual", locale: Optional[Union[str, "_models.CultureCode"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled: The notification is enabled or not. Required. :paramtype enabled: bool @@ -4335,7 +4381,7 @@ class Operation(_serialization.Model): "display": {"key": "display", "type": "OperationDisplay"}, } - def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs): + def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: """ :keyword display: The object that represents the operation. :paramtype display: ~azure.mgmt.consumption.models.OperationDisplay @@ -4375,7 +4421,7 @@ class OperationDisplay(_serialization.Model): "description": {"key": "description", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.provider = None @@ -4385,7 +4431,8 @@ def __init__(self, **kwargs): class OperationListResult(_serialization.Model): - """Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results. + """Result of listing consumption operations. It contains a list of operations and a URL link to + get the next set of results. Variables are only populated by the server, and will be ignored when sending a request. @@ -4406,7 +4453,7 @@ class OperationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4463,7 +4510,7 @@ class PriceSheetProperties(_serialization.Model): "offer_id": {"key": "offerId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.billing_period_id = None @@ -4522,7 +4569,7 @@ class PriceSheetResult(Resource): "download": {"key": "properties.download", "type": "MeterDetails"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.pricesheets = None @@ -4551,7 +4598,7 @@ class Reseller(_serialization.Model): "reseller_description": {"key": "resellerDescription", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.reseller_id = None @@ -4645,7 +4692,7 @@ class ReservationDetail(Resource): # pylint: disable=too-many-instance-attribut "kind": {"key": "properties.kind", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.reservation_order_id = None @@ -4682,7 +4729,7 @@ class ReservationDetailsListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -4732,7 +4779,7 @@ class ReservationRecommendationDetailsCalculatedSavingsProperties(_serialization "savings": {"key": "savings", "type": "float"}, } - def __init__(self, *, reserved_unit_count: Optional[float] = None, **kwargs): + def __init__(self, *, reserved_unit_count: Optional[float] = None, **kwargs: Any) -> None: """ :keyword reserved_unit_count: The number of reserved units used to calculate savings. Always 1 for virtual machines. @@ -4813,7 +4860,7 @@ class ReservationRecommendationDetailsModel(Resource): # pylint: disable=too-ma "usage": {"key": "properties.usage", "type": "ReservationRecommendationDetailsUsageProperties"}, } - def __init__(self, *, location: Optional[str] = None, sku: Optional[str] = None, **kwargs): + def __init__(self, *, location: Optional[str] = None, sku: Optional[str] = None, **kwargs: Any) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -4869,7 +4916,7 @@ class ReservationRecommendationDetailsResourceProperties(_serialization.Model): "resource_type": {"key": "resourceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.applied_scopes = None @@ -4927,8 +4974,8 @@ def __init__( calculated_savings: Optional[ List["_models.ReservationRecommendationDetailsCalculatedSavingsProperties"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword calculated_savings: List of calculated savings. :paramtype calculated_savings: @@ -4979,7 +5026,7 @@ class ReservationRecommendationDetailsUsageProperties(_serialization.Model): "usage_grain": {"key": "usageGrain", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.first_consumption_date = None @@ -5014,7 +5061,7 @@ class ReservationRecommendationsListResult(_serialization.Model): "previous_link": {"key": "previousLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5043,7 +5090,7 @@ class ReservationSummariesListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5157,7 +5204,7 @@ class ReservationSummary(Resource): # pylint: disable=too-many-instance-attribu "utilized_percentage": {"key": "properties.utilizedPercentage", "type": "float"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.reservation_order_id = None @@ -5198,7 +5245,7 @@ class ReservationTransactionsListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -5226,7 +5273,7 @@ class SkuProperty(_serialization.Model): "value": {"key": "value", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -5247,7 +5294,7 @@ class Tag(_serialization.Model): "value": {"key": "value", "type": "[str]"}, } - def __init__(self, *, key: Optional[str] = None, value: Optional[List[str]] = None, **kwargs): + def __init__(self, *, key: Optional[str] = None, value: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword key: Tag key. :paramtype key: str @@ -5299,7 +5346,9 @@ class TagsResult(ProxyResource): "previous_link": {"key": "properties.previousLink", "type": "str"}, } - def __init__(self, *, e_tag: Optional[str] = None, tags: Optional[List["_models.Tag"]] = None, **kwargs): + def __init__( + self, *, e_tag: Optional[str] = None, tags: Optional[List["_models.Tag"]] = None, **kwargs: Any + ) -> None: """ :keyword e_tag: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. @@ -5314,7 +5363,8 @@ def __init__(self, *, e_tag: Optional[str] = None, tags: Optional[List["_models. class UsageDetailsListResult(_serialization.Model): - """Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period. + """Result of listing usage details. It contains a list of available usage details in reverse + chronological order by billing period. Variables are only populated by the server, and will be ignored when sending a request. @@ -5334,7 +5384,7 @@ class UsageDetailsListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py index 9c2f27dc3073..094e71d0acee 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_get_by_management_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_get_for_billing_period_by_management_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -126,6 +121,9 @@ def get_by_management_group( """Provides the aggregate cost of a management group and all child management groups by current billing period. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param management_group_id: Azure Management Group ID. Required. :type management_group_id: str :param filter: May be used to filter aggregated cost by properties/usageStart (Utc time), @@ -149,9 +147,7 @@ def get_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ManagementGroupAggregatedCostResult] = kwargs.pop("cls", None) request = build_get_by_management_group_request( @@ -165,8 +161,9 @@ def get_by_management_group( 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 @@ -194,6 +191,9 @@ def get_for_billing_period_by_management_group( """Provides the aggregate cost of a management group and all child management groups by specified billing period. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param management_group_id: Azure Management Group ID. Required. :type management_group_id: str :param billing_period_name: Billing Period Name. Required. @@ -214,9 +214,7 @@ def get_for_billing_period_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ManagementGroupAggregatedCostResult] = kwargs.pop("cls", None) request = build_get_for_billing_period_by_management_group_request( @@ -230,8 +228,9 @@ def get_for_billing_period_by_management_group( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py index 2120804fedc2..f0f7144f822a 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_by_billing_account_request(billing_account_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +67,7 @@ def build_get_for_billing_period_by_billing_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,6 +115,9 @@ def get_by_billing_account(self, billing_account_id: str, **kwargs: Any) -> _mod """Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -138,9 +136,7 @@ def get_by_billing_account(self, billing_account_id: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Balance] = kwargs.pop("cls", None) request = build_get_by_billing_account_request( @@ -153,8 +149,9 @@ def get_by_billing_account(self, billing_account_id: str, **kwargs: Any) -> _mod 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 @@ -182,6 +179,9 @@ def get_for_billing_period_by_billing_account( """Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_period_name: Billing Period Name. Required. @@ -202,9 +202,7 @@ def get_for_billing_period_by_billing_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Balance] = kwargs.pop("cls", None) request = build_get_for_billing_period_by_billing_account_request( @@ -218,8 +216,9 @@ def get_for_billing_period_by_billing_account( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py index f8731081cab6..37a9e731ec24 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,7 +64,7 @@ def build_get_request(scope: str, budget_name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,7 +89,7 @@ def build_create_or_update_request(scope: str, budget_name: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -122,7 +117,7 @@ def build_delete_request(scope: str, budget_name: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -166,6 +161,9 @@ def __init__(self, *args, **kwargs): def list(self, scope: str, **kwargs: Any) -> Iterable["_models.Budget"]: """Lists all budgets for the defined scope. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -178,7 +176,7 @@ def list(self, scope: str, **kwargs: Any) -> Iterable["_models.Budget"]: scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -189,9 +187,7 @@ def list(self, scope: str, **kwargs: Any) -> Iterable["_models.Budget"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BudgetsListResult] = kwargs.pop("cls", None) error_map = { @@ -243,8 +239,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 @@ -263,6 +260,9 @@ def get_next(next_link=None): def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: """Gets the budget for the scope by budget name. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -275,7 +275,7 @@ def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -296,9 +296,7 @@ def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Budget] = kwargs.pop("cls", None) request = build_get_request( @@ -312,8 +310,9 @@ def get(self, scope: str, budget_name: str, **kwargs: Any) -> _models.Budget: 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 @@ -346,6 +345,9 @@ def create_or_update( form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -358,7 +360,7 @@ def create_or_update( scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -382,6 +384,9 @@ def create_or_update( form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -394,7 +399,7 @@ def create_or_update( scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -418,6 +423,9 @@ def create_or_update( form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -430,12 +438,12 @@ def create_or_update( scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. Is either a model type + :param parameters: Parameters supplied to the Create Budget operation. Is either a Budget type or a IO type. Required. :type parameters: ~azure.mgmt.consumption.models.Budget or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -457,9 +465,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Budget] = kwargs.pop("cls", None) @@ -485,8 +491,9 @@ def create_or_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 @@ -515,6 +522,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """The operation to delete a budget. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -527,7 +537,7 @@ def delete( # pylint: disable=inconsistent-return-statements scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. Required. :type scope: str :param budget_name: Budget Name. Required. @@ -548,9 +558,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -564,8 +572,9 @@ def delete( # 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 diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py index e471dfe96028..afc62a64a7ea 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -110,6 +105,9 @@ def list( ) -> _models.ChargesListResult: """Lists the charges based for the defined scope. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with charges operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, and @@ -122,9 +120,9 @@ def list( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. Required. :type scope: str :param start_date: Start date. Default value is None. @@ -157,9 +155,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ChargesListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -176,8 +172,9 @@ def list( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py index 530dbf701b32..176864cc8e08 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_request(billing_account_id: str, billing_profile_id: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,6 +85,9 @@ def __init__(self, *args, **kwargs): def get(self, billing_account_id: str, billing_profile_id: str, **kwargs: Any) -> Optional[_models.CreditSummary]: """The credit summary by billingAccountId and billingProfileId. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_profile_id: Azure Billing Profile ID. Required. @@ -110,9 +108,7 @@ def get(self, billing_account_id: str, billing_profile_id: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.CreditSummary]] = kwargs.pop("cls", None) request = build_get_request( @@ -126,8 +122,9 @@ def get(self, billing_account_id: str, billing_profile_id: 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 diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py index a9f78867dcfb..db2fa0cd3b2f 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_by_billing_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -79,7 +74,7 @@ def build_list_by_billing_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -130,6 +125,9 @@ def list_by_billing_profile( """Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_profile_id: Azure Billing Profile ID. Required. @@ -146,9 +144,7 @@ def list_by_billing_profile( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Events] = kwargs.pop("cls", None) error_map = { @@ -203,8 +199,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 @@ -228,6 +225,9 @@ def list_by_billing_account( """Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param filter: May be used to filter the events by lotId, lotSource etc. The filter supports @@ -243,9 +243,7 @@ def list_by_billing_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Events] = kwargs.pop("cls", None) error_map = { @@ -298,8 +296,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py index cd94ed0583b9..9554edcf6279 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_by_billing_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,7 +72,7 @@ def build_list_by_billing_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,7 +103,7 @@ def build_list_by_customer_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -160,6 +155,9 @@ def list_by_billing_profile( """Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft Customer Agreements (MCA) billing accounts. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param billing_profile_id: Azure Billing Profile ID. Required. @@ -172,9 +170,7 @@ def list_by_billing_profile( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Lots] = kwargs.pop("cls", None) error_map = { @@ -227,8 +223,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 @@ -253,6 +250,9 @@ def list_by_billing_account( supported for Microsoft Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param filter: May be used to filter the lots by Status, Source etc. The filter supports 'eq', @@ -268,9 +268,7 @@ def list_by_billing_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Lots] = kwargs.pop("cls", None) error_map = { @@ -323,8 +321,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 @@ -348,6 +347,9 @@ def list_by_customer( """Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing accounts. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param customer_id: Customer ID. Required. @@ -364,9 +366,7 @@ def list_by_customer( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Lots] = kwargs.pop("cls", None) error_map = { @@ -420,8 +420,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py index 36cc085b75d9..a7fff6c2f67d 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -109,6 +104,9 @@ def list( """Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, @@ -143,9 +141,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MarketplacesListResult] = kwargs.pop("cls", None) error_map = { @@ -200,8 +196,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py index 5dd6eb4d602c..5e72f1e0a12e 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -91,9 +86,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -144,8 +137,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py index 971a66821334..fa19277e3230 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +45,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +85,7 @@ def build_get_by_billing_period_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,6 +141,9 @@ def get( """Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param expand: May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. Default value is None. :type expand: str @@ -173,9 +171,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PriceSheetResult] = kwargs.pop("cls", None) request = build_get_request( @@ -191,8 +187,9 @@ def get( 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 @@ -223,6 +220,9 @@ def get_by_billing_period( """Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_period_name: Billing Period Name. Required. :type billing_period_name: str :param expand: May be used to expand the properties/meterDetails within a price sheet. By @@ -252,9 +252,7 @@ def get_by_billing_period( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PriceSheetResult] = kwargs.pop("cls", None) request = build_get_by_billing_period_request( @@ -271,8 +269,9 @@ def get_by_billing_period( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendation_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendation_details_operations.py index 7e44d960f078..dbe002c71436 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendation_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendation_details_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -111,6 +106,9 @@ def get( ) -> Optional[_models.ReservationRecommendationDetailsModel]: """Details of a reservation recommendation for what-if analysis of reserved instances. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param resource_scope: The scope associated with reservation recommendation details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, @@ -148,9 +146,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReservationRecommendationDetailsModel]] = kwargs.pop("cls", None) request = build_get_request( @@ -168,8 +164,9 @@ def get( 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py index 5f8707a5a5af..ef8f68046afd 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_scope: str, *, filter: Optional[str] = None, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -92,6 +87,9 @@ def list( ) -> Iterable["_models.ReservationRecommendation"]: """List of recommendations for purchasing reserved instances. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param resource_scope: The scope associated with reservation recommendations operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, @@ -116,9 +114,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationRecommendationsListResult] = kwargs.pop("cls", None) error_map = { @@ -171,8 +167,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py index ec4582467374..e741a88a99d0 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -41,11 +36,18 @@ _SERIALIZER.client_side_validation = False -def build_list_request(billing_account_id: str, *, filter: Optional[str] = None, **kwargs: Any) -> HttpRequest: +def build_list_request( + billing_account_id: str, + *, + filter: Optional[str] = None, + use_markup_if_partner: Optional[bool] = None, + preview_markup_percentage: Optional[float] = None, + **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -63,6 +65,12 @@ def build_list_request(billing_account_id: str, *, filter: Optional[str] = None, if filter is not None: _params["$filter"] = _SERIALIZER.query("filter", filter, "str") _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if use_markup_if_partner is not None: + _params["useMarkupIfPartner"] = _SERIALIZER.query("use_markup_if_partner", use_markup_if_partner, "bool") + if preview_markup_percentage is not None: + _params["previewMarkupPercentage"] = _SERIALIZER.query( + "preview_markup_percentage", preview_markup_percentage, "float" + ) # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -76,7 +84,7 @@ def build_list_by_billing_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -123,13 +131,23 @@ def __init__(self, *args, **kwargs): @distributed_trace def list( - self, billing_account_id: str, filter: Optional[str] = None, **kwargs: Any + self, + billing_account_id: str, + filter: Optional[str] = None, + use_markup_if_partner: Optional[bool] = None, + preview_markup_percentage: Optional[float] = None, + **kwargs: Any ) -> Iterable["_models.ReservationTransaction"]: """List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was - made. + made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the + response size exceeds the ARM limit. In such cases, API call should be made with smaller date + ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str @@ -140,6 +158,12 @@ def list( the entire December 2020 month (i.e. will contain records for dates December 30 and 31). Default value is None. :type filter: str + :param use_markup_if_partner: Applies mark up to the transactions if the caller is a partner. + Default value is None. + :type use_markup_if_partner: bool + :param preview_markup_percentage: Preview markup percentage to be applied. Default value is + None. + :type preview_markup_percentage: float :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ReservationTransaction or the result of cls(response) @@ -149,9 +173,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationTransactionsListResult] = kwargs.pop("cls", None) error_map = { @@ -168,6 +190,8 @@ def prepare_request(next_link=None): request = build_list_request( billing_account_id=billing_account_id, filter=filter, + use_markup_if_partner=use_markup_if_partner, + preview_markup_percentage=preview_markup_percentage, api_version=api_version, template_url=self.list.metadata["url"], headers=_headers, @@ -204,8 +228,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 @@ -229,7 +254,12 @@ def list_by_billing_profile( """List of transactions for reserved instances on billing profile scope. The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as - May 2021 but the billing month as April 2020 when the reservation purchase was made. + May 2021 but the billing month as April 2020 when the reservation purchase was made. Note: ARM + has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds + the ARM limit. In such cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str @@ -252,9 +282,7 @@ def list_by_billing_profile( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ModernReservationTransactionsListResult] = kwargs.pop("cls", None) error_map = { @@ -308,8 +336,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py index f4fb83276110..b105e568a4f5 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_reservation_order_request(reservation_order_id: str, *, filter _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_reservation_order_and_reservation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -113,7 +108,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -167,8 +162,14 @@ def list_by_reservation_order( self, reservation_order_id: str, filter: str, **kwargs: Any ) -> Iterable["_models.ReservationDetail"]: """Lists the reservations details for provided date range. Note: ARM has a payload size limit of - 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, - API call should be made with smaller date ranges. + 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data + size is too large, customers may also get 504 as the API timed out preparing the data. In such + cases, API call should be made with smaller date ranges or a call to Generate Reservation + Details Report API should be made as it is asynchronous and will not run into response size + time outs. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -183,9 +184,7 @@ def list_by_reservation_order( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -238,8 +237,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 @@ -261,8 +261,14 @@ def list_by_reservation_order_and_reservation( self, reservation_order_id: str, reservation_id: str, filter: str, **kwargs: Any ) -> Iterable["_models.ReservationDetail"]: """Lists the reservations details for provided date range. Note: ARM has a payload size limit of - 12MB, so currently callers get 502 when the response size exceeds the ARM limit. In such cases, - API call should be made with smaller date ranges. + 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data + size is too large, customers may also get 504 as the API timed out preparing the data. In such + cases, API call should be made with smaller date ranges or a call to Generate Reservation + Details Report API should be made as it is asynchronous and will not run into response size + time outs. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -279,9 +285,7 @@ def list_by_reservation_order_and_reservation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -335,8 +339,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 @@ -364,9 +369,15 @@ def list( reservation_order_id: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.ReservationDetail"]: - """Lists the reservations details for the defined scope and provided date range. Note: ARM has a - payload size limit of 12MB, so currently callers get 502 when the response size exceeds the ARM - limit. In such cases, API call should be made with smaller date ranges. + """Lists the reservations details for provided date range. Note: ARM has a payload size limit of + 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data + size is too large, customers may also get 504 as the API timed out preparing the data. In such + cases, API call should be made with smaller date ranges or a call to Generate Reservation + Details Report API should be made as it is asynchronous and will not run into response size + time outs. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param resource_scope: The scope associated with reservations details operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope @@ -398,9 +409,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -457,8 +466,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py index d76164bcc81e..d4f3b4fb0138 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_by_reservation_order_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -84,7 +79,7 @@ def build_list_by_reservation_order_and_reservation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -125,7 +120,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -183,7 +178,12 @@ def list_by_reservation_order( filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.ReservationSummary"]: - """Lists the reservations summaries for daily or monthly grain. + """Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit + of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -200,9 +200,7 @@ def list_by_reservation_order( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationSummariesListResult] = kwargs.pop("cls", None) error_map = { @@ -256,8 +254,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 @@ -283,7 +282,12 @@ def list_by_reservation_order_and_reservation( filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.ReservationSummary"]: - """Lists the reservations summaries for daily or monthly grain. + """Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit + of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param reservation_order_id: Order Id of the reservation. Required. :type reservation_order_id: str @@ -302,9 +306,7 @@ def list_by_reservation_order_and_reservation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationSummariesListResult] = kwargs.pop("cls", None) error_map = { @@ -359,8 +361,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 @@ -389,7 +392,12 @@ def list( reservation_order_id: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.ReservationSummary"]: - """Lists the reservations summaries for the defined scope daily or monthly grain. + """Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a + payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM + limit. In such cases, API call should be made with smaller date ranges. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ :param resource_scope: The scope associated with reservations summaries operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount @@ -423,9 +431,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationSummariesListResult] = kwargs.pop("cls", None) error_map = { @@ -483,8 +489,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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py index cef15e36ba0c..72351b740588 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,6 +81,9 @@ def __init__(self, *args, **kwargs): def get(self, scope: str, **kwargs: Any) -> Optional[_models.TagsResult]: """Get all available tag keys for the defined scope. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, @@ -113,9 +111,7 @@ def get(self, scope: str, **kwargs: Any) -> Optional[_models.TagsResult]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.TagsResult]] = kwargs.pop("cls", None) request = build_get_request( @@ -128,8 +124,9 @@ def get(self, scope: str, **kwargs: Any) -> Optional[_models.TagsResult]: 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/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py index 687fc9e04261..e488fda608f9 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +49,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -117,6 +112,17 @@ def list( """Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. + !Note : + + Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do + not recommend that you take a new dependency on this API. Please use the Cost Details API + instead. We will notify customers once a date for retirement has been determined.For Cost + Details API see, + https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP. + + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param scope: The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, @@ -132,9 +138,9 @@ def list( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. Required. :type scope: str :param expand: May be used to expand the properties/additionalInfo or properties/meterDetails @@ -168,9 +174,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsageDetailsListResult] = kwargs.pop("cls", None) error_map = { @@ -227,8 +231,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/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group.py index 3620ba064233..ab3c16106c45 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostByManagementGroup.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/AggregatedCostByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group_filter_by_date.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group_filter_by_date.py index 35594a0f8f15..d16237f4b6c3 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group_filter_by_date.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_by_management_group_filter_by_date.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostByManagementGroupFilterByDate.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/AggregatedCostByManagementGroupFilterByDate.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_for_billing_period_by_management_group.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_for_billing_period_by_management_group.py index 03f35dd50ae3..ea48947b423a 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_for_billing_period_by_management_group.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/aggregated_cost_for_billing_period_by_management_group.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostForBillingPeriodByManagementGroup.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/AggregatedCostForBillingPeriodByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account.py index cb29ed39ea58..0d6c569c5a84 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BalancesByBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/BalancesByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account_for_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account_for_billing_period.py index 149d33469f55..ad7e0efb9968 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account_for_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/balances_by_billing_account_for_billing_period.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BalancesByBillingAccountForBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/BalancesByBillingAccountForBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/budget.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/budget.py index 3d72c42e5a07..6b8ed5cb0755 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/budget.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/budget.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Budget.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/Budget.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/budgets_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/budgets_list.py index a07166094b71..8d0a1d9ebdfa 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/budgets_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/budgets_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BudgetsList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/BudgetsList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_department.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_department.py index 2ce887e2d9f9..597afed6b8ef 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_department.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_department.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesForBillingPeriodByDepartment.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesForBillingPeriodByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_enrollment_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_enrollment_account.py index c91466879da1..e3e5b398d0f2 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_enrollment_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_for_billing_period_by_enrollment_account.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesForBillingPeriodByEnrollmentAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesForBillingPeriodByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account.py index c48bb008f4ac..cd392f153f53 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_billing_profile_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_billing_profile_id.py index efd41b7b098a..066efe7531de 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_billing_profile_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_billing_profile_id.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByBillingProfileId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernBillingAccountGroupByBillingProfileId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_customer_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_customer_id.py index 04b0cbddbc9f..21435635eac0 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_customer_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_customer_id.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByCustomerId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernBillingAccountGroupByCustomerId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_invoice_section_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_invoice_section_id.py index 7035f89b7016..d68cc05c0282 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_invoice_section_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_account_group_by_invoice_section_id.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByInvoiceSectionId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernBillingAccountGroupByInvoiceSectionId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile.py index 067b57bb7844..84bd97384f8a 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfile.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_group_by_invoice_section_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_group_by_invoice_section_id.py index 1ae82b37718a..ee06cfa91a2c 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_group_by_invoice_section_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_group_by_invoice_section_id.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfileGroupByInvoiceSectionId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernBillingProfileGroupByInvoiceSectionId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_invoice_section.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_invoice_section.py index 613175dbc5a0..fa0f7525a000 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_invoice_section.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_billing_profile_invoice_section.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfileInvoiceSection.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernBillingProfileInvoiceSection.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_customer.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_customer.py index 43c9070e4881..32fbd3dabf42 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_customer.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_customer.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernCustomer.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernCustomer.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_invoice_section_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_invoice_section_id.py index 2a373da5182b..52dc8bec4da1 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_invoice_section_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_by_modern_invoice_section_id.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernInvoiceSectionId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListByModernInvoiceSectionId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_department_filter_by_start_end_date.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_department_filter_by_start_end_date.py index 5f000f461b71..0193946a4ae0 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_department_filter_by_start_end_date.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_department_filter_by_start_end_date.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListForDepartmentFilterByStartEndDate.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListForDepartmentFilterByStartEndDate.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_enrollment_account_filter_by_start_end_date.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_enrollment_account_filter_by_start_end_date.py index 36be9fec7917..e0e0da215cc3 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_enrollment_account_filter_by_start_end_date.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/charges_list_for_enrollment_account_filter_by_start_end_date.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListForEnrollmentAccountFilterByStartEndDate.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ChargesListForEnrollmentAccountFilterByStartEndDate.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/create_or_update_budget.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/create_or_update_budget.py index 979f6ed0c2b4..81ac684849e1 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/create_or_update_budget.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/create_or_update_budget.py @@ -75,6 +75,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreateOrUpdateBudget.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/CreateOrUpdateBudget.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/credit_summary_by_billing_profile.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/credit_summary_by_billing_profile.py index e28aa54c136a..d48d3dbc2212 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/credit_summary_by_billing_profile.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/credit_summary_by_billing_profile.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreditSummaryByBillingProfile.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/CreditSummaryByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/delete_budget.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/delete_budget.py index b8f8189f1e45..39c6588cea53 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/delete_budget.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/delete_budget.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/DeleteBudget.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/DeleteBudget.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account.py index 654c39418ad4..e2203bd628fc 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsGetByBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/EventsGetByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account_with_filters.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account_with_filters.py index 727edac86858..18708a638a8c 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account_with_filters.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/events_get_by_billing_account_with_filters.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsGetByBillingAccountWithFilters.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/EventsGetByBillingAccountWithFilters.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/events_list_by_billing_profile.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/events_list_by_billing_profile.py index f84a0cec1ec3..98bb009388ba 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/events_list_by_billing_profile.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/events_list_by_billing_profile.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsListByBillingProfile.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/EventsListByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account.py index e63cf0b91405..26adeab20c8d 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/LotsListByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account_with_filters.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account_with_filters.py index 76381e1425e0..725d01338d3b 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account_with_filters.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_account_with_filters.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingAccountWithFilters.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/LotsListByBillingAccountWithFilters.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_profile.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_profile.py index fe3344c1b346..3f8ab81b6c72 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_profile.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_billing_profile.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingProfile.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/LotsListByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer.py index f5bb3322ebe5..95a5ce3b6801 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomer.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/LotsListByCustomer.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer_with_filters.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer_with_filters.py index 74e95d98f92c..2cdcc8e64246 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer_with_filters.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/lots_list_by_customer_with_filters.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomerWithFilters.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/LotsListByCustomerWithFilters.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list.py index 85fe45b1a08c..0d4fae9b7cdf 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByBillingAccountList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByBillingAccountList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list_for_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list_for_billing_period.py index ff44044a915e..34cb1e2bbcbe 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list_for_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_billing_account_list_for_billing_period.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByBillingAccountListForBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByBillingAccountListForBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list.py index 022527d5f93e..5c181b3fcdbe 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByDepartmentList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByDepartmentList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list_by_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list_by_billing_period.py index 21aacd1cec54..19dd7f54c1ae 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list_by_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_department_list_by_billing_period.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByDepartment_ListByBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByDepartment_ListByBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_account_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_account_list.py index 6ca5344dc699..ac5811fd0d36 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_account_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_account_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByEnrollmentAccountList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByEnrollmentAccountList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_accounts_list_by_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_accounts_list_by_billing_period.py index a8db1c7722ab..7b4b477b2251 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_accounts_list_by_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_enrollment_accounts_list_by_billing_period.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list.py index 4ee9b750a604..48a1c36c29bb 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByManagementGroupList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByManagementGroupList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list_for_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list_for_billing_period.py index 1418bb34ebde..1c054cba2965 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list_for_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_by_management_group_list_for_billing_period.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByManagementGroup_ListForBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesByManagementGroup_ListForBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list.py index 8db7d43c202b..01f3241b9b12 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list_for_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list_for_billing_period.py index cd0a50fb3de2..3eaa1366cc00 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list_for_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/marketplaces_list_for_billing_period.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesListForBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/MarketplacesListForBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/operation_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/operation_list.py index 0aa0424ba67f..9d8d3bdff458 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/operation_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/operation_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/OperationList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/OperationList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet.py index 50f503ce57fa..4d8525f48042 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet.py @@ -33,6 +33,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheet.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/PriceSheet.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_expand.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_expand.py index bb0b296619c5..a57c0fb0bdaa 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_expand.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_expand.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetExpand.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/PriceSheetExpand.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_for_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_for_billing_period.py index f0fc2a5d6a78..4f46dc4175c8 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_for_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/price_sheet_for_billing_period.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetForBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/PriceSheetForBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details.py index 305bb208f4f7..253ef2d889bb 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetails.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationDetails.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_account_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_account_id.py index ad1a1e3d3a2e..6c3f53b4f5cd 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_account_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_account_id.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingAccountId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationDetailsByBillingAccountId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id.py index 868b9badee5a..cdd47e09373c 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingProfileId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationDetailsByBillingProfileId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id_reservation_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id_reservation_id.py index 5e2576af19e9..3855300d41d4 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id_reservation_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_by_billing_profile_id_reservation_id.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingProfileIdReservationId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationDetailsByBillingProfileIdReservationId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_with_reservation_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_with_reservation_id.py index 648185c1e6d3..a243bd20a628 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_with_reservation_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_details_with_reservation_id.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsWithReservationId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationDetailsWithReservationId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_account.py index b568ac4ebc9a..7876a2eef477 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_account.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationDetailsByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_profile.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_profile.py index baadc975b913..b337bee86518 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_profile.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_billing_profile.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByBillingProfile.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationDetailsByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_resource_group.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_resource_group.py index 24db1707a9eb..273a291d71c2 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_resource_group.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_resource_group.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByResourceGroup.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationDetailsByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_subscription.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_subscription.py index 00fd41c3e879..5c6dadb5823c 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_subscription.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendation_details_by_subscription.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsBySubscription.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationDetailsBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_account.py index b6e75bdc45ba..bbf07c7307a1 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationsByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_profile.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_profile.py index 34c18444bb67..6475ddbfb6c7 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_profile.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_billing_profile.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByBillingProfile.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationsByBillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_resource_group.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_resource_group.py index 38c93cb12b72..f03beb080f66 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_resource_group.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_resource_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByResourceGroup.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationsByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_subscription.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_subscription.py index 6f3953bfafe0..265eec367e9e 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_subscription.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_by_subscription.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsBySubscription.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationsBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_filter_by_subscription_for_scope_look_back_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_filter_by_subscription_for_scope_look_back_period.py index b1eb8f1d440f..5c8f7ae11184 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_filter_by_subscription_for_scope_look_back_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_recommendations_filter_by_subscription_for_scope_look_back_period.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily.py index 483c4cc28fdc..b11fd05f55a5 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDaily.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesDaily.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_account_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_account_id.py index c8cb54c7f501..3373f03952cd 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_account_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_account_id.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithBillingAccountId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesDailyWithBillingAccountId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_profile_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_profile_id.py index 026c74b73209..d0f36fb2bd21 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_profile_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_billing_profile_id.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithBillingProfileId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesDailyWithBillingProfileId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_reservation_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_reservation_id.py index fef5c801ffd3..48008b3a627c 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_reservation_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_daily_with_reservation_id.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithReservationId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesDailyWithReservationId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly.py index d422a0e92546..494bc13e3afc 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthly.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesMonthly.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_account_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_account_id.py index 5364f59a6cdc..fae896f3e706 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_account_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_account_id.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingAccountId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesMonthlyWithBillingAccountId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id.py index 26e7ace88c0e..a08df9e3da65 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingProfileId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesMonthlyWithBillingProfileId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id_reservation_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id_reservation_id.py index ecce4ed58421..4d4b4921739f 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id_reservation_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_billing_profile_id_reservation_id.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_reservation_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_reservation_id.py index 5d568bf216d2..b502622694d8 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_reservation_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_summaries_monthly_with_reservation_id.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithReservationId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationSummariesMonthlyWithReservationId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_billing_profile_id.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_billing_profile_id.py index 47ad9d5fefe6..24abb29fc2bb 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_billing_profile_id.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_billing_profile_id.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationTransactionsListByBillingProfileId.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationTransactionsListByBillingProfileId.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_enrollment_number.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_enrollment_number.py index e981da502b4c..497ebfdde5df 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_enrollment_number.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/reservation_transactions_list_by_enrollment_number.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationTransactionsListByEnrollmentNumber.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/ReservationTransactionsListByEnrollmentNumber.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/tags.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/tags.py index d1687eeaea60..74abf38088fd 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/tags.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/tags.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Tags.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/Tags.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_expand.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_expand.py index 1bd9e81a704a..6099e6c83840 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_expand.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_expand.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsExpand.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsExpand.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list.py index 629b97dd45a8..5e78335654d8 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsList.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsList.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_billing_account.py index b7670a59ed04..4d3813057d23 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_billing_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_department.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_department.py index 1ae750575929..be6ccca3dc92 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_department.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_department.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByDepartment.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_enrollment_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_enrollment_account.py index b30348d97760..0145bc77951b 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_enrollment_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_enrollment_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByEnrollmentAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_management_group.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_management_group.py index bea5ad73b412..2ec86db93cca 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_management_group.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_management_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByManagementGroup.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByManagementGroup.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_account.py index fa5ce256e80a..1055ab66707d 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCABillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByMCABillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_profile.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_profile.py index 26898092a093..6e74c560b8c4 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_profile.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_billing_profile.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCABillingProfile.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByMCABillingProfile.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_customer.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_customer.py index 9dc99a6b98a5..69508f0b66d4 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_customer.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_customer.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCACustomer.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByMCACustomer.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_invoice_section.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_invoice_section.py index 31956a23ef8d..82841dec4d13 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_invoice_section.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_mca_invoice_section.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCAInvoiceSection.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByMCAInvoiceSection.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_actual_cost.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_actual_cost.py index 74a175954cb5..5bff15023f6d 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_actual_cost.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_actual_cost.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricActualCost.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByMetricActualCost.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_amortized_cost.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_amortized_cost.py index 8f8e9287f20e..dda1d90f0237 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_amortized_cost.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_amortized_cost.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricAmortizedCost.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByMetricAmortizedCost.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_usage.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_usage.py index 5fd433c0db0e..44a857849b08 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_usage.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_by_metric_usage.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricUsage.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListByMetricUsage.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_filter_by_tag.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_filter_by_tag.py index 0f46035be369..a9d7446b5940 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_filter_by_tag.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_filter_by_tag.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListFilterByTag.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListFilterByTag.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period.py index 2bc29d159630..cedf44c0ebab 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriod.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListForBillingPeriod.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_billing_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_billing_account.py index 2f72f2a0cfb0..7472ed607e53 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_billing_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_billing_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByBillingAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListForBillingPeriodByBillingAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_department.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_department.py index 462999a9dc8a..67aa8aef285a 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_department.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_department.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByDepartment.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListForBillingPeriodByDepartment.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_enrollment_account.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_enrollment_account.py index ffec807c47c5..20307ee6cd17 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_enrollment_account.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_enrollment_account.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json if __name__ == "__main__": main() diff --git a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_management_group.py b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_management_group.py index dce956c8dbd4..1b625433f8d6 100644 --- a/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_management_group.py +++ b/sdk/consumption/azure-mgmt-consumption/generated_samples/usage_details_list_for_billing_period_by_management_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByManagementGroup.json +# x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-03-01/examples/UsageDetailsListForBillingPeriodByManagementGroup.json if __name__ == "__main__": main()