From adbecc607e6c3a4977b257021cbb2dc224993135 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 16 Mar 2018 01:56:59 +0000 Subject: [PATCH 1/3] Generated from b41bd12a098b753304ab32f0dd5df115ae62821f Merge remote-tracking branch 'upstream/master' --- .../consumption_management_client.py | 5 + .../azure/mgmt/consumption/models/__init__.py | 8 ++ .../mgmt/consumption/models/query_options.py | 26 +++++ .../models/reservation_recommendations.py | 108 ++++++++++++++++++ .../reservation_recommendations_paged.py | 27 +++++ .../consumption/models/resource_attributes.py | 40 +++++++ .../mgmt/consumption/operations/__init__.py | 2 + .../reservation_recommendations_operations.py | 102 +++++++++++++++++ .../operations/usage_details_operations.py | 30 ++++- 9 files changed, 343 insertions(+), 5 deletions(-) create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/query_options.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations_paged.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py b/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py index 7f9dd828fe5a..d197daccd705 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py @@ -17,6 +17,7 @@ from .operations.marketplaces_operations import MarketplacesOperations from .operations.reservations_summaries_operations import ReservationsSummariesOperations from .operations.reservations_details_operations import ReservationsDetailsOperations +from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations from .operations.budgets_operations import BudgetsOperations from .operations.operations import Operations from .operations.price_sheet_operations import PriceSheetOperations @@ -75,6 +76,8 @@ class ConsumptionManagementClient(object): :vartype reservations_summaries: azure.mgmt.consumption.operations.ReservationsSummariesOperations :ivar reservations_details: ReservationsDetails operations :vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations + :ivar reservation_recommendations: ReservationRecommendations operations + :vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations :ivar budgets: Budgets operations :vartype budgets: azure.mgmt.consumption.operations.BudgetsOperations :ivar operations: Operations operations @@ -112,6 +115,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.reservations_details = ReservationsDetailsOperations( self._client, self.config, self._serialize, self._deserialize) + self.reservation_recommendations = ReservationRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.budgets = BudgetsOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py index 2b8cf0ae1787..5a6c78695c3c 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py @@ -14,6 +14,7 @@ from .marketplace import Marketplace from .reservation_summaries import ReservationSummaries from .reservation_details import ReservationDetails +from .reservation_recommendations import ReservationRecommendations from .budget_time_period import BudgetTimePeriod from .filters import Filters from .current_spend import CurrentSpend @@ -24,13 +25,16 @@ from .operation_display import OperationDisplay from .operation import Operation from .resource import Resource +from .resource_attributes import ResourceAttributes from .proxy_resource import ProxyResource from .price_sheet_properties import PriceSheetProperties from .price_sheet_result import PriceSheetResult +from .query_options import QueryOptions from .usage_detail_paged import UsageDetailPaged from .marketplace_paged import MarketplacePaged from .reservation_summaries_paged import ReservationSummariesPaged from .reservation_details_paged import ReservationDetailsPaged +from .reservation_recommendations_paged import ReservationRecommendationsPaged from .budget_paged import BudgetPaged from .operation_paged import OperationPaged from .consumption_management_client_enums import ( @@ -46,6 +50,7 @@ 'Marketplace', 'ReservationSummaries', 'ReservationDetails', + 'ReservationRecommendations', 'BudgetTimePeriod', 'Filters', 'CurrentSpend', @@ -56,13 +61,16 @@ 'OperationDisplay', 'Operation', 'Resource', + 'ResourceAttributes', 'ProxyResource', 'PriceSheetProperties', 'PriceSheetResult', + 'QueryOptions', 'UsageDetailPaged', 'MarketplacePaged', 'ReservationSummariesPaged', 'ReservationDetailsPaged', + 'ReservationRecommendationsPaged', 'BudgetPaged', 'OperationPaged', 'CategoryType', diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options.py new file mode 100644 index 000000000000..2cd0e67b848e --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QueryOptions(Model): + """Additional parameters for a set of operations, such as: UsageDetails_list, + UsageDetails_list_by_billing_period. + + :param apply: OData apply expression to aggregatie usageDetails by tags or + (tags and properties/usageStart) + :type apply: str + """ + + def __init__(self, apply=None): + super(QueryOptions, self).__init__() + self.apply = apply diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py new file mode 100644 index 000000000000..9394ae059f2c --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReservationRecommendations(Model): + """Reservation recommendations resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :ivar look_back_period: The number of days of usage to look back for + recommendations. + :vartype look_back_period: str + :ivar meter_id: The meter id (GUID) + :vartype meter_id: 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. + :vartype cost_with_no_reserved_instances: decimal.Decimal + :ivar recommended_quantity: Recomended quality for reserved instances. + :vartype recommended_quantity: decimal.Decimal + :ivar total_cost_with_reserved_instances: The total amount of cost with + reserved instances. + :vartype total_cost_with_reserved_instances: decimal.Decimal + :ivar net_savings: Total estimated savings with reserved instances. + :vartype net_savings: decimal.Decimal + :ivar first_usage_date: The usage date for looking back. + :vartype first_usage_date: datetime + :ivar scope: Shared or single recommendation. + :vartype scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'look_back_period': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'term': {'readonly': True}, + 'cost_with_no_reserved_instances': {'readonly': True}, + 'recommended_quantity': {'readonly': True}, + 'total_cost_with_reserved_instances': {'readonly': True}, + 'net_savings': {'readonly': True}, + 'first_usage_date': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, + 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, + 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, + 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self): + super(ReservationRecommendations, self).__init__() + self.id = None + self.name = None + self.type = None + self.tags = None + self.location = None + self.sku = None + self.look_back_period = None + self.meter_id = None + self.term = None + self.cost_with_no_reserved_instances = None + self.recommended_quantity = None + self.total_cost_with_reserved_instances = None + self.net_savings = None + self.first_usage_date = None + self.scope = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations_paged.py new file mode 100644 index 000000000000..1de385dbeab9 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ReservationRecommendationsPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationRecommendations ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationRecommendations]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationRecommendationsPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py new file mode 100644 index 000000000000..ecfb70e1b03c --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceAttributes(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + """ + + _validation = { + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self): + super(ResourceAttributes, self).__init__() + self.location = None + self.sku = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py index cb1dff45a8f9..3558f88f9eb6 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py @@ -13,6 +13,7 @@ from .marketplaces_operations import MarketplacesOperations from .reservations_summaries_operations import ReservationsSummariesOperations from .reservations_details_operations import ReservationsDetailsOperations +from .reservation_recommendations_operations import ReservationRecommendationsOperations from .budgets_operations import BudgetsOperations from .operations import Operations from .price_sheet_operations import PriceSheetOperations @@ -22,6 +23,7 @@ 'MarketplacesOperations', 'ReservationsSummariesOperations', 'ReservationsDetailsOperations', + 'ReservationRecommendationsOperations', 'BudgetsOperations', 'Operations', 'PriceSheetOperations', diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py new file mode 100644 index 000000000000..f6e460d8013a --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ReservationRecommendationsOperations(object): + """ReservationRecommendationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-03-31. Constant value: "2018-03-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-31" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """List of recomendations for purchasing reserved instances. + + :param filter: May be used to filter reservationRecommendations by + properties/scope and properties/lookBackPeriod. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationRecommendations + :rtype: + ~azure.mgmt.consumption.models.ReservationRecommendationsPaged[~azure.mgmt.consumption.models.ReservationRecommendations] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ReservationRecommendationsPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ReservationRecommendationsPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py index de5ee51b5b77..fef1b3fc2402 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, expand=None, filter=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): + self, expand=None, filter=None, skiptoken=None, top=None, query_options=None, custom_headers=None, raw=False, **operation_config): """Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. @@ -48,9 +48,11 @@ def list( :type expand: str :param filter: May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), - properties/resourceGroup, properties/instanceName or - properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', - 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + properties/resourceGroup, properties/instanceName, + properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', + 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or + 'not'. Tag filter is a key value pair string where key and value is + separated by a colon (:). :type filter: str :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink @@ -60,6 +62,8 @@ def list( :param top: May be used to limit the number of results to the most recent N usageDetails. :type top: int + :param query_options: Additional parameters for the operation + :type query_options: ~azure.mgmt.consumption.models.QueryOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -71,6 +75,10 @@ def list( :raises: :class:`ErrorResponseException` """ + apply = None + if query_options is not None: + apply = query_options.apply + def internal_paging(next_link=None, raw=False): if not next_link: @@ -92,6 +100,8 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if apply is not None: + query_parameters['$apply'] = self._serialize.query("apply", apply, 'str') else: url = next_link @@ -129,7 +139,7 @@ def internal_paging(next_link=None, raw=False): list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/usageDetails'} def list_by_billing_period( - self, billing_period_name, expand=None, filter=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): + self, billing_period_name, expand=None, filter=None, skiptoken=None, top=None, query_options=None, custom_headers=None, raw=False, **operation_config): """Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. @@ -145,6 +155,8 @@ def list_by_billing_period( properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + Tag filter is a key value pair string where key and value is separated + by a colon (:). :type filter: str :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink @@ -154,6 +166,8 @@ def list_by_billing_period( :param top: May be used to limit the number of results to the most recent N usageDetails. :type top: int + :param query_options: Additional parameters for the operation + :type query_options: ~azure.mgmt.consumption.models.QueryOptions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -165,6 +179,10 @@ def list_by_billing_period( :raises: :class:`ErrorResponseException` """ + apply = None + if query_options is not None: + apply = query_options.apply + def internal_paging(next_link=None, raw=False): if not next_link: @@ -187,6 +205,8 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if apply is not None: + query_parameters['$apply'] = self._serialize.query("apply", apply, 'str') else: url = next_link From 06ab4d8222770a63b34047303345564f3f768a96 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 16 Mar 2018 18:13:56 +0000 Subject: [PATCH 2/3] Generated from 7956270d0054fb05a9eeb04f0b07631d6eecb85a Incorporated review comments Incorporated review comments --- .../mgmt/consumption/models/reservation_recommendations.py | 4 ++-- .../operations/reservation_recommendations_operations.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py index 9394ae059f2c..3ce1263af2f0 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py @@ -48,7 +48,7 @@ class ReservationRecommendations(Model): :ivar net_savings: Total estimated savings with reserved instances. :vartype net_savings: decimal.Decimal :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: datetime + :vartype first_usage_date: date :ivar scope: Shared or single recommendation. :vartype scope: str """ @@ -85,7 +85,7 @@ class ReservationRecommendations(Model): 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'date'}, 'scope': {'key': 'properties.scope', 'type': 'str'}, } diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py index f6e460d8013a..4682cd7351af 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py @@ -59,6 +59,10 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} From 9d75112c284a7ac06a4d869e9e57ea91e6660ece Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 16 Mar 2018 18:39:59 +0000 Subject: [PATCH 3/3] Generated from 346ce83ba204f6477c49eb86f0917514db99ad81 Incorporated review comments Incorporated review comments --- .../mgmt/consumption/models/reservation_recommendations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py index 3ce1263af2f0..9394ae059f2c 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendations.py @@ -48,7 +48,7 @@ class ReservationRecommendations(Model): :ivar net_savings: Total estimated savings with reserved instances. :vartype net_savings: decimal.Decimal :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: date + :vartype first_usage_date: datetime :ivar scope: Shared or single recommendation. :vartype scope: str """ @@ -85,7 +85,7 @@ class ReservationRecommendations(Model): 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'date'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, 'scope': {'key': 'properties.scope', 'type': 'str'}, }