Skip to content

Commit cbe4fdc

Browse files
author
SDKAuto
committed
CodeGen from PR 13967 in Azure/azure-rest-api-specs
Cost Management: Reservation Recommendations API: Add multiple missing properties in specs (Azure#13967) * added totalCost, properties.resourceType, properties.subscriptionId, and eTag to various RiRec dfinitions * moving eTag property to right place * remove duplicate description
1 parent eae413d commit cbe4fdc

File tree

101 files changed

+10007
-5325
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

+10007
-5325
lines changed

sdk/consumption/azure-mgmt-consumption/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "V2",
3+
"use": "@microsoft.azure/autorest.python@~4.0.71",
4+
"commit": "ccdfdc5b6ef7ea03f3247626a91443d5a555e946",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/consumption/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/autorest.python@~4.0.71 --version=V2",
7+
"readme": "specification/consumption/resource-manager/readme.md"
8+
}

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

sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py renamed to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py

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-11-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)