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 bd8acadb67e73..a1c1123401837 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 @@ -100,7 +100,6 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.usage_details = UsageDetailsOperations( diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_metadata.json b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_metadata.json new file mode 100644 index 0000000000000..bc5fe34a48b3d --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_metadata.json @@ -0,0 +1,78 @@ +{ + "chosen_version": "2019-10-01", + "total_api_version_list": ["2019-10-01"], + "client": { + "name": "ConsumptionManagementClient", + "filename": "_consumption_management_client", + "description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": true + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Azure Subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Azure Subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id" + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null + }, + "operation_groups": { + "usage_details": "UsageDetailsOperations", + "marketplaces": "MarketplacesOperations", + "budgets": "BudgetsOperations", + "tags": "TagsOperations", + "charges": "ChargesOperations", + "balances": "BalancesOperations", + "reservations_summaries": "ReservationsSummariesOperations", + "reservations_details": "ReservationsDetailsOperations", + "reservation_recommendations": "ReservationRecommendationsOperations", + "reservation_recommendation_details": "ReservationRecommendationDetailsOperations", + "reservation_transactions": "ReservationTransactionsOperations", + "price_sheet": "PriceSheetOperations", + "forecasts": "ForecastsOperations", + "operations": "Operations", + "aggregated_cost": "AggregatedCostOperations", + "events": "EventsOperations", + "lots": "LotsOperations", + "credits": "CreditsOperations" + }, + "operation_mixins": { + }, + "sync_imports": "None", + "async_imports": "None" +} \ No newline at end of file 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 142a0420b39b4..48944bf3938a2 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 = "8.0.0" +VERSION = "2.0.0" 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 c709a3e4f1e96..939f029e5d9ed 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 @@ -97,7 +97,6 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.usage_details = UsageDetailsOperations( 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 b601898dfeea5..1d8cb09f2b49f 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 @@ -160,4 +160,4 @@ async def get_for_billing_period_by_management_group( return cls(pipeline_response, deserialized, {}) return deserialized - get_for_billing_period_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost'} # type: ignore + get_for_billing_period_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedCost'} # type: ignore 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 7d802a0352a96..68f1f28c763ff 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 @@ -202,9 +202,9 @@ async def create_or_update( parameters: "_models.Budget", **kwargs ) -> "_models.Budget": - """The operation to create or update a budget. Update operation requires latest eTag to be set in - the request mandatorily. You may obtain the latest eTag by performing a get operation. Create - operation does not require eTag. + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_forecasts_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_forecasts_operations.py index 3e0e3c744c1d7..07acafc32c200 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_forecasts_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_forecasts_operations.py @@ -46,7 +46,9 @@ def list( filter: Optional[str] = None, **kwargs ) -> AsyncIterable["_models.ForecastsListResult"]: - """Lists the forecast charges by subscriptionId. + """Lists the forecast charges for scope defined. Please note that this API is no longer actively + under development. We recommend using our new Forecast API moving forward: + https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage. :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', 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 549bdc2242850..01df1e4443c0e 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 @@ -110,7 +110,7 @@ async def get( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize(_models.HighCasedErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None 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 a2f7be0f3a48c..7f380847962e5 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 @@ -44,7 +44,7 @@ async def get( self, scope: str, **kwargs - ) -> "_models.TagsResult": + ) -> Optional["_models.TagsResult"]: """Get all available tag keys for the defined scope. :param scope: The scope associated with tags operations. This includes @@ -60,10 +60,10 @@ async def get( :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TagsResult, or the result of cls(response) - :rtype: ~azure.mgmt.consumption.models.TagsResult + :rtype: ~azure.mgmt.consumption.models.TagsResult or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TagsResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TagsResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -90,12 +90,14 @@ async def get( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('TagsResult', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagsResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) 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 b2642f737fafd..07c7f324cf8b0 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 @@ -96,7 +96,7 @@ def list( :type metric: str or ~azure.mgmt.consumption.models.Metrictype :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UsageDetailsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.consumption.models.UsageDetailsListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.consumption.models.UsageDetailsListResultor None] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageDetailsListResult"] @@ -153,7 +153,7 @@ async def get_next(next_link=None): pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 503]: error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py index 5683bcba3659d..714ff3ec93bde 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py @@ -29,6 +29,8 @@ from ._models_py3 import Forecast from ._models_py3 import ForecastPropertiesConfidenceLevelsItem from ._models_py3 import ForecastsListResult + from ._models_py3 import HighCasedErrorDetails + from ._models_py3 import HighCasedErrorResponse from ._models_py3 import LegacyChargeSummary from ._models_py3 import LegacyReservationRecommendation from ._models_py3 import LegacyReservationTransaction @@ -96,6 +98,8 @@ from ._models import Forecast # type: ignore from ._models import ForecastPropertiesConfidenceLevelsItem # type: ignore from ._models import ForecastsListResult # type: ignore + from ._models import HighCasedErrorDetails # type: ignore + from ._models import HighCasedErrorResponse # type: ignore from ._models import LegacyChargeSummary # type: ignore from ._models import LegacyReservationRecommendation # type: ignore from ._models import LegacyReservationTransaction # type: ignore @@ -186,6 +190,8 @@ 'Forecast', 'ForecastPropertiesConfidenceLevelsItem', 'ForecastsListResult', + 'HighCasedErrorDetails', + 'HighCasedErrorResponse', 'LegacyChargeSummary', 'LegacyReservationRecommendation', 'LegacyReservationTransaction', 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 cd7ad1ca77c15..a58240c3f7bd5 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 @@ -85,7 +85,9 @@ class EventType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NEW_CREDIT = "NewCredit" class Grain(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The granularity of forecast. + """The granularity of forecast. Please note that Yearly is not currently supported in this API. + The API will provide responses in the Monthly grain if Yearly is selected. To get yearly grain + data, please use our newer Forecast API. """ DAILY = "Daily" diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py index ba7caff4e7157..3762ab763ec27 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py @@ -51,6 +51,8 @@ class Resource(msrest.serialization.Model): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] """ @@ -59,6 +61,7 @@ class Resource(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, } @@ -66,6 +69,7 @@ class Resource(msrest.serialization.Model): '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}'}, } @@ -77,6 +81,7 @@ def __init__( self.id = None self.name = None self.type = None + self.etag = None self.tags = None @@ -91,6 +96,8 @@ class Balance(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar currency: The ISO currency in which the meter is charged, for example, USD. @@ -133,6 +140,7 @@ class Balance(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'currency': {'readonly': True}, 'beginning_balance': {'readonly': True}, @@ -154,6 +162,7 @@ class Balance(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}'}, 'currency': {'key': 'properties.currency', 'type': 'str'}, 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'float'}, @@ -323,7 +332,7 @@ class Budget(ProxyResource): Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filter: May be used to filter budgets by resource group, resource, or meter. + :param filter: May be used to filter budgets by user-specified dimensions and/or tags. :type filter: ~azure.mgmt.consumption.models.BudgetFilter :ivar current_spend: The current amount of cost which is being tracked for a budget. :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend @@ -383,7 +392,7 @@ class BudgetComparisonExpression(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'operator': {'required': True}, - 'values': {'required': True, 'min_items': 1}, + 'values': {'required': True}, } _attribute_map = { @@ -415,10 +424,6 @@ class BudgetFilter(msrest.serialization.Model): :type tags: ~azure.mgmt.consumption.models.BudgetComparisonExpression """ - _validation = { - 'and_property': {'min_items': 2}, - } - _attribute_map = { 'and_property': {'key': 'and', 'type': '[BudgetFilterProperties]'}, 'not_property': {'key': 'not', 'type': 'BudgetFilterProperties'}, @@ -561,6 +566,8 @@ class ChargeSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of charge summary.Constant filled by server. @@ -572,6 +579,7 @@ class ChargeSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -580,6 +588,7 @@ 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}'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -637,6 +646,8 @@ class CreditSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar balance_summary: Summary of balances associated with this credit summary. @@ -653,6 +664,7 @@ class CreditSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'balance_summary': {'readonly': True}, 'pending_credit_adjustments': {'readonly': True}, @@ -664,6 +676,7 @@ class CreditSummary(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}'}, 'balance_summary': {'key': 'properties.balanceSummary', 'type': 'CreditBalanceSummary'}, 'pending_credit_adjustments': {'key': 'properties.pendingCreditAdjustments', 'type': 'Amount'}, @@ -811,6 +824,8 @@ class EventSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar transaction_date: Transaction date. @@ -839,6 +854,7 @@ class EventSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'transaction_date': {'readonly': True}, 'description': {'readonly': True}, @@ -854,6 +870,7 @@ class EventSummary(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}'}, 'transaction_date': {'key': 'properties.transactionDate', 'type': 'iso-8601'}, 'description': {'key': 'properties.description', 'type': 'str'}, @@ -893,12 +910,16 @@ class Forecast(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar usage_date: The usage date of the forecast. :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: "Daily", "Monthly", - "Yearly". + :param grain: The granularity of forecast. Please note that Yearly is not currently supported + in this API. The API will provide responses in the Monthly grain if Yearly is selected. To get + yearly grain data, please use our newer Forecast API. Possible values include: "Daily", + "Monthly", "Yearly". :type grain: str or ~azure.mgmt.consumption.models.Grain :ivar charge: The amount of charge. :vartype charge: float @@ -917,6 +938,7 @@ class Forecast(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'usage_date': {'readonly': True}, 'charge': {'readonly': True}, @@ -928,6 +950,7 @@ class Forecast(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}'}, 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, 'grain': {'key': 'properties.grain', 'type': 'str'}, @@ -1010,6 +1033,64 @@ def __init__( self.value = None +class HighCasedErrorDetails(msrest.serialization.Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HighCasedErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class HighCasedErrorResponse(msrest.serialization.Model): + """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. + +* + 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. + + :param error: The details of the error. + :type error: ~azure.mgmt.consumption.models.HighCasedErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'HighCasedErrorDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(HighCasedErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + class LegacyChargeSummary(ChargeSummary): """Legacy charge summary. @@ -1023,6 +1104,8 @@ class LegacyChargeSummary(ChargeSummary): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of charge summary.Constant filled by server. @@ -1048,6 +1131,7 @@ class LegacyChargeSummary(ChargeSummary): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_period_id': {'readonly': True}, @@ -1063,6 +1147,7 @@ class LegacyChargeSummary(ChargeSummary): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, @@ -1139,6 +1224,8 @@ class ReservationRecommendation(Resource, ResourceAttributes): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of reservation recommendation.Constant filled by @@ -1152,6 +1239,7 @@ class ReservationRecommendation(Resource, ResourceAttributes): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -1162,6 +1250,7 @@ class ReservationRecommendation(Resource, ResourceAttributes): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -1181,6 +1270,7 @@ def __init__( self.id = None self.name = None self.type = None + self.etag = None self.tags = None self.kind = 'ReservationRecommendation' # type: str @@ -1202,6 +1292,8 @@ class LegacyReservationRecommendation(ReservationRecommendation): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of reservation recommendation.Constant filled by @@ -1210,7 +1302,7 @@ class LegacyReservationRecommendation(ReservationRecommendation): :ivar look_back_period: The number of days of usage to look back for recommendation. :vartype look_back_period: str :ivar instance_flexibility_ratio: The instance Flexibility Ratio. - :vartype instance_flexibility_ratio: int + :vartype instance_flexibility_ratio: float :ivar instance_flexibility_group: The instance Flexibility Group. :vartype instance_flexibility_group: str :ivar normalized_size: The normalized Size. @@ -1219,6 +1311,8 @@ class LegacyReservationRecommendation(ReservationRecommendation): :vartype recommended_quantity_normalized: float :ivar meter_id: The meter id (GUID). :vartype meter_id: str + :ivar resource_type: The azure resource type. + :vartype resource_type: str :ivar term: RI recommendations in one or three year terms. :vartype term: str :ivar cost_with_no_reserved_instances: The total amount of cost without reserved instances. @@ -1243,6 +1337,7 @@ class LegacyReservationRecommendation(ReservationRecommendation): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'look_back_period': {'readonly': True}, @@ -1251,6 +1346,7 @@ class LegacyReservationRecommendation(ReservationRecommendation): 'normalized_size': {'readonly': True}, 'recommended_quantity_normalized': {'readonly': True}, 'meter_id': {'readonly': True}, + 'resource_type': {'readonly': True}, 'term': {'readonly': True}, 'cost_with_no_reserved_instances': {'readonly': True}, 'recommended_quantity': {'readonly': True}, @@ -1267,14 +1363,16 @@ class LegacyReservationRecommendation(ReservationRecommendation): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'float'}, 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, 'term': {'key': 'properties.term', 'type': 'str'}, 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'float'}, 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'float'}, @@ -1297,6 +1395,7 @@ def __init__( self.normalized_size = None self.recommended_quantity_normalized = None self.meter_id = None + self.resource_type = None self.term = None self.cost_with_no_reserved_instances = None self.recommended_quantity = None @@ -1625,6 +1724,8 @@ class UsageDetail(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of usage details.Constant filled by server. Possible @@ -1636,6 +1737,7 @@ class UsageDetail(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -1644,6 +1746,7 @@ class UsageDetail(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}'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -1673,6 +1776,8 @@ class LegacyUsageDetail(UsageDetail): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of usage details.Constant filled by server. Possible @@ -1785,6 +1890,7 @@ class LegacyUsageDetail(UsageDetail): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_account_id': {'readonly': True}, @@ -1835,6 +1941,7 @@ class LegacyUsageDetail(UsageDetail): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, @@ -1972,6 +2079,8 @@ class LotSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar original_amount: Original amount. @@ -1992,6 +2101,7 @@ class LotSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'original_amount': {'readonly': True}, 'closed_balance': {'readonly': True}, @@ -2005,6 +2115,7 @@ class LotSummary(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}'}, 'original_amount': {'key': 'properties.originalAmount', 'type': 'Amount'}, 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, @@ -2038,6 +2149,8 @@ class ManagementGroupAggregatedCostResult(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the aggregated cost belongs @@ -2069,6 +2182,7 @@ class ManagementGroupAggregatedCostResult(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, 'usage_start': {'readonly': True}, @@ -2083,6 +2197,7 @@ class ManagementGroupAggregatedCostResult(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}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, @@ -2124,6 +2239,8 @@ class Marketplace(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the usage belongs to. @@ -2184,6 +2301,7 @@ class Marketplace(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, 'usage_start': {'readonly': True}, @@ -2216,6 +2334,7 @@ class Marketplace(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}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, @@ -2435,6 +2554,8 @@ class ModernChargeSummary(ChargeSummary): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of charge summary.Constant filled by server. @@ -2468,6 +2589,7 @@ class ModernChargeSummary(ChargeSummary): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_period_id': {'readonly': True}, @@ -2487,6 +2609,7 @@ class ModernChargeSummary(ChargeSummary): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, @@ -2538,15 +2661,17 @@ class ModernReservationRecommendation(ReservationRecommendation): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of reservation recommendation.Constant filled by server. Possible values include: "legacy", "modern". :type kind: str or ~azure.mgmt.consumption.models.ReservationRecommendationKind :ivar look_back_period: The number of days of usage to look back for recommendation. - :vartype look_back_period: str + :vartype look_back_period: int :ivar instance_flexibility_ratio: The instance Flexibility Ratio. - :vartype instance_flexibility_ratio: int + :vartype instance_flexibility_ratio: float :ivar instance_flexibility_group: The instance Flexibility Group. :vartype instance_flexibility_group: str :ivar normalized_size: The normalized Size. @@ -2579,6 +2704,7 @@ class ModernReservationRecommendation(ReservationRecommendation): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'look_back_period': {'readonly': True}, @@ -2603,10 +2729,11 @@ class ModernReservationRecommendation(ReservationRecommendation): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'int'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'float'}, 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, @@ -2826,6 +2953,8 @@ class ModernUsageDetail(UsageDetail): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of usage details.Constant filled by server. Possible @@ -2966,7 +3095,7 @@ class ModernUsageDetail(UsageDetail): :vartype previous_invoice_id: str :ivar pricing_currency_code: Pricing Billing Currency. :vartype pricing_currency_code: str - :ivar product_identifier: Identifer for the product that has accrued charges by consumption or + :ivar product_identifier: identifier for the product that has accrued charges by consumption or purchase . This is the concatenated key of productId and SKuId in partner center. :vartype product_identifier: str :ivar resource_location_normalized: Resource Location Normalized. @@ -3006,12 +3135,15 @@ class ModernUsageDetail(UsageDetail): :ivar partner_earned_credit_applied: Flag to indicate if partner earned credit has been applied or not. :vartype partner_earned_credit_applied: str + :ivar pay_g_price: Retail price for the resource. + :vartype pay_g_price: float """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_account_id': {'readonly': True}, @@ -3079,12 +3211,14 @@ class ModernUsageDetail(UsageDetail): 'payg_cost_in_usd': {'readonly': True}, 'partner_earned_credit_rate': {'readonly': True}, 'partner_earned_credit_applied': {'readonly': True}, + 'pay_g_price': {'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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, @@ -3152,6 +3286,7 @@ class ModernUsageDetail(UsageDetail): 'payg_cost_in_usd': {'key': 'properties.paygCostInUSD', 'type': 'float'}, 'partner_earned_credit_rate': {'key': 'properties.partnerEarnedCreditRate', 'type': 'float'}, 'partner_earned_credit_applied': {'key': 'properties.partnerEarnedCreditApplied', 'type': 'str'}, + 'pay_g_price': {'key': 'properties.payGPrice', 'type': 'float'}, } def __init__( @@ -3225,6 +3360,7 @@ def __init__( self.payg_cost_in_usd = None self.partner_earned_credit_rate = None self.partner_earned_credit_applied = None + self.pay_g_price = None class Notification(msrest.serialization.Model): @@ -3242,15 +3378,19 @@ class Notification(msrest.serialization.Model): 1000. :type threshold: float :param contact_emails: Required. Email addresses to send the budget notification to when the - threshold is exceeded. + threshold is exceeded. Must have at least one contact email or contact group specified at the + Subscription or Resource Group scopes. All other scopes must have at least one contact email + specified. :type contact_emails: list[str] :param contact_roles: Contact roles to send the budget notification to when the threshold is exceeded. :type contact_roles: list[str] :param contact_groups: Action groups to send the budget notification to when the threshold is - exceeded. + exceeded. Must be provided as a fully qualified Azure resource id. Only supported at + Subscription or Resource Group scopes. :type contact_groups: list[str] - :param threshold_type: The type of threshold. Possible values include: "Actual". + :param threshold_type: The type of threshold. Possible values include: "Actual". Default value: + "Actual". :type threshold_type: str or ~azure.mgmt.consumption.models.ThresholdType """ @@ -3258,7 +3398,7 @@ class Notification(msrest.serialization.Model): 'enabled': {'required': True}, 'operator': {'required': True}, 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, + 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 0}, 'contact_groups': {'max_items': 50, 'min_items': 0}, } @@ -3283,7 +3423,7 @@ def __init__( self.contact_emails = kwargs['contact_emails'] self.contact_roles = kwargs.get('contact_roles', None) self.contact_groups = kwargs.get('contact_groups', None) - self.threshold_type = kwargs.get('threshold_type', None) + self.threshold_type = kwargs.get('threshold_type', "Actual") class Operation(msrest.serialization.Model): @@ -3291,6 +3431,8 @@ class Operation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. + :ivar id: Operation Id. + :vartype id: str :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str :param display: The object that represents the operation. @@ -3298,10 +3440,12 @@ class Operation(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, 'name': {'readonly': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, } @@ -3311,6 +3455,7 @@ def __init__( **kwargs ): super(Operation, self).__init__(**kwargs) + self.id = None self.name = None self.display = kwargs.get('display', None) @@ -3458,6 +3603,8 @@ class PriceSheetResult(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar pricesheets: Price sheet. @@ -3470,6 +3617,7 @@ class PriceSheetResult(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'pricesheets': {'readonly': True}, 'next_link': {'readonly': True}, @@ -3479,6 +3627,7 @@ class PriceSheetResult(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}'}, 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, @@ -3504,6 +3653,8 @@ class ReservationDetail(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar reservation_order_id: The reservation order ID is the identifier for a reservation @@ -3544,6 +3695,7 @@ class ReservationDetail(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'reservation_order_id': {'readonly': True}, 'instance_flexibility_ratio': {'readonly': True}, @@ -3562,6 +3714,7 @@ class ReservationDetail(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}'}, 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'str'}, @@ -3690,6 +3843,8 @@ class ReservationRecommendationDetailsModel(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param location: Resource Location. @@ -3716,6 +3871,7 @@ class ReservationRecommendationDetailsModel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'currency': {'readonly': True}, 'resource': {'readonly': True}, @@ -3729,6 +3885,7 @@ class ReservationRecommendationDetailsModel(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}'}, 'location': {'key': 'location', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'str'}, @@ -3975,6 +4132,8 @@ class ReservationSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar reservation_order_id: The reservation order ID is the identifier for a reservation @@ -4027,6 +4186,7 @@ class ReservationSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'reservation_order_id': {'readonly': True}, 'reservation_id': {'readonly': True}, @@ -4049,6 +4209,7 @@ class ReservationSummary(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}'}, 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, @@ -4154,10 +4315,13 @@ class Tag(msrest.serialization.Model): :param key: Tag key. :type key: str + :param value: Tag values. + :type value: list[str] """ _attribute_map = { 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[str]'}, } def __init__( @@ -4166,6 +4330,7 @@ def __init__( ): super(Tag, self).__init__(**kwargs) self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) class TagsResult(ProxyResource): @@ -4184,12 +4349,18 @@ class TagsResult(ProxyResource): :type e_tag: str :param tags: A set of tags. A list of Tag. :type tags: list[~azure.mgmt.consumption.models.Tag] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + :ivar previous_link: The link (url) to the previous page of results. + :vartype previous_link: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'next_link': {'readonly': True}, + 'previous_link': {'readonly': True}, } _attribute_map = { @@ -4198,6 +4369,8 @@ class TagsResult(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'e_tag': {'key': 'eTag', 'type': 'str'}, 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'previous_link': {'key': 'properties.previousLink', 'type': 'str'}, } def __init__( @@ -4206,6 +4379,8 @@ def __init__( ): super(TagsResult, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.next_link = None + self.previous_link = None class UsageDetailsListResult(msrest.serialization.Model): 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 aacfd19b6a23e..feb9669c092ec 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 @@ -56,6 +56,8 @@ class Resource(msrest.serialization.Model): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] """ @@ -64,6 +66,7 @@ class Resource(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, } @@ -71,6 +74,7 @@ class Resource(msrest.serialization.Model): '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}'}, } @@ -82,6 +86,7 @@ def __init__( self.id = None self.name = None self.type = None + self.etag = None self.tags = None @@ -96,6 +101,8 @@ class Balance(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar currency: The ISO currency in which the meter is charged, for example, USD. @@ -138,6 +145,7 @@ class Balance(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'currency': {'readonly': True}, 'beginning_balance': {'readonly': True}, @@ -159,6 +167,7 @@ class Balance(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}'}, 'currency': {'key': 'properties.currency', 'type': 'str'}, 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'float'}, @@ -332,7 +341,7 @@ class Budget(ProxyResource): Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filter: May be used to filter budgets by resource group, resource, or meter. + :param filter: May be used to filter budgets by user-specified dimensions and/or tags. :type filter: ~azure.mgmt.consumption.models.BudgetFilter :ivar current_spend: The current amount of cost which is being tracked for a budget. :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend @@ -400,7 +409,7 @@ class BudgetComparisonExpression(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'operator': {'required': True}, - 'values': {'required': True, 'min_items': 1}, + 'values': {'required': True}, } _attribute_map = { @@ -436,10 +445,6 @@ class BudgetFilter(msrest.serialization.Model): :type tags: ~azure.mgmt.consumption.models.BudgetComparisonExpression """ - _validation = { - 'and_property': {'min_items': 2}, - } - _attribute_map = { 'and_property': {'key': 'and', 'type': '[BudgetFilterProperties]'}, 'not_property': {'key': 'not', 'type': 'BudgetFilterProperties'}, @@ -593,6 +598,8 @@ class ChargeSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of charge summary.Constant filled by server. @@ -604,6 +611,7 @@ class ChargeSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -612,6 +620,7 @@ 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}'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -669,6 +678,8 @@ class CreditSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar balance_summary: Summary of balances associated with this credit summary. @@ -685,6 +696,7 @@ class CreditSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'balance_summary': {'readonly': True}, 'pending_credit_adjustments': {'readonly': True}, @@ -696,6 +708,7 @@ class CreditSummary(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}'}, 'balance_summary': {'key': 'properties.balanceSummary', 'type': 'CreditBalanceSummary'}, 'pending_credit_adjustments': {'key': 'properties.pendingCreditAdjustments', 'type': 'Amount'}, @@ -845,6 +858,8 @@ class EventSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar transaction_date: Transaction date. @@ -873,6 +888,7 @@ class EventSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'transaction_date': {'readonly': True}, 'description': {'readonly': True}, @@ -888,6 +904,7 @@ class EventSummary(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}'}, 'transaction_date': {'key': 'properties.transactionDate', 'type': 'iso-8601'}, 'description': {'key': 'properties.description', 'type': 'str'}, @@ -929,12 +946,16 @@ class Forecast(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar usage_date: The usage date of the forecast. :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: "Daily", "Monthly", - "Yearly". + :param grain: The granularity of forecast. Please note that Yearly is not currently supported + in this API. The API will provide responses in the Monthly grain if Yearly is selected. To get + yearly grain data, please use our newer Forecast API. Possible values include: "Daily", + "Monthly", "Yearly". :type grain: str or ~azure.mgmt.consumption.models.Grain :ivar charge: The amount of charge. :vartype charge: float @@ -953,6 +974,7 @@ class Forecast(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'usage_date': {'readonly': True}, 'charge': {'readonly': True}, @@ -964,6 +986,7 @@ class Forecast(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}'}, 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, 'grain': {'key': 'properties.grain', 'type': 'str'}, @@ -1051,6 +1074,66 @@ def __init__( self.value = None +class HighCasedErrorDetails(msrest.serialization.Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HighCasedErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class HighCasedErrorResponse(msrest.serialization.Model): + """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. + +* + 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. + + :param error: The details of the error. + :type error: ~azure.mgmt.consumption.models.HighCasedErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'HighCasedErrorDetails'}, + } + + def __init__( + self, + *, + error: Optional["HighCasedErrorDetails"] = None, + **kwargs + ): + super(HighCasedErrorResponse, self).__init__(**kwargs) + self.error = error + + class LegacyChargeSummary(ChargeSummary): """Legacy charge summary. @@ -1064,6 +1147,8 @@ class LegacyChargeSummary(ChargeSummary): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of charge summary.Constant filled by server. @@ -1089,6 +1174,7 @@ class LegacyChargeSummary(ChargeSummary): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_period_id': {'readonly': True}, @@ -1104,6 +1190,7 @@ class LegacyChargeSummary(ChargeSummary): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, @@ -1180,6 +1267,8 @@ class ReservationRecommendation(Resource, ResourceAttributes): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of reservation recommendation.Constant filled by @@ -1193,6 +1282,7 @@ class ReservationRecommendation(Resource, ResourceAttributes): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -1203,6 +1293,7 @@ class ReservationRecommendation(Resource, ResourceAttributes): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -1222,6 +1313,7 @@ def __init__( self.id = None self.name = None self.type = None + self.etag = None self.tags = None self.kind = 'ReservationRecommendation' # type: str @@ -1243,6 +1335,8 @@ class LegacyReservationRecommendation(ReservationRecommendation): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of reservation recommendation.Constant filled by @@ -1251,7 +1345,7 @@ class LegacyReservationRecommendation(ReservationRecommendation): :ivar look_back_period: The number of days of usage to look back for recommendation. :vartype look_back_period: str :ivar instance_flexibility_ratio: The instance Flexibility Ratio. - :vartype instance_flexibility_ratio: int + :vartype instance_flexibility_ratio: float :ivar instance_flexibility_group: The instance Flexibility Group. :vartype instance_flexibility_group: str :ivar normalized_size: The normalized Size. @@ -1260,6 +1354,8 @@ class LegacyReservationRecommendation(ReservationRecommendation): :vartype recommended_quantity_normalized: float :ivar meter_id: The meter id (GUID). :vartype meter_id: str + :ivar resource_type: The azure resource type. + :vartype resource_type: str :ivar term: RI recommendations in one or three year terms. :vartype term: str :ivar cost_with_no_reserved_instances: The total amount of cost without reserved instances. @@ -1284,6 +1380,7 @@ class LegacyReservationRecommendation(ReservationRecommendation): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'look_back_period': {'readonly': True}, @@ -1292,6 +1389,7 @@ class LegacyReservationRecommendation(ReservationRecommendation): 'normalized_size': {'readonly': True}, 'recommended_quantity_normalized': {'readonly': True}, 'meter_id': {'readonly': True}, + 'resource_type': {'readonly': True}, 'term': {'readonly': True}, 'cost_with_no_reserved_instances': {'readonly': True}, 'recommended_quantity': {'readonly': True}, @@ -1308,14 +1406,16 @@ class LegacyReservationRecommendation(ReservationRecommendation): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'float'}, 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, 'term': {'key': 'properties.term', 'type': 'str'}, 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'float'}, 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'float'}, @@ -1338,6 +1438,7 @@ def __init__( self.normalized_size = None self.recommended_quantity_normalized = None self.meter_id = None + self.resource_type = None self.term = None self.cost_with_no_reserved_instances = None self.recommended_quantity = None @@ -1666,6 +1767,8 @@ class UsageDetail(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of usage details.Constant filled by server. Possible @@ -1677,6 +1780,7 @@ class UsageDetail(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -1685,6 +1789,7 @@ class UsageDetail(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}'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -1714,6 +1819,8 @@ class LegacyUsageDetail(UsageDetail): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of usage details.Constant filled by server. Possible @@ -1826,6 +1933,7 @@ class LegacyUsageDetail(UsageDetail): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_account_id': {'readonly': True}, @@ -1876,6 +1984,7 @@ class LegacyUsageDetail(UsageDetail): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, @@ -2013,6 +2122,8 @@ class LotSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar original_amount: Original amount. @@ -2033,6 +2144,7 @@ class LotSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'original_amount': {'readonly': True}, 'closed_balance': {'readonly': True}, @@ -2046,6 +2158,7 @@ class LotSummary(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}'}, 'original_amount': {'key': 'properties.originalAmount', 'type': 'Amount'}, 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, @@ -2079,6 +2192,8 @@ class ManagementGroupAggregatedCostResult(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the aggregated cost belongs @@ -2110,6 +2225,7 @@ class ManagementGroupAggregatedCostResult(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, 'usage_start': {'readonly': True}, @@ -2124,6 +2240,7 @@ class ManagementGroupAggregatedCostResult(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}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, @@ -2169,6 +2286,8 @@ class Marketplace(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the usage belongs to. @@ -2229,6 +2348,7 @@ class Marketplace(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, 'usage_start': {'readonly': True}, @@ -2261,6 +2381,7 @@ class Marketplace(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}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, @@ -2480,6 +2601,8 @@ class ModernChargeSummary(ChargeSummary): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of charge summary.Constant filled by server. @@ -2513,6 +2636,7 @@ class ModernChargeSummary(ChargeSummary): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_period_id': {'readonly': True}, @@ -2532,6 +2656,7 @@ class ModernChargeSummary(ChargeSummary): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, @@ -2583,15 +2708,17 @@ class ModernReservationRecommendation(ReservationRecommendation): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of reservation recommendation.Constant filled by server. Possible values include: "legacy", "modern". :type kind: str or ~azure.mgmt.consumption.models.ReservationRecommendationKind :ivar look_back_period: The number of days of usage to look back for recommendation. - :vartype look_back_period: str + :vartype look_back_period: int :ivar instance_flexibility_ratio: The instance Flexibility Ratio. - :vartype instance_flexibility_ratio: int + :vartype instance_flexibility_ratio: float :ivar instance_flexibility_group: The instance Flexibility Group. :vartype instance_flexibility_group: str :ivar normalized_size: The normalized Size. @@ -2624,6 +2751,7 @@ class ModernReservationRecommendation(ReservationRecommendation): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'look_back_period': {'readonly': True}, @@ -2648,10 +2776,11 @@ class ModernReservationRecommendation(ReservationRecommendation): '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}'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'int'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'float'}, 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, @@ -2871,6 +3000,8 @@ class ModernUsageDetail(UsageDetail): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param kind: Required. Specifies the kind of usage details.Constant filled by server. Possible @@ -3011,7 +3142,7 @@ class ModernUsageDetail(UsageDetail): :vartype previous_invoice_id: str :ivar pricing_currency_code: Pricing Billing Currency. :vartype pricing_currency_code: str - :ivar product_identifier: Identifer for the product that has accrued charges by consumption or + :ivar product_identifier: identifier for the product that has accrued charges by consumption or purchase . This is the concatenated key of productId and SKuId in partner center. :vartype product_identifier: str :ivar resource_location_normalized: Resource Location Normalized. @@ -3051,12 +3182,15 @@ class ModernUsageDetail(UsageDetail): :ivar partner_earned_credit_applied: Flag to indicate if partner earned credit has been applied or not. :vartype partner_earned_credit_applied: str + :ivar pay_g_price: Retail price for the resource. + :vartype pay_g_price: float """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, 'billing_account_id': {'readonly': True}, @@ -3124,12 +3258,14 @@ class ModernUsageDetail(UsageDetail): 'payg_cost_in_usd': {'readonly': True}, 'partner_earned_credit_rate': {'readonly': True}, 'partner_earned_credit_applied': {'readonly': True}, + 'pay_g_price': {'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}'}, 'kind': {'key': 'kind', 'type': 'str'}, 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, @@ -3197,6 +3333,7 @@ class ModernUsageDetail(UsageDetail): 'payg_cost_in_usd': {'key': 'properties.paygCostInUSD', 'type': 'float'}, 'partner_earned_credit_rate': {'key': 'properties.partnerEarnedCreditRate', 'type': 'float'}, 'partner_earned_credit_applied': {'key': 'properties.partnerEarnedCreditApplied', 'type': 'str'}, + 'pay_g_price': {'key': 'properties.payGPrice', 'type': 'float'}, } def __init__( @@ -3270,6 +3407,7 @@ def __init__( self.payg_cost_in_usd = None self.partner_earned_credit_rate = None self.partner_earned_credit_applied = None + self.pay_g_price = None class Notification(msrest.serialization.Model): @@ -3287,15 +3425,19 @@ class Notification(msrest.serialization.Model): 1000. :type threshold: float :param contact_emails: Required. Email addresses to send the budget notification to when the - threshold is exceeded. + threshold is exceeded. Must have at least one contact email or contact group specified at the + Subscription or Resource Group scopes. All other scopes must have at least one contact email + specified. :type contact_emails: list[str] :param contact_roles: Contact roles to send the budget notification to when the threshold is exceeded. :type contact_roles: list[str] :param contact_groups: Action groups to send the budget notification to when the threshold is - exceeded. + exceeded. Must be provided as a fully qualified Azure resource id. Only supported at + Subscription or Resource Group scopes. :type contact_groups: list[str] - :param threshold_type: The type of threshold. Possible values include: "Actual". + :param threshold_type: The type of threshold. Possible values include: "Actual". Default value: + "Actual". :type threshold_type: str or ~azure.mgmt.consumption.models.ThresholdType """ @@ -3303,7 +3445,7 @@ class Notification(msrest.serialization.Model): 'enabled': {'required': True}, 'operator': {'required': True}, 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, + 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 0}, 'contact_groups': {'max_items': 50, 'min_items': 0}, } @@ -3326,7 +3468,7 @@ def __init__( contact_emails: List[str], contact_roles: Optional[List[str]] = None, contact_groups: Optional[List[str]] = None, - threshold_type: Optional[Union[str, "ThresholdType"]] = None, + threshold_type: Optional[Union[str, "ThresholdType"]] = "Actual", **kwargs ): super(Notification, self).__init__(**kwargs) @@ -3344,6 +3486,8 @@ class Operation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. + :ivar id: Operation Id. + :vartype id: str :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str :param display: The object that represents the operation. @@ -3351,10 +3495,12 @@ class Operation(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, 'name': {'readonly': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, } @@ -3366,6 +3512,7 @@ def __init__( **kwargs ): super(Operation, self).__init__(**kwargs) + self.id = None self.name = None self.display = display @@ -3513,6 +3660,8 @@ class PriceSheetResult(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar pricesheets: Price sheet. @@ -3525,6 +3674,7 @@ class PriceSheetResult(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'pricesheets': {'readonly': True}, 'next_link': {'readonly': True}, @@ -3534,6 +3684,7 @@ class PriceSheetResult(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}'}, 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, @@ -3559,6 +3710,8 @@ class ReservationDetail(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar reservation_order_id: The reservation order ID is the identifier for a reservation @@ -3599,6 +3752,7 @@ class ReservationDetail(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'reservation_order_id': {'readonly': True}, 'instance_flexibility_ratio': {'readonly': True}, @@ -3617,6 +3771,7 @@ class ReservationDetail(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}'}, 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'str'}, @@ -3747,6 +3902,8 @@ class ReservationRecommendationDetailsModel(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param location: Resource Location. @@ -3773,6 +3930,7 @@ class ReservationRecommendationDetailsModel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'currency': {'readonly': True}, 'resource': {'readonly': True}, @@ -3786,6 +3944,7 @@ class ReservationRecommendationDetailsModel(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}'}, 'location': {'key': 'location', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'str'}, @@ -4037,6 +4196,8 @@ class ReservationSummary(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str + :ivar etag: Resource etag. + :vartype etag: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar reservation_order_id: The reservation order ID is the identifier for a reservation @@ -4089,6 +4250,7 @@ class ReservationSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'reservation_order_id': {'readonly': True}, 'reservation_id': {'readonly': True}, @@ -4111,6 +4273,7 @@ class ReservationSummary(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}'}, 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, @@ -4216,20 +4379,25 @@ class Tag(msrest.serialization.Model): :param key: Tag key. :type key: str + :param value: Tag values. + :type value: list[str] """ _attribute_map = { 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[str]'}, } def __init__( self, *, key: Optional[str] = None, + value: Optional[List[str]] = None, **kwargs ): super(Tag, self).__init__(**kwargs) self.key = key + self.value = value class TagsResult(ProxyResource): @@ -4248,12 +4416,18 @@ class TagsResult(ProxyResource): :type e_tag: str :param tags: A set of tags. A list of Tag. :type tags: list[~azure.mgmt.consumption.models.Tag] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + :ivar previous_link: The link (url) to the previous page of results. + :vartype previous_link: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'next_link': {'readonly': True}, + 'previous_link': {'readonly': True}, } _attribute_map = { @@ -4262,6 +4436,8 @@ class TagsResult(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'e_tag': {'key': 'eTag', 'type': 'str'}, 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'previous_link': {'key': 'properties.previousLink', 'type': 'str'}, } def __init__( @@ -4273,6 +4449,8 @@ def __init__( ): super(TagsResult, self).__init__(e_tag=e_tag, **kwargs) self.tags = tags + self.next_link = None + self.previous_link = None class UsageDetailsListResult(msrest.serialization.Model): 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 ccf5e9b480dbc..82be766f65c29 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 @@ -166,4 +166,4 @@ def get_for_billing_period_by_management_group( return cls(pipeline_response, deserialized, {}) return deserialized - get_for_billing_period_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost'} # type: ignore + get_for_billing_period_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedCost'} # type: ignore 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 c50bf7bc303ca..7f248d3881509 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 @@ -209,9 +209,9 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.Budget" - """The operation to create or update a budget. Update operation requires latest eTag to be set in - the request mandatorily. You may obtain the latest eTag by performing a get operation. Create - operation does not require eTag. + """The operation to create or update a budget. You can optionally provide an eTag if desired as a + form of concurrency control. To obtain the latest eTag for a given budget, perform a get + operation prior to your put operation. :param scope: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py index 507a13eb386c7..d67fc553a821e 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py @@ -51,7 +51,9 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ForecastsListResult"] - """Lists the forecast charges by subscriptionId. + """Lists the forecast charges for scope defined. Please note that this API is no longer actively + under development. We recommend using our new Forecast API moving forward: + https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage. :param filter: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', 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 103b363b2977f..b549c61889751 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 @@ -115,7 +115,7 @@ def get( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize(_models.HighCasedErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None 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 e6cedfb6f4592..489c17d8c25f1 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 @@ -49,7 +49,7 @@ def get( scope, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.TagsResult" + # type: (...) -> Optional["_models.TagsResult"] """Get all available tag keys for the defined scope. :param scope: The scope associated with tags operations. This includes @@ -65,10 +65,10 @@ def get( :type scope: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TagsResult, or the result of cls(response) - :rtype: ~azure.mgmt.consumption.models.TagsResult + :rtype: ~azure.mgmt.consumption.models.TagsResult or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TagsResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TagsResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -95,12 +95,14 @@ def get( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('TagsResult', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagsResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) 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 ea7090e301f19..865f0354fa42d 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 @@ -101,7 +101,7 @@ def list( :type metric: str or ~azure.mgmt.consumption.models.Metrictype :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UsageDetailsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.consumption.models.UsageDetailsListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.consumption.models.UsageDetailsListResultor None] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageDetailsListResult"] @@ -158,7 +158,7 @@ def get_next(next_link=None): pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 503]: error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)