Skip to content
Closed
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 @@ -21,11 +21,14 @@
from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations
from .operations.budgets_operations import BudgetsOperations
from .operations.price_sheet_operations import PriceSheetOperations
from .operations.cost_tags_operations import CostTagsOperations
from .operations.tags_operations import TagsOperations
from .operations.forecasts_operations import ForecastsOperations
from .operations.operations import Operations
from .operations.aggregated_cost_operations import AggregatedCostOperations
from .operations.charges_by_enrollment_account_operations import ChargesByEnrollmentAccountOperations
from .operations.charges_for_enrollment_account_operations import ChargesForEnrollmentAccountOperations
from .operations.charges_by_department_operations import ChargesByDepartmentOperations
from .operations.charges_for_department_operations import ChargesForDepartmentOperations
from . import models


Expand Down Expand Up @@ -83,8 +86,6 @@ class ConsumptionManagementClient(SDKClient):
:vartype budgets: azure.mgmt.consumption.operations.BudgetsOperations
:ivar price_sheet: PriceSheet operations
:vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations
:ivar cost_tags: CostTags operations
:vartype cost_tags: azure.mgmt.consumption.operations.CostTagsOperations
:ivar tags: Tags operations
:vartype tags: azure.mgmt.consumption.operations.TagsOperations
:ivar forecasts: Forecasts operations
Expand All @@ -93,6 +94,14 @@ class ConsumptionManagementClient(SDKClient):
:vartype operations: azure.mgmt.consumption.operations.Operations
:ivar aggregated_cost: AggregatedCost operations
:vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations
:ivar charges_by_enrollment_account: ChargesByEnrollmentAccount operations
:vartype charges_by_enrollment_account: azure.mgmt.consumption.operations.ChargesByEnrollmentAccountOperations
:ivar charges_for_enrollment_account: ChargesForEnrollmentAccount operations
:vartype charges_for_enrollment_account: azure.mgmt.consumption.operations.ChargesForEnrollmentAccountOperations
:ivar charges_by_department: ChargesByDepartment operations
:vartype charges_by_department: azure.mgmt.consumption.operations.ChargesByDepartmentOperations
:ivar charges_for_department: ChargesForDepartment operations
:vartype charges_for_department: azure.mgmt.consumption.operations.ChargesForDepartmentOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -109,7 +118,7 @@ def __init__(
super(ConsumptionManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-06-30'
self.api_version = '2018-08-31'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -129,8 +138,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.price_sheet = PriceSheetOperations(
self._client, self.config, self._serialize, self._deserialize)
self.cost_tags = CostTagsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.tags = TagsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.forecasts = ForecastsOperations(
Expand All @@ -139,3 +146,11 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.aggregated_cost = AggregatedCostOperations(
self._client, self.config, self._serialize, self._deserialize)
self.charges_by_enrollment_account = ChargesByEnrollmentAccountOperations(
self._client, self.config, self._serialize, self._deserialize)
self.charges_for_enrollment_account = ChargesForEnrollmentAccountOperations(
self._client, self.config, self._serialize, self._deserialize)
self.charges_by_department = ChargesByDepartmentOperations(
self._client, self.config, self._serialize, self._deserialize)
self.charges_for_department = ChargesForDepartmentOperations(
self._client, self.config, self._serialize, self._deserialize)
21 changes: 15 additions & 6 deletions azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@
from .current_spend_py3 import CurrentSpend
from .notification_py3 import Notification
from .budget_py3 import Budget
from .cost_tag_properties_py3 import CostTagProperties
from .cost_tag_py3 import CostTag
from .price_sheet_properties_py3 import PriceSheetProperties
from .price_sheet_result_py3 import PriceSheetResult
from .forecast_properties_confidence_levels_item_py3 import ForecastPropertiesConfidenceLevelsItem
from .forecast_py3 import Forecast
from .management_group_aggregated_cost_result_py3 import ManagementGroupAggregatedCostResult
from .charge_summary_by_enrollment_account_py3 import ChargeSummaryByEnrollmentAccount
from .charges_list_result_by_enrollment_account_py3 import ChargesListResultByEnrollmentAccount
from .charge_summary_by_department_py3 import ChargeSummaryByDepartment
from .charges_list_result_by_department_py3 import ChargesListResultByDepartment
from .charge_summary_properties_py3 import ChargeSummaryProperties
from .error_details_py3 import ErrorDetails
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .operation_display_py3 import OperationDisplay
Expand All @@ -58,13 +61,16 @@
from .current_spend import CurrentSpend
from .notification import Notification
from .budget import Budget
from .cost_tag_properties import CostTagProperties
from .cost_tag import CostTag
from .price_sheet_properties import PriceSheetProperties
from .price_sheet_result import PriceSheetResult
from .forecast_properties_confidence_levels_item import ForecastPropertiesConfidenceLevelsItem
from .forecast import Forecast
from .management_group_aggregated_cost_result import ManagementGroupAggregatedCostResult
from .charge_summary_by_enrollment_account import ChargeSummaryByEnrollmentAccount
from .charges_list_result_by_enrollment_account import ChargesListResultByEnrollmentAccount
from .charge_summary_by_department import ChargeSummaryByDepartment
from .charges_list_result_by_department import ChargesListResultByDepartment
from .charge_summary_properties import ChargeSummaryProperties
from .error_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
from .operation_display import OperationDisplay
Expand Down Expand Up @@ -109,13 +115,16 @@
'CurrentSpend',
'Notification',
'Budget',
'CostTagProperties',
'CostTag',
'PriceSheetProperties',
'PriceSheetResult',
'ForecastPropertiesConfidenceLevelsItem',
'Forecast',
'ManagementGroupAggregatedCostResult',
'ChargeSummaryByEnrollmentAccount',
'ChargesListResultByEnrollmentAccount',
'ChargeSummaryByDepartment',
'ChargesListResultByDepartment',
'ChargeSummaryProperties',
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'OperationDisplay',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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 .resource import Resource


class ChargeSummaryByDepartment(Resource):
"""A charge summary resource by department.

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 billing_period_id: The id of the billing period resource that the
charge belongs to.
:vartype billing_period_id: str
:ivar usage_start: Usage start date.
:vartype usage_start: str
:ivar usage_end: Usage end date.
:vartype usage_end: str
:ivar azure_charges: Azure Charges.
:vartype azure_charges: decimal.Decimal
:ivar charges_billed_separately: Charges Billed separately.
:vartype charges_billed_separately: decimal.Decimal
:ivar marketplace_charges: Marketplace Charges.
:vartype marketplace_charges: decimal.Decimal
:ivar currency: Currency Code
:vartype currency: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'tags': {'readonly': True},
'billing_period_id': {'readonly': True},
'usage_start': {'readonly': True},
'usage_end': {'readonly': True},
'azure_charges': {'readonly': True},
'charges_billed_separately': {'readonly': True},
'marketplace_charges': {'readonly': True},
'currency': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'},
'usage_start': {'key': 'properties.usageStart', 'type': 'str'},
'usage_end': {'key': 'properties.usageEnd', 'type': 'str'},
'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'},
'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'},
'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'},
'currency': {'key': 'properties.currency', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ChargeSummaryByDepartment, self).__init__(**kwargs)
self.billing_period_id = None
self.usage_start = None
self.usage_end = None
self.azure_charges = None
self.charges_billed_separately = None
self.marketplace_charges = None
self.currency = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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 .resource_py3 import Resource


class ChargeSummaryByDepartment(Resource):
"""A charge summary resource by department.

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 billing_period_id: The id of the billing period resource that the
charge belongs to.
:vartype billing_period_id: str
:ivar usage_start: Usage start date.
:vartype usage_start: str
:ivar usage_end: Usage end date.
:vartype usage_end: str
:ivar azure_charges: Azure Charges.
:vartype azure_charges: decimal.Decimal
:ivar charges_billed_separately: Charges Billed separately.
:vartype charges_billed_separately: decimal.Decimal
:ivar marketplace_charges: Marketplace Charges.
:vartype marketplace_charges: decimal.Decimal
:ivar currency: Currency Code
:vartype currency: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'tags': {'readonly': True},
'billing_period_id': {'readonly': True},
'usage_start': {'readonly': True},
'usage_end': {'readonly': True},
'azure_charges': {'readonly': True},
'charges_billed_separately': {'readonly': True},
'marketplace_charges': {'readonly': True},
'currency': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'},
'usage_start': {'key': 'properties.usageStart', 'type': 'str'},
'usage_end': {'key': 'properties.usageEnd', 'type': 'str'},
'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'},
'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'},
'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'},
'currency': {'key': 'properties.currency', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(ChargeSummaryByDepartment, self).__init__(**kwargs)
self.billing_period_id = None
self.usage_start = None
self.usage_end = None
self.azure_charges = None
self.charges_billed_separately = None
self.marketplace_charges = None
self.currency = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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 .resource import Resource


class ChargeSummaryByEnrollmentAccount(Resource):
"""A charge summary resource by enrollment account.

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 billing_period_id: The id of the billing period resource that the
charge belongs to.
:vartype billing_period_id: str
:ivar usage_start: Usage start date.
:vartype usage_start: str
:ivar usage_end: Usage end date.
:vartype usage_end: str
:ivar azure_charges: Azure Charges.
:vartype azure_charges: decimal.Decimal
:ivar charges_billed_separately: Charges Billed separately.
:vartype charges_billed_separately: decimal.Decimal
:ivar marketplace_charges: Marketplace Charges.
:vartype marketplace_charges: decimal.Decimal
:ivar currency: Currency Code
:vartype currency: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'tags': {'readonly': True},
'billing_period_id': {'readonly': True},
'usage_start': {'readonly': True},
'usage_end': {'readonly': True},
'azure_charges': {'readonly': True},
'charges_billed_separately': {'readonly': True},
'marketplace_charges': {'readonly': True},
'currency': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'},
'usage_start': {'key': 'properties.usageStart', 'type': 'str'},
'usage_end': {'key': 'properties.usageEnd', 'type': 'str'},
'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'},
'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'},
'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'},
'currency': {'key': 'properties.currency', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ChargeSummaryByEnrollmentAccount, self).__init__(**kwargs)
self.billing_period_id = None
self.usage_start = None
self.usage_end = None
self.azure_charges = None
self.charges_billed_separately = None
self.marketplace_charges = None
self.currency = None
Loading