diff --git a/sdk/consumption/azure-mgmt-consumption/_meta.json b/sdk/consumption/azure-mgmt-consumption/_meta.json index 2bff1506a305..ae83924461bb 100644 --- a/sdk/consumption/azure-mgmt-consumption/_meta.json +++ b/sdk/consumption/azure-mgmt-consumption/_meta.json @@ -1,11 +1,11 @@ { - "commit": "1be09531e4c6edeafde41d6562371566d39669e8", + "commit": "561d91890df28be97f60532206d24b9e1b871818", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.0", "@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.0 --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/_consumption_management_client.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py index e4acefe4f418..dc531ea68cea 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 @@ -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..f17c068e833e 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 @@ -626,8 +653,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore - unflattened = {k: new_attr} - new_attr = unflattened + new_attr = {k: new_attr} _new_attr = new_attr _serialized = serialized @@ -656,8 +682,8 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type, None) + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: @@ -777,6 +803,8 @@ def serialize_data(self, data, data_type, **kwargs): raise ValueError("No value for given attribute") try: + if data is AzureCoreNull: + return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) @@ -1161,7 +1189,8 @@ def rest_key_extractor(attr, attr_desc, data): working_data = data while "." in key: - dict_keys = _FLATTEN.split(key) + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1332,7 +1361,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1352,7 +1381,7 @@ def __init__(self, classes=None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1471,7 +1500,7 @@ def _classify_target(self, target, data): Once classification has been determined, initialize object. :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. """ if target is None: return None, None @@ -1486,7 +1515,7 @@ def _classify_target(self, target, data): target = target._classify(data, self.dependencies) except AttributeError: pass # Target is not a Model, no classify - return target, target.__class__.__name__ + return target, target.__class__.__name__ # type: ignore def failsafe_deserialize(self, target_obj, data, content_type=None): """Ignores any errors encountered in deserialization, @@ -1496,7 +1525,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): a deserialization error. :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. """ try: diff --git a/sdk/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/_consumption_management_client.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_consumption_management_client.py index bbfde391df8d..59f56d91ece8 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 @@ -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..29cf3e2fa251 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 @@ -65,6 +65,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), @@ -133,6 +136,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. 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..f7f1e11cd576 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 @@ -63,6 +63,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 @@ -125,6 +128,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. 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..9158fd2ea53f 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 @@ -67,6 +67,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 +82,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 @@ -164,6 +167,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 +182,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. @@ -247,6 +253,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 +268,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 +292,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 +307,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 +331,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 +346,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'. @@ -416,6 +431,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 +446,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. 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..a944e78ef41e 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 @@ -67,6 +67,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 +82,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. 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..78c95cafde59 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 @@ -61,6 +61,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. 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..30e3d9204a4e 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 @@ -67,6 +67,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. @@ -165,6 +168,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 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..651873992226 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 @@ -68,6 +68,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. @@ -161,6 +164,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', @@ -256,6 +262,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. 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..6747ab83bce2 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 @@ -69,6 +69,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, 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..ad4d0f5782f9 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 @@ -62,6 +62,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 @@ -139,6 +142,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 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..4c0ba9abaf7d 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 @@ -68,6 +68,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, 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..f93708ac414b 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 @@ -63,6 +63,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, 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..eb586aed3033 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 @@ -67,6 +67,9 @@ def list( event date as May 2021 but the billing month as April 2020 when the reservation purchase was made. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param filter: Filter reservation transactions by date range. The properties/EventDate for @@ -168,6 +171,9 @@ def list_by_billing_profile( 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. + .. 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. 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..e13fe2485874 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 @@ -66,9 +66,12 @@ 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, + 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 :param filter: Filter reservation details by date range. The properties/UsageDate for start @@ -161,9 +164,12 @@ 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, + 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 :param reservation_id: Id of the reservation. Required. @@ -266,9 +272,12 @@ def list( **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 + 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 details operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and 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..385d29b56e12 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 @@ -71,6 +71,9 @@ def list_by_reservation_order( ) -> AsyncIterable["_models.ReservationSummary"]: """Lists the reservations summaries for daily or monthly grain. + .. 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 :param grain: Can be daily or monthly. Known values are: "daily" and "monthly". Required. @@ -172,6 +175,9 @@ def list_by_reservation_order_and_reservation( ) -> AsyncIterable["_models.ReservationSummary"]: """Lists the reservations summaries for daily or monthly grain. + .. 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 :param reservation_id: Id of the reservation. Required. @@ -279,6 +285,9 @@ def list( ) -> AsyncIterable["_models.ReservationSummary"]: """Lists the reservations summaries for the defined scope daily or monthly grain. + .. 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 scope (legacy), and 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..d71b8102c6ac 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 @@ -59,6 +59,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, 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..1ea7454e3c0d 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 @@ -71,6 +71,9 @@ def list( """Lists the usage details for the defined scope. Usage details 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 usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, @@ -86,9 +89,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 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..7f52de750a85 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 @@ -66,10 +66,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 +88,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 +107,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 +166,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..51eae828403f 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 @@ -226,7 +226,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". @@ -271,7 +273,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 +301,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 +337,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 +422,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. @@ -482,7 +484,9 @@ 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 @@ -520,8 +524,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 +559,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 +593,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 +621,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 +653,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 +669,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 +687,6 @@ class ChargeSummary(Resource): "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, - "etag": {"readonly": True}, - "tags": {"readonly": True}, "kind": {"required": True}, } @@ -691,16 +694,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 +739,7 @@ class CreditBalanceSummary(_serialization.Model): }, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.estimated_balance = None @@ -802,7 +808,7 @@ class CreditSummary(ProxyResource): # pylint: disable=too-many-instance-attribu "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. @@ -840,7 +846,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 +874,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 +902,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 +910,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 +962,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 @@ -1108,8 +1117,12 @@ class EventSummary(ProxyResource): # pylint: disable=too-many-instance-attribut } 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. @@ -1167,7 +1180,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 +1208,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 +1216,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 +1254,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 +1286,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 +1300,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 +1311,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 +1349,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 +1409,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 +1530,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 +1637,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 +1686,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 +1821,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 +1975,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 +2057,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 +2144,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 +2196,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 +2444,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 +2517,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 @@ -2605,7 +2621,7 @@ class LotSummary(ProxyResource): # pylint: disable=too-many-instance-attributes "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. @@ -2707,8 +2723,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 +2887,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 +2919,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 +2940,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 +2999,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 +3049,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 +3066,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 +3100,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 +3120,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 +3140,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 +3162,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 +3281,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 +3398,7 @@ class ModernReservationRecommendationProperties(_serialization.Model): # pylint } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.location = None @@ -3511,7 +3533,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 +3579,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 +3671,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 +3766,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 +4148,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 +4290,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 +4357,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 +4397,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 +4407,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 +4429,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 +4486,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 +4545,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 +4574,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 +4668,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 +4705,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 +4755,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 +4836,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 +4892,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 +4950,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 +5002,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 +5037,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 +5066,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 +5180,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 +5221,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 +5249,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 +5270,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 +5322,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 +5339,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 +5360,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..50442d065226 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 @@ -126,6 +126,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), @@ -194,6 +197,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. 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..399858b84ddf 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 @@ -120,6 +120,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 @@ -182,6 +185,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. 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..821d4cf6ef78 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 @@ -166,6 +166,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 +181,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 @@ -263,6 +266,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 +281,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. @@ -346,6 +352,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 +367,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 +391,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 +406,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 +430,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 +445,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'. @@ -515,6 +530,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 +545,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. 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..1607db4d3b03 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 @@ -110,6 +110,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 +125,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. 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..bfca6d1c0d68 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 @@ -90,6 +90,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. 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..9dca024f0734 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 @@ -130,6 +130,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. @@ -228,6 +231,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 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..3529ac7604cb 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 @@ -160,6 +160,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. @@ -253,6 +256,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', @@ -348,6 +354,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. 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..61e5e8203050 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 @@ -109,6 +109,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, 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..22d3ddb1197e 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 @@ -146,6 +146,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 @@ -223,6 +226,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 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..2806d15a8ea9 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 @@ -111,6 +111,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, 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..12a4bdb81190 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 @@ -92,6 +92,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, 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..a569a40ad040 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 @@ -131,6 +131,9 @@ def list( event date as May 2021 but the billing month as April 2020 when the reservation purchase was made. + .. seealso:: + - https://docs.microsoft.com/en-us/rest/api/consumption/ + :param billing_account_id: BillingAccount ID. Required. :type billing_account_id: str :param filter: Filter reservation transactions by date range. The properties/EventDate for @@ -231,6 +234,9 @@ def list_by_billing_profile( 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. + .. 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. 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..3266f3c9b936 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 @@ -167,9 +167,12 @@ 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, + 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 :param filter: Filter reservation details by date range. The properties/UsageDate for start @@ -261,9 +264,12 @@ 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, + 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 :param reservation_id: Id of the reservation. Required. @@ -365,9 +371,12 @@ def list( **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 + 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 details operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and 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..59cc98d4b5c9 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 @@ -185,6 +185,9 @@ def list_by_reservation_order( ) -> Iterable["_models.ReservationSummary"]: """Lists the reservations summaries for daily or monthly grain. + .. 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 :param grain: Can be daily or monthly. Known values are: "daily" and "monthly". Required. @@ -285,6 +288,9 @@ def list_by_reservation_order_and_reservation( ) -> Iterable["_models.ReservationSummary"]: """Lists the reservations summaries for daily or monthly grain. + .. 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 :param reservation_id: Id of the reservation. Required. @@ -391,6 +397,9 @@ def list( ) -> Iterable["_models.ReservationSummary"]: """Lists the reservations summaries for the defined scope daily or monthly grain. + .. 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 scope (legacy), and 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..268411fb7a73 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 @@ -86,6 +86,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, 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..81c0717ae982 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 @@ -117,6 +117,9 @@ def list( """Lists the usage details for the defined scope. Usage details 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 usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, @@ -132,9 +135,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