Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 (
Expand All @@ -46,6 +50,7 @@
'Marketplace',
'ReservationSummaries',
'ReservationDetails',
'ReservationRecommendations',
'BudgetTimePeriod',
'Filters',
'CurrentSpend',
Expand All @@ -56,13 +61,16 @@
'OperationDisplay',
'Operation',
'Resource',
'ResourceAttributes',
'ProxyResource',
'PriceSheetProperties',
'PriceSheetResult',
'QueryOptions',
'UsageDetailPaged',
'MarketplacePaged',
'ReservationSummariesPaged',
'ReservationDetailsPaged',
'ReservationRecommendationsPaged',
'BudgetPaged',
'OperationPaged',
'CategoryType',
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 <azure.mgmt.consumption.models.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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,6 +23,7 @@
'MarketplacesOperations',
'ReservationsSummariesOperations',
'ReservationsDetailsOperations',
'ReservationRecommendationsOperations',
'BudgetsOperations',
'Operations',
'PriceSheetOperations',
Expand Down
Loading