Skip to content

Commit ff204b5

Browse files
author
SDK Automation
committed
Generated from 771a3b26df8ce4602832c92223eda0cf71129355
Update from latest master
1 parent 15890a6 commit ff204b5

File tree

98 files changed

+7721
-5263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+7721
-5263
lines changed

sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .consumption_management_client import ConsumptionManagementClient
13-
from .version import VERSION
12+
from ._configuration import ConsumptionManagementClientConfiguration
13+
from ._consumption_management_client import ConsumptionManagementClient
14+
__all__ = ['ConsumptionManagementClient', 'ConsumptionManagementClientConfiguration']
1415

15-
__all__ = ['ConsumptionManagementClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class ConsumptionManagementClientConfiguration(AzureConfiguration):
17+
"""Configuration for ConsumptionManagementClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: Azure Subscription ID.
25+
:type subscription_id: str
26+
:param str base_url: Service URL
27+
"""
28+
29+
def __init__(
30+
self, credentials, subscription_id, base_url=None):
31+
32+
if credentials is None:
33+
raise ValueError("Parameter 'credentials' must not be None.")
34+
if subscription_id is None:
35+
raise ValueError("Parameter 'subscription_id' must not be None.")
36+
if not base_url:
37+
base_url = 'https://management.azure.com'
38+
39+
super(ConsumptionManagementClientConfiguration, self).__init__(base_url)
40+
41+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
42+
self.keep_alive = True
43+
44+
self.add_user_agent('azure-mgmt-consumption/{}'.format(VERSION))
45+
self.add_user_agent('Azure-SDK-For-Python')
46+
47+
self.credentials = credentials
48+
self.subscription_id = subscription_id
Lines changed: 36 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,26 @@
1111

1212
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
14-
from msrestazure import AzureConfiguration
15-
from .version import VERSION
16-
from .operations.usage_details_operations import UsageDetailsOperations
17-
from .operations.marketplaces_operations import MarketplacesOperations
18-
from .operations.budgets_operations import BudgetsOperations
19-
from .operations.tags_operations import TagsOperations
20-
from .operations.charges_operations import ChargesOperations
21-
from .operations.balances_operations import BalancesOperations
22-
from .operations.reservations_summaries_operations import ReservationsSummariesOperations
23-
from .operations.reservations_details_operations import ReservationsDetailsOperations
24-
from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations
25-
from .operations.price_sheet_operations import PriceSheetOperations
26-
from .operations.forecasts_operations import ForecastsOperations
27-
from .operations.operations import Operations
28-
from .operations.aggregated_cost_operations import AggregatedCostOperations
29-
from . import models
30-
31-
32-
class ConsumptionManagementClientConfiguration(AzureConfiguration):
33-
"""Configuration for ConsumptionManagementClient
34-
Note that all parameters used to create this instance are saved as instance
35-
attributes.
36-
37-
:param credentials: Credentials needed for the client to connect to Azure.
38-
:type credentials: :mod:`A msrestazure Credentials
39-
object<msrestazure.azure_active_directory>`
40-
:param subscription_id: Azure Subscription ID.
41-
:type subscription_id: str
42-
:param str base_url: Service URL
43-
"""
4414

45-
def __init__(
46-
self, credentials, subscription_id, base_url=None):
47-
48-
if credentials is None:
49-
raise ValueError("Parameter 'credentials' must not be None.")
50-
if subscription_id is None:
51-
raise ValueError("Parameter 'subscription_id' must not be None.")
52-
if not base_url:
53-
base_url = 'https://management.azure.com'
54-
55-
super(ConsumptionManagementClientConfiguration, self).__init__(base_url)
56-
57-
self.add_user_agent('azure-mgmt-consumption/{}'.format(VERSION))
58-
self.add_user_agent('Azure-SDK-For-Python')
59-
60-
self.credentials = credentials
61-
self.subscription_id = subscription_id
15+
from ._configuration import ConsumptionManagementClientConfiguration
16+
from .operations import UsageDetailsOperations
17+
from .operations import MarketplacesOperations
18+
from .operations import BudgetsOperations
19+
from .operations import TagsOperations
20+
from .operations import ChargesOperations
21+
from .operations import BalancesOperations
22+
from .operations import ReservationsSummariesOperations
23+
from .operations import ReservationsDetailsOperations
24+
from .operations import ReservationRecommendationsOperations
25+
from .operations import ReservationTransactionsOperations
26+
from .operations import PriceSheetOperations
27+
from .operations import ForecastsOperations
28+
from .operations import Operations
29+
from .operations import AggregatedCostOperations
30+
from .operations import EventsOperations
31+
from .operations import LotsOperations
32+
from .operations import CreditsOperations
33+
from . import models
6234

6335

6436
class ConsumptionManagementClient(SDKClient):
@@ -85,6 +57,8 @@ class ConsumptionManagementClient(SDKClient):
8557
:vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations
8658
:ivar reservation_recommendations: ReservationRecommendations operations
8759
:vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations
60+
:ivar reservation_transactions: ReservationTransactions operations
61+
:vartype reservation_transactions: azure.mgmt.consumption.operations.ReservationTransactionsOperations
8862
:ivar price_sheet: PriceSheet operations
8963
:vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations
9064
:ivar forecasts: Forecasts operations
@@ -93,6 +67,12 @@ class ConsumptionManagementClient(SDKClient):
9367
:vartype operations: azure.mgmt.consumption.operations.Operations
9468
:ivar aggregated_cost: AggregatedCost operations
9569
:vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations
70+
:ivar events: Events operations
71+
:vartype events: azure.mgmt.consumption.operations.EventsOperations
72+
:ivar lots: Lots operations
73+
:vartype lots: azure.mgmt.consumption.operations.LotsOperations
74+
:ivar credits: Credits operations
75+
:vartype credits: azure.mgmt.consumption.operations.CreditsOperations
9676
9777
:param credentials: Credentials needed for the client to connect to Azure.
9878
:type credentials: :mod:`A msrestazure Credentials
@@ -109,7 +89,7 @@ def __init__(
10989
super(ConsumptionManagementClient, self).__init__(self.config.credentials, self.config)
11090

11191
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
112-
self.api_version = '2019-04-01-preview'
92+
self.api_version = '2019-10-01'
11393
self._serialize = Serializer(client_models)
11494
self._deserialize = Deserializer(client_models)
11595

@@ -131,6 +111,8 @@ def __init__(
131111
self._client, self.config, self._serialize, self._deserialize)
132112
self.reservation_recommendations = ReservationRecommendationsOperations(
133113
self._client, self.config, self._serialize, self._deserialize)
114+
self.reservation_transactions = ReservationTransactionsOperations(
115+
self._client, self.config, self._serialize, self._deserialize)
134116
self.price_sheet = PriceSheetOperations(
135117
self._client, self.config, self._serialize, self._deserialize)
136118
self.forecasts = ForecastsOperations(
@@ -139,3 +121,9 @@ def __init__(
139121
self._client, self.config, self._serialize, self._deserialize)
140122
self.aggregated_cost = AggregatedCostOperations(
141123
self._client, self.config, self._serialize, self._deserialize)
124+
self.events = EventsOperations(
125+
self._client, self.config, self._serialize, self._deserialize)
126+
self.lots = LotsOperations(
127+
self._client, self.config, self._serialize, self._deserialize)
128+
self.credits = CreditsOperations(
129+
self._client, self.config, self._serialize, self._deserialize)

0 commit comments

Comments
 (0)