Skip to content

Commit bb29028

Browse files
author
SDK Automation
committed
Generated from a97da1274cdd9c686854a274a64570c13d029265
1 parent 5ad658f commit bb29028

File tree

101 files changed

+9332
-5337
lines changed

Some content is hidden

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

101 files changed

+9332
-5337
lines changed
Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
## Microsoft Azure SDK for Python
1+
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Consumption Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
46

5-
Azure Resource Manager (ARM) is the next generation of management APIs
6-
that replace the old Azure Service Management (ASM).
77

8-
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
8+
# Usage
99

10-
For the older Azure Service Management (ASM) libraries, see
11-
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
12-
library.
13-
14-
For a more complete set of Azure libraries, see the
15-
[azure sdk python release](https://aka.ms/azsdk/python/all).
16-
17-
## Usage
18-
19-
For code examples, see
20-
[Consumption](https://docs.microsoft.com/python/api/overview/azure/consumption)
10+
For code examples, see [Consumption](https://docs.microsoft.com/python/api/overview/azure/consumption)
2111
on docs.microsoft.com.
2212

23-
## Provide Feedback
2413

25-
If you encounter any bugs or have suggestions, please file an issue in
26-
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
14+
# Provide Feedback
15+
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2718
section of the project.
2819

29-
![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-consumption%2FREADME.png)
20+
21+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-consumption%2FREADME.png)

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: 41 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,27 @@
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 ReservationRecommendationDetailsOperations
26+
from .operations import ReservationTransactionsOperations
27+
from .operations import PriceSheetOperations
28+
from .operations import ForecastsOperations
29+
from .operations import Operations
30+
from .operations import AggregatedCostOperations
31+
from .operations import EventsOperations
32+
from .operations import LotsOperations
33+
from .operations import CreditsOperations
34+
from . import models
6235

6336

6437
class ConsumptionManagementClient(SDKClient):
@@ -85,6 +58,10 @@ class ConsumptionManagementClient(SDKClient):
8558
:vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations
8659
:ivar reservation_recommendations: ReservationRecommendations operations
8760
:vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations
61+
:ivar reservation_recommendation_details: ReservationRecommendationDetails operations
62+
:vartype reservation_recommendation_details: azure.mgmt.consumption.operations.ReservationRecommendationDetailsOperations
63+
:ivar reservation_transactions: ReservationTransactions operations
64+
:vartype reservation_transactions: azure.mgmt.consumption.operations.ReservationTransactionsOperations
8865
:ivar price_sheet: PriceSheet operations
8966
:vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations
9067
:ivar forecasts: Forecasts operations
@@ -93,6 +70,12 @@ class ConsumptionManagementClient(SDKClient):
9370
:vartype operations: azure.mgmt.consumption.operations.Operations
9471
:ivar aggregated_cost: AggregatedCost operations
9572
:vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations
73+
:ivar events: Events operations
74+
:vartype events: azure.mgmt.consumption.operations.EventsOperations
75+
:ivar lots: Lots operations
76+
:vartype lots: azure.mgmt.consumption.operations.LotsOperations
77+
:ivar credits: Credits operations
78+
:vartype credits: azure.mgmt.consumption.operations.CreditsOperations
9679
9780
:param credentials: Credentials needed for the client to connect to Azure.
9881
:type credentials: :mod:`A msrestazure Credentials
@@ -109,7 +92,7 @@ def __init__(
10992
super(ConsumptionManagementClient, self).__init__(self.config.credentials, self.config)
11093

11194
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
112-
self.api_version = '2019-04-01-preview'
95+
self.api_version = '2019-10-01'
11396
self._serialize = Serializer(client_models)
11497
self._deserialize = Deserializer(client_models)
11598

@@ -131,6 +114,10 @@ def __init__(
131114
self._client, self.config, self._serialize, self._deserialize)
132115
self.reservation_recommendations = ReservationRecommendationsOperations(
133116
self._client, self.config, self._serialize, self._deserialize)
117+
self.reservation_recommendation_details = ReservationRecommendationDetailsOperations(
118+
self._client, self.config, self._serialize, self._deserialize)
119+
self.reservation_transactions = ReservationTransactionsOperations(
120+
self._client, self.config, self._serialize, self._deserialize)
134121
self.price_sheet = PriceSheetOperations(
135122
self._client, self.config, self._serialize, self._deserialize)
136123
self.forecasts = ForecastsOperations(
@@ -139,3 +126,9 @@ def __init__(
139126
self._client, self.config, self._serialize, self._deserialize)
140127
self.aggregated_cost = AggregatedCostOperations(
141128
self._client, self.config, self._serialize, self._deserialize)
129+
self.events = EventsOperations(
130+
self._client, self.config, self._serialize, self._deserialize)
131+
self.lots = LotsOperations(
132+
self._client, self.config, self._serialize, self._deserialize)
133+
self.credits = CreditsOperations(
134+
self._client, self.config, self._serialize, self._deserialize)

0 commit comments

Comments
 (0)