diff --git a/sdk/consumption/azure-mgmt-consumption/MANIFEST.in b/sdk/consumption/azure-mgmt-consumption/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/consumption/azure-mgmt-consumption/MANIFEST.in +++ b/sdk/consumption/azure-mgmt-consumption/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/consumption/azure-mgmt-consumption/_meta.json b/sdk/consumption/azure-mgmt-consumption/_meta.json new file mode 100644 index 000000000000..ae5a82f33b29 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.6", + "commit": "d1f4722b8a8e97331414afe53bc46563e52c1183", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/consumption/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "readme": "specification/consumption/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py index 23d380af7ac4..7e67048a74c6 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-10-01" + self.api_version = "2019-11-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-consumption/{}'.format(VERSION)) self._configure(**kwargs) 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 bd8acadb67e7..3d5cb2329a51 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 @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import ConsumptionManagementClientConfiguration from .operations import UsageDetailsOperations @@ -140,6 +141,24 @@ def __init__( self.credits = CreditsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() 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 000000000000..dcd23159d4d4 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_metadata.json @@ -0,0 +1,120 @@ +{ + "chosen_version": "2019-11-01", + "total_api_version_list": ["2019-11-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": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ConsumptionManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ConsumptionManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "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: \"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: str,", + "description": "Azure Subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "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, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "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" + } +} \ 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 142a0420b39b..48944bf3938a 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/_configuration.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_configuration.py index 35ea926982d4..c3375e5b06f2 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_configuration.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-10-01" + self.api_version = "2019-11-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-consumption/{}'.format(VERSION)) self._configure(**kwargs) 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 c709a3e4f1e9..4616d581d2bc 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 @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -137,6 +138,23 @@ def __init__( self.credits = CreditsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() 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 b601898dfeea..5c28439e2145 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 @@ -66,7 +66,7 @@ async def get_by_management_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -92,7 +92,7 @@ async def get_by_management_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupAggregatedCostResult', pipeline_response) @@ -126,7 +126,7 @@ async def get_for_billing_period_by_management_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -151,7 +151,7 @@ async def get_for_billing_period_by_management_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupAggregatedCostResult', pipeline_response) @@ -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/_balances_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_balances_operations.py index 1183848b2622..a4243ace7d48 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 @@ -60,7 +60,7 @@ async def get_by_billing_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -84,7 +84,7 @@ async def get_by_billing_account( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Balance', pipeline_response) @@ -118,7 +118,7 @@ async def get_for_billing_period_by_billing_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -143,7 +143,7 @@ async def get_for_billing_period_by_billing_account( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Balance', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_budgets_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_budgets_operations.py index 7d802a0352a9..013cc2e93cfc 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 @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -113,7 +113,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -159,7 +159,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -184,7 +184,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Budget', pipeline_response) @@ -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, @@ -235,7 +235,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -265,7 +265,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -315,7 +315,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -340,7 +340,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: 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 11aedcb34bc1..1bd813e7a4be 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 @@ -91,7 +91,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -123,7 +123,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ChargesListResult', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_credits_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_credits_operations.py index a02204f3ecfa..440f9591aef6 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 @@ -62,7 +62,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -87,7 +87,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CreditSummary', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_events_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_events_operations.py index e77643642dbd..9cf0cff674b0 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 @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -112,7 +112,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_forecasts_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_forecasts_operations.py index 3e0e3c744c1d..d46861eaa926 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', @@ -62,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -104,7 +106,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_lots_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_lots_operations.py index 67a4242e7980..51dfb1d68883 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 @@ -63,7 +63,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -104,7 +104,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_marketplaces_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_marketplaces_operations.py index ecee0de3e21c..2af62ea1aec0 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 @@ -85,7 +85,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -131,7 +131,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py index f00db289824f..5639fbb8109b 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_price_sheet_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_price_sheet_operations.py index 5401fa5f599f..cc9fc81bb6ad 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 @@ -47,8 +47,8 @@ async def get( top: Optional[int] = None, **kwargs ) -> "_models.PriceSheetResult": - """Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only - for May 1, 2014 or later. + """Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, + 2014 or later. :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. @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -99,7 +99,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PriceSheetResult', pipeline_response) @@ -142,7 +142,7 @@ async def get_by_billing_period( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -173,7 +173,7 @@ async def get_by_billing_period( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PriceSheetResult', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendation_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_recommendation_details_operations.py index 549bdc224285..f7081ea3475c 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 @@ -42,8 +42,8 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, - billing_scope: str, - scope: Union[str, "_models.Scope"], + scope: str, + scope1: Union[str, "_models.Scope"], region: str, term: Union[str, "_models.Term"], look_back_period: Union[str, "_models.LookBackPeriod"], @@ -52,15 +52,15 @@ async def get( ) -> Optional["_models.ReservationRecommendationDetailsModel"]: """Details of a reservation recommendation for what-if analysis of reserved instances. - :param billing_scope: The scope associated with reservation recommendation details operations. - This includes '/subscriptions/{subscriptionId}/' for subscription scope, + :param scope: The scope associated with reservation recommendation details operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope. - :type billing_scope: str - :param scope: Scope of the reservation. - :type scope: str or ~azure.mgmt.consumption.models.Scope + :type scope: str + :param scope1: Scope of the reservation. + :type scope1: str or ~azure.mgmt.consumption.models.Scope :param region: Used to select the region the recommendation should be generated for. :type region: str :param term: Specify length of reservation recommendation term. @@ -81,20 +81,20 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'billingScope': self._serialize.url("billing_scope", billing_scope, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters['scope'] = self._serialize.query("scope1", scope1, 'str') query_parameters['region'] = self._serialize.query("region", region, 'str') query_parameters['term'] = self._serialize.query("term", term, 'str') query_parameters['lookBackPeriod'] = self._serialize.query("look_back_period", look_back_period, 'str') @@ -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.failsafe_deserialize(_models.HighCasedErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -121,4 +121,4 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{billingScope}/providers/Microsoft.Consumption/reservationRecommendationDetails'} # type: ignore + get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails'} # type: ignore 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 09d049fac676..d72a4e28dd58 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 @@ -74,7 +74,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -116,7 +116,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 204]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_reservation_transactions_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservation_transactions_operations.py index c6f5f7abcb98..151966652ae2 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 @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -106,7 +106,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -143,7 +143,7 @@ def list_by_billing_profile( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -186,7 +186,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_reservations_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_details_operations.py index caa00e154eb2..06ceea172625 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 @@ -64,7 +64,7 @@ def list_by_reservation_order( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -142,7 +142,7 @@ def list_by_reservation_order_and_reservation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -184,7 +184,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -237,7 +237,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -287,7 +287,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_reservations_summaries_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_reservations_summaries_operations.py index 29209bda5139..d44c97174397 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 @@ -67,7 +67,7 @@ def list_by_reservation_order( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -110,7 +110,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -150,7 +150,7 @@ def list_by_reservation_order_and_reservation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -194,7 +194,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -249,7 +249,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -300,7 +300,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/aio/operations/_tags_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_tags_operations.py index a2f7be0f3a48..254c3c1b4366 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,15 +60,15 @@ 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 } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -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) + error = self._deserialize.failsafe_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 b2642f737faf..9c1aa9dfa075 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 @@ -104,7 +104,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -154,7 +154,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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 5683bcba3659..c34d8a9a59d3 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 @@ -22,13 +22,17 @@ from ._models_py3 import CreditBalanceSummary from ._models_py3 import CreditSummary from ._models_py3 import CurrentSpend + from ._models_py3 import DownloadProperties from ._models_py3 import ErrorDetails from ._models_py3 import ErrorResponse from ._models_py3 import EventSummary from ._models_py3 import Events from ._models_py3 import Forecast from ._models_py3 import ForecastPropertiesConfidenceLevelsItem + from ._models_py3 import ForecastSpend 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 @@ -89,13 +93,17 @@ from ._models import CreditBalanceSummary # type: ignore from ._models import CreditSummary # type: ignore from ._models import CurrentSpend # type: ignore + from ._models import DownloadProperties # type: ignore from ._models import ErrorDetails # type: ignore from ._models import ErrorResponse # type: ignore from ._models import EventSummary # type: ignore from ._models import Events # type: ignore from ._models import Forecast # type: ignore from ._models import ForecastPropertiesConfidenceLevelsItem # type: ignore + from ._models import ForecastSpend # 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 @@ -179,13 +187,17 @@ 'CreditBalanceSummary', 'CreditSummary', 'CurrentSpend', + 'DownloadProperties', 'ErrorDetails', 'ErrorResponse', 'EventSummary', 'Events', 'Forecast', 'ForecastPropertiesConfidenceLevelsItem', + 'ForecastSpend', '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 cd7ad1ca77c1..4fd2cf015d1b 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 @@ -69,8 +69,10 @@ class ChargeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): class Datagrain(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - DAILY_GRAIN = "daily" #: Daily grain of data. - MONTHLY_GRAIN = "monthly" #: Monthly grain of data. + #: Daily grain of data. + DAILY_GRAIN = "daily" + #: Monthly grain of data. + MONTHLY_GRAIN = "monthly" class EventType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of event. @@ -85,7 +87,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" @@ -94,9 +98,12 @@ class Grain(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): class LookBackPeriod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - LAST07_DAYS = "Last7Days" #: Use 7 days of data for recommendations. - LAST30_DAYS = "Last30Days" #: Use 30 days of data for recommendations. - LAST60_DAYS = "Last60Days" #: Use 60 days of data for recommendations. + #: Use 7 days of data for recommendations. + LAST07_DAYS = "Last7Days" + #: Use 30 days of data for recommendations. + LAST30_DAYS = "Last30Days" + #: Use 60 days of data for recommendations. + LAST60_DAYS = "Last60Days" class LotSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Lot source. @@ -107,9 +114,12 @@ class LotSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): class Metrictype(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - ACTUAL_COST_METRIC_TYPE = "actualcost" #: Actual cost data. - AMORTIZED_COST_METRIC_TYPE = "amortizedcost" #: Amortized cost data. - USAGE_METRIC_TYPE = "usage" #: Usage data. + #: Actual cost data. + ACTUAL_COST_METRIC_TYPE = "actualcost" + #: Amortized cost data. + AMORTIZED_COST_METRIC_TYPE = "amortizedcost" + #: Usage data. + USAGE_METRIC_TYPE = "usage" class OperatorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The comparison operator. @@ -133,8 +143,10 @@ class Scope(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): class Term(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - P1_Y = "P1Y" #: 1 year reservation term. - P3_Y = "P3Y" #: 3 year reservation term. + #: 1 year reservation term. + P1_Y = "P1Y" + #: 3 year reservation term. + P3_Y = "P3Y" class ThresholdType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of threshold 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 ba7caff4e715..90bcae7c3ecf 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,13 +332,15 @@ 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 :param notifications: Dictionary of notifications associated with the budget. Budget can have up to five notifications. :type notifications: dict[str, ~azure.mgmt.consumption.models.Notification] + :ivar forecast_spend: The forecasted cost which is being tracked for a budget. + :vartype forecast_spend: ~azure.mgmt.consumption.models.ForecastSpend """ _validation = { @@ -337,6 +348,7 @@ class Budget(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'current_spend': {'readonly': True}, + 'forecast_spend': {'readonly': True}, } _attribute_map = { @@ -351,6 +363,7 @@ class Budget(ProxyResource): 'filter': {'key': 'properties.filter', 'type': 'BudgetFilter'}, 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, + 'forecast_spend': {'key': 'properties.forecastSpend', 'type': 'ForecastSpend'}, } def __init__( @@ -365,6 +378,7 @@ def __init__( self.filter = kwargs.get('filter', None) self.current_spend = None self.notifications = kwargs.get('notifications', None) + self.forecast_spend = None class BudgetComparisonExpression(msrest.serialization.Model): @@ -383,7 +397,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 +429,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 +571,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 +584,7 @@ class ChargeSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -580,6 +593,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 +651,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 +669,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 +681,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'}, @@ -712,6 +730,36 @@ def __init__( self.unit = None +class DownloadProperties(msrest.serialization.Model): + """The properties of the price sheet download. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar download_url: The link (url) to download the pricesheet. + :vartype download_url: str + :ivar valid_till: Download link validity. + :vartype valid_till: str + """ + + _validation = { + 'download_url': {'readonly': True}, + 'valid_till': {'readonly': True}, + } + + _attribute_map = { + 'download_url': {'key': 'downloadUrl', 'type': 'str'}, + 'valid_till': {'key': 'validTill', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DownloadProperties, self).__init__(**kwargs) + self.download_url = None + self.valid_till = None + + class ErrorDetails(msrest.serialization.Model): """The details of the error. @@ -811,6 +859,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 +889,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 +905,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 +945,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 +973,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 +985,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 +1068,95 @@ def __init__( self.value = None +class ForecastSpend(msrest.serialization.Model): + """The forecasted cost which is being tracked for a budget. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar amount: The forecasted cost for the total time period which is being tracked by the + budget. This value is only provided if the budget contains a forecast alert type. + :vartype amount: float + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + 'amount': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'amount': {'key': 'amount', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ForecastSpend, self).__init__(**kwargs) + self.amount = None + self.unit = 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 +1170,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 +1197,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 +1213,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 +1290,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 +1305,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 +1316,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 +1336,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 +1358,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 +1368,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 +1377,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 +1403,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 +1412,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 +1429,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 +1461,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 +1790,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 +1803,7 @@ class UsageDetail(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -1644,6 +1812,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 +1842,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 @@ -1728,13 +1899,13 @@ class LegacyUsageDetail(UsageDetail): :ivar consumed_service: Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage. :vartype consumed_service: str - :ivar resource_id: Azure resource manager resource identifier. + :ivar resource_id: Unique identifier of the Azure Resource Manager usage detail resource. :vartype resource_id: str :ivar resource_name: Resource Name. :vartype resource_name: str - :ivar service_info1: Service Info 1. + :ivar service_info1: Service-specific metadata. :vartype service_info1: str - :ivar service_info2: Service Info 2. + :ivar service_info2: Legacy field with optional service-specific metadata. :vartype service_info2: str :ivar additional_info: Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use this field to get usage line item specific details such @@ -1785,6 +1956,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 +2007,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 +2145,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 +2167,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 +2181,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 +2215,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 +2248,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 +2263,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'}, @@ -2114,7 +2295,7 @@ def __init__( class Marketplace(Resource): - """An marketplace resource. + """A marketplace resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2124,6 +2305,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. @@ -2138,6 +2321,8 @@ class Marketplace(Resource): :vartype offer_name: str :ivar resource_group: The name of resource group. :vartype resource_group: str + :ivar additional_info: Additional information. + :vartype additional_info: str :ivar order_number: The order number. :vartype order_number: str :ivar instance_name: The name of the resource instance that the usage is about. @@ -2184,6 +2369,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}, @@ -2191,6 +2377,7 @@ class Marketplace(Resource): 'resource_rate': {'readonly': True}, 'offer_name': {'readonly': True}, 'resource_group': {'readonly': True}, + 'additional_info': {'readonly': True}, 'order_number': {'readonly': True}, 'instance_name': {'readonly': True}, 'instance_id': {'readonly': True}, @@ -2216,6 +2403,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'}, @@ -2223,6 +2411,7 @@ class Marketplace(Resource): 'resource_rate': {'key': 'properties.resourceRate', 'type': 'float'}, 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, @@ -2255,6 +2444,7 @@ def __init__( self.resource_rate = None self.offer_name = None self.resource_group = None + self.additional_info = None self.order_number = None self.instance_name = None self.instance_id = None @@ -2435,6 +2625,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 +2660,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 +2680,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 +2732,19 @@ 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 location_properties_location: Resource Location. + :vartype location_properties_location: str :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. @@ -2571,6 +2769,8 @@ class ModernReservationRecommendation(ReservationRecommendation): :vartype scope: str :ivar sku_properties: List of sku properties. :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty] + :ivar sku_name: This is the ARM Sku name. + :vartype sku_name: str """ _validation = { @@ -2579,8 +2779,10 @@ class ModernReservationRecommendation(ReservationRecommendation): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, + 'location_properties_location': {'readonly': True}, 'look_back_period': {'readonly': True}, 'instance_flexibility_ratio': {'readonly': True}, 'instance_flexibility_group': {'readonly': True}, @@ -2595,6 +2797,7 @@ class ModernReservationRecommendation(ReservationRecommendation): 'first_usage_date': {'readonly': True}, 'scope': {'readonly': True}, 'sku_properties': {'readonly': True}, + 'sku_name': {'readonly': True}, } _attribute_map = { @@ -2603,10 +2806,12 @@ 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'}, + 'location_properties_location': {'key': 'properties.location', 'type': 'str'}, + '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'}, @@ -2619,6 +2824,7 @@ class ModernReservationRecommendation(ReservationRecommendation): 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, 'scope': {'key': 'properties.scope', 'type': 'str'}, 'sku_properties': {'key': 'properties.skuProperties', 'type': '[SkuProperty]'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, } def __init__( @@ -2627,6 +2833,7 @@ def __init__( ): super(ModernReservationRecommendation, self).__init__(**kwargs) self.kind = 'modern' # type: str + self.location_properties_location = None self.look_back_period = None self.instance_flexibility_ratio = None self.instance_flexibility_group = None @@ -2641,6 +2848,7 @@ def __init__( self.first_usage_date = None self.scope = None self.sku_properties = None + self.sku_name = None class ModernReservationTransaction(ReservationTransactionResource): @@ -2826,6 +3034,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 @@ -2894,9 +3104,9 @@ class ModernUsageDetail(UsageDetail): :ivar consumed_service: Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage. :vartype consumed_service: str - :ivar service_info1: Service Info 1. + :ivar service_info1: Service-specific metadata. :vartype service_info1: str - :ivar service_info2: Service Info 2. + :ivar service_info2: Legacy field with optional service-specific metadata. :vartype service_info2: str :ivar additional_info: Additional details of this usage item. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the @@ -2966,8 +3176,8 @@ 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 - purchase . This is the concatenated key of productId and SKuId in partner center. + :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. :vartype resource_location_normalized: str @@ -3006,12 +3216,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 +3292,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 +3367,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 +3441,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 +3459,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 +3479,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 +3504,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 +3512,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 +3521,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 +3536,7 @@ def __init__( **kwargs ): super(Operation, self).__init__(**kwargs) + self.id = None self.name = None self.display = kwargs.get('display', None) @@ -3326,18 +3552,22 @@ class OperationDisplay(msrest.serialization.Model): :vartype resource: str :ivar operation: Operation type: Read, write, delete, etc. :vartype operation: str + :ivar description: Description of the operation. + :vartype description: str """ _validation = { 'provider': {'readonly': True}, 'resource': {'readonly': True}, 'operation': {'readonly': True}, + 'description': {'readonly': True}, } _attribute_map = { 'provider': {'key': 'provider', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } def __init__( @@ -3348,6 +3578,7 @@ def __init__( self.provider = None self.resource = None self.operation = None + self.description = None class OperationListResult(msrest.serialization.Model): @@ -3458,30 +3689,38 @@ 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. :vartype pricesheets: list[~azure.mgmt.consumption.models.PriceSheetProperties] :ivar next_link: The link (url) to the next page of results. :vartype next_link: str + :ivar download: Pricesheet download details. + :vartype download: ~azure.mgmt.consumption.models.MeterDetails """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'pricesheets': {'readonly': True}, 'next_link': {'readonly': True}, + 'download': {'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}'}, 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'download': {'key': 'properties.download', 'type': 'MeterDetails'}, } def __init__( @@ -3491,6 +3730,7 @@ def __init__( super(PriceSheetResult, self).__init__(**kwargs) self.pricesheets = None self.next_link = None + self.download = None class ReservationDetail(Resource): @@ -3504,6 +3744,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 +3786,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 +3805,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 +3934,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 +3962,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 +3976,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'}, @@ -3913,16 +4161,20 @@ class ReservationRecommendationsListResult(msrest.serialization.Model): :vartype value: list[~azure.mgmt.consumption.models.ReservationRecommendation] :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 = { 'value': {'readonly': True}, 'next_link': {'readonly': True}, + 'previous_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[ReservationRecommendation]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'previous_link': {'key': 'previousLink', 'type': 'str'}, } def __init__( @@ -3932,6 +4184,7 @@ def __init__( super(ReservationRecommendationsListResult, self).__init__(**kwargs) self.value = None self.next_link = None + self.previous_link = None class ReservationSummariesListResult(msrest.serialization.Model): @@ -3975,6 +4228,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 +4282,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 +4305,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 +4411,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 +4426,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 +4445,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 +4465,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 +4475,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 aacfd19b6a23..92855cffed9f 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,13 +341,15 @@ 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 :param notifications: Dictionary of notifications associated with the budget. Budget can have up to five notifications. :type notifications: dict[str, ~azure.mgmt.consumption.models.Notification] + :ivar forecast_spend: The forecasted cost which is being tracked for a budget. + :vartype forecast_spend: ~azure.mgmt.consumption.models.ForecastSpend """ _validation = { @@ -346,6 +357,7 @@ class Budget(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'current_spend': {'readonly': True}, + 'forecast_spend': {'readonly': True}, } _attribute_map = { @@ -360,6 +372,7 @@ class Budget(ProxyResource): 'filter': {'key': 'properties.filter', 'type': 'BudgetFilter'}, 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, + 'forecast_spend': {'key': 'properties.forecastSpend', 'type': 'ForecastSpend'}, } def __init__( @@ -382,6 +395,7 @@ def __init__( self.filter = filter self.current_spend = None self.notifications = notifications + self.forecast_spend = None class BudgetComparisonExpression(msrest.serialization.Model): @@ -400,7 +414,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 +450,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 +603,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 +616,7 @@ class ChargeSummary(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -612,6 +625,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 +683,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 +701,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 +713,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'}, @@ -744,6 +762,36 @@ def __init__( self.unit = None +class DownloadProperties(msrest.serialization.Model): + """The properties of the price sheet download. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar download_url: The link (url) to download the pricesheet. + :vartype download_url: str + :ivar valid_till: Download link validity. + :vartype valid_till: str + """ + + _validation = { + 'download_url': {'readonly': True}, + 'valid_till': {'readonly': True}, + } + + _attribute_map = { + 'download_url': {'key': 'downloadUrl', 'type': 'str'}, + 'valid_till': {'key': 'validTill', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DownloadProperties, self).__init__(**kwargs) + self.download_url = None + self.valid_till = None + + class ErrorDetails(msrest.serialization.Model): """The details of the error. @@ -845,6 +893,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 +923,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 +939,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 +981,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 +1009,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 +1021,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 +1109,97 @@ def __init__( self.value = None +class ForecastSpend(msrest.serialization.Model): + """The forecasted cost which is being tracked for a budget. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar amount: The forecasted cost for the total time period which is being tracked by the + budget. This value is only provided if the budget contains a forecast alert type. + :vartype amount: float + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + 'amount': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'amount': {'key': 'amount', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ForecastSpend, self).__init__(**kwargs) + self.amount = None + self.unit = 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 +1213,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 +1240,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 +1256,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 +1333,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 +1348,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 +1359,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 +1379,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 +1401,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 +1411,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 +1420,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 +1446,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 +1455,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 +1472,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 +1504,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 +1833,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 +1846,7 @@ class UsageDetail(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, } @@ -1685,6 +1855,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 +1885,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 @@ -1769,13 +1942,13 @@ class LegacyUsageDetail(UsageDetail): :ivar consumed_service: Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage. :vartype consumed_service: str - :ivar resource_id: Azure resource manager resource identifier. + :ivar resource_id: Unique identifier of the Azure Resource Manager usage detail resource. :vartype resource_id: str :ivar resource_name: Resource Name. :vartype resource_name: str - :ivar service_info1: Service Info 1. + :ivar service_info1: Service-specific metadata. :vartype service_info1: str - :ivar service_info2: Service Info 2. + :ivar service_info2: Legacy field with optional service-specific metadata. :vartype service_info2: str :ivar additional_info: Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use this field to get usage line item specific details such @@ -1826,6 +1999,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 +2050,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 +2188,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 +2210,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 +2224,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 +2258,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 +2291,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 +2306,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'}, @@ -2159,7 +2342,7 @@ def __init__( class Marketplace(Resource): - """An marketplace resource. + """A marketplace resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2169,6 +2352,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. @@ -2183,6 +2368,8 @@ class Marketplace(Resource): :vartype offer_name: str :ivar resource_group: The name of resource group. :vartype resource_group: str + :ivar additional_info: Additional information. + :vartype additional_info: str :ivar order_number: The order number. :vartype order_number: str :ivar instance_name: The name of the resource instance that the usage is about. @@ -2229,6 +2416,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}, @@ -2236,6 +2424,7 @@ class Marketplace(Resource): 'resource_rate': {'readonly': True}, 'offer_name': {'readonly': True}, 'resource_group': {'readonly': True}, + 'additional_info': {'readonly': True}, 'order_number': {'readonly': True}, 'instance_name': {'readonly': True}, 'instance_id': {'readonly': True}, @@ -2261,6 +2450,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'}, @@ -2268,6 +2458,7 @@ class Marketplace(Resource): 'resource_rate': {'key': 'properties.resourceRate', 'type': 'float'}, 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, @@ -2300,6 +2491,7 @@ def __init__( self.resource_rate = None self.offer_name = None self.resource_group = None + self.additional_info = None self.order_number = None self.instance_name = None self.instance_id = None @@ -2480,6 +2672,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 +2707,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 +2727,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 +2779,19 @@ 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 location_properties_location: Resource Location. + :vartype location_properties_location: str :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. @@ -2616,6 +2816,8 @@ class ModernReservationRecommendation(ReservationRecommendation): :vartype scope: str :ivar sku_properties: List of sku properties. :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty] + :ivar sku_name: This is the ARM Sku name. + :vartype sku_name: str """ _validation = { @@ -2624,8 +2826,10 @@ class ModernReservationRecommendation(ReservationRecommendation): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'kind': {'required': True}, + 'location_properties_location': {'readonly': True}, 'look_back_period': {'readonly': True}, 'instance_flexibility_ratio': {'readonly': True}, 'instance_flexibility_group': {'readonly': True}, @@ -2640,6 +2844,7 @@ class ModernReservationRecommendation(ReservationRecommendation): 'first_usage_date': {'readonly': True}, 'scope': {'readonly': True}, 'sku_properties': {'readonly': True}, + 'sku_name': {'readonly': True}, } _attribute_map = { @@ -2648,10 +2853,12 @@ 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'}, + 'location_properties_location': {'key': 'properties.location', 'type': 'str'}, + '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'}, @@ -2664,6 +2871,7 @@ class ModernReservationRecommendation(ReservationRecommendation): 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, 'scope': {'key': 'properties.scope', 'type': 'str'}, 'sku_properties': {'key': 'properties.skuProperties', 'type': '[SkuProperty]'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, } def __init__( @@ -2672,6 +2880,7 @@ def __init__( ): super(ModernReservationRecommendation, self).__init__(**kwargs) self.kind = 'modern' # type: str + self.location_properties_location = None self.look_back_period = None self.instance_flexibility_ratio = None self.instance_flexibility_group = None @@ -2686,6 +2895,7 @@ def __init__( self.first_usage_date = None self.scope = None self.sku_properties = None + self.sku_name = None class ModernReservationTransaction(ReservationTransactionResource): @@ -2871,6 +3081,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 @@ -2939,9 +3151,9 @@ class ModernUsageDetail(UsageDetail): :ivar consumed_service: Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage. :vartype consumed_service: str - :ivar service_info1: Service Info 1. + :ivar service_info1: Service-specific metadata. :vartype service_info1: str - :ivar service_info2: Service Info 2. + :ivar service_info2: Legacy field with optional service-specific metadata. :vartype service_info2: str :ivar additional_info: Additional details of this usage item. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the @@ -3011,8 +3223,8 @@ 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 - purchase . This is the concatenated key of productId and SKuId in partner center. + :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. :vartype resource_location_normalized: str @@ -3051,12 +3263,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 +3339,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 +3414,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 +3488,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 +3506,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 +3526,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 +3549,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 +3567,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 +3576,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 +3593,7 @@ def __init__( **kwargs ): super(Operation, self).__init__(**kwargs) + self.id = None self.name = None self.display = display @@ -3381,18 +3609,22 @@ class OperationDisplay(msrest.serialization.Model): :vartype resource: str :ivar operation: Operation type: Read, write, delete, etc. :vartype operation: str + :ivar description: Description of the operation. + :vartype description: str """ _validation = { 'provider': {'readonly': True}, 'resource': {'readonly': True}, 'operation': {'readonly': True}, + 'description': {'readonly': True}, } _attribute_map = { 'provider': {'key': 'provider', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } def __init__( @@ -3403,6 +3635,7 @@ def __init__( self.provider = None self.resource = None self.operation = None + self.description = None class OperationListResult(msrest.serialization.Model): @@ -3513,30 +3746,38 @@ 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. :vartype pricesheets: list[~azure.mgmt.consumption.models.PriceSheetProperties] :ivar next_link: The link (url) to the next page of results. :vartype next_link: str + :ivar download: Pricesheet download details. + :vartype download: ~azure.mgmt.consumption.models.MeterDetails """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, 'tags': {'readonly': True}, 'pricesheets': {'readonly': True}, 'next_link': {'readonly': True}, + 'download': {'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}'}, 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'download': {'key': 'properties.download', 'type': 'MeterDetails'}, } def __init__( @@ -3546,6 +3787,7 @@ def __init__( super(PriceSheetResult, self).__init__(**kwargs) self.pricesheets = None self.next_link = None + self.download = None class ReservationDetail(Resource): @@ -3559,6 +3801,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 +3843,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 +3862,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 +3993,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 +4021,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 +4035,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,16 +4225,20 @@ class ReservationRecommendationsListResult(msrest.serialization.Model): :vartype value: list[~azure.mgmt.consumption.models.ReservationRecommendation] :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 = { 'value': {'readonly': True}, 'next_link': {'readonly': True}, + 'previous_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[ReservationRecommendation]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'previous_link': {'key': 'previousLink', 'type': 'str'}, } def __init__( @@ -3994,6 +4248,7 @@ def __init__( super(ReservationRecommendationsListResult, self).__init__(**kwargs) self.value = None self.next_link = None + self.previous_link = None class ReservationSummariesListResult(msrest.serialization.Model): @@ -4037,6 +4292,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 +4346,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 +4369,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 +4475,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 +4512,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 +4532,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 +4545,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 ccf5e9b480db..b8f2a1d18698 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 @@ -71,7 +71,7 @@ def get_by_management_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -97,7 +97,7 @@ def get_by_management_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupAggregatedCostResult', pipeline_response) @@ -132,7 +132,7 @@ def get_for_billing_period_by_management_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -157,7 +157,7 @@ def get_for_billing_period_by_management_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupAggregatedCostResult', pipeline_response) @@ -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/_balances_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py index 5556d12d355f..c79d9c0b993d 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 @@ -65,7 +65,7 @@ def get_by_billing_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -89,7 +89,7 @@ def get_by_billing_account( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Balance', pipeline_response) @@ -124,7 +124,7 @@ def get_for_billing_period_by_billing_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -149,7 +149,7 @@ def get_for_billing_period_by_billing_account( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Balance', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py index c50bf7bc303c..e91336af2758 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 @@ -78,7 +78,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -118,7 +118,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -165,7 +165,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -190,7 +190,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Budget', pipeline_response) @@ -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, @@ -242,7 +242,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -272,7 +272,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -323,7 +323,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -348,7 +348,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: 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 52fcba6f0225..93ff4c4df764 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 @@ -96,7 +96,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -128,7 +128,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ChargesListResult', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py index 4a66919ad61d..c4b720b1f194 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 @@ -67,7 +67,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -92,7 +92,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CreditSummary', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py index 60491b1fa499..a780d4acfbd2 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 @@ -74,7 +74,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -117,7 +117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_forecasts_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py index 507a13eb386c..cbf52a189389 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', @@ -67,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -109,7 +111,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_lots_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py index 2ce4ec50c139..0d449f22962a 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 @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -109,7 +109,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_marketplaces_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py index 40e846b0e68a..bb01d19b08ed 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 @@ -90,7 +90,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -136,7 +136,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py index 813dfd60a360..893e726064d8 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_price_sheet_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py index e9a983b25ece..cbd3a98df56d 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 @@ -52,8 +52,8 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.PriceSheetResult" - """Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only - for May 1, 2014 or later. + """Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, + 2014 or later. :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. @@ -74,7 +74,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -104,7 +104,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PriceSheetResult', pipeline_response) @@ -148,7 +148,7 @@ def get_by_billing_period( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -179,7 +179,7 @@ def get_by_billing_period( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PriceSheetResult', pipeline_response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendation_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendation_details_operations.py index 103b363b2977..54242ab672b2 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 @@ -46,8 +46,8 @@ def __init__(self, client, config, serializer, deserializer): def get( self, - billing_scope, # type: str - scope, # type: Union[str, "_models.Scope"] + scope, # type: str + scope1, # type: Union[str, "_models.Scope"] region, # type: str term, # type: Union[str, "_models.Term"] look_back_period, # type: Union[str, "_models.LookBackPeriod"] @@ -57,15 +57,15 @@ def get( # type: (...) -> Optional["_models.ReservationRecommendationDetailsModel"] """Details of a reservation recommendation for what-if analysis of reserved instances. - :param billing_scope: The scope associated with reservation recommendation details operations. - This includes '/subscriptions/{subscriptionId}/' for subscription scope, + :param scope: The scope associated with reservation recommendation details operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope. - :type billing_scope: str - :param scope: Scope of the reservation. - :type scope: str or ~azure.mgmt.consumption.models.Scope + :type scope: str + :param scope1: Scope of the reservation. + :type scope1: str or ~azure.mgmt.consumption.models.Scope :param region: Used to select the region the recommendation should be generated for. :type region: str :param term: Specify length of reservation recommendation term. @@ -86,20 +86,20 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'billingScope': self._serialize.url("billing_scope", billing_scope, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters['scope'] = self._serialize.query("scope1", scope1, 'str') query_parameters['region'] = self._serialize.query("region", region, 'str') query_parameters['term'] = self._serialize.query("term", term, 'str') query_parameters['lookBackPeriod'] = self._serialize.query("look_back_period", look_back_period, 'str') @@ -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.failsafe_deserialize(_models.HighCasedErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -126,4 +126,4 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{billingScope}/providers/Microsoft.Consumption/reservationRecommendationDetails'} # type: ignore + get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails'} # type: ignore 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 4ccabe6916da..adde398c4378 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 @@ -79,7 +79,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -121,7 +121,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200, 204]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_reservation_transactions_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py index 6a880e33d835..5683d09fa65f 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 @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -111,7 +111,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -149,7 +149,7 @@ def list_by_billing_profile( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -192,7 +192,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_reservations_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py index f36ae1dea425..24b11f8a6565 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 @@ -69,7 +69,7 @@ def list_by_reservation_order( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -148,7 +148,7 @@ def list_by_reservation_order_and_reservation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -190,7 +190,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -244,7 +244,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -294,7 +294,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_reservations_summaries_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py index 3a8ed1bb990b..7ee8f3524d23 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 @@ -72,7 +72,7 @@ def list_by_reservation_order( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -115,7 +115,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -156,7 +156,7 @@ def list_by_reservation_order_and_reservation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -200,7 +200,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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) @@ -256,7 +256,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -307,7 +307,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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/operations/_tags_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py index e6cedfb6f459..fabad51171a1 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,15 +65,15 @@ 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 } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" # Construct URL @@ -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) + error = self._deserialize.failsafe_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 ea7090e301f1..0bc51393787b 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 @@ -109,7 +109,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-10-01" + api_version = "2019-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -159,7 +159,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_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)