Skip to content

Commit a6567a0

Browse files
azclibotSDKAutoMita GargmsyycBigCat20196
authored
[AutoRelease] t2-consumption-2022-01-06-98359 (#22360)
* CodeGen from PR 17013 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.Consumption to add version stable/2021-10-01 (#17013) * fixing s360 for these * fixing styling issue * Adding 204 to examples * Fixing the model val for reservation by adding proper guid Co-authored-by: Mita Garg <[email protected]> * version,CHANGELOG * test * update dev_requirements.txt * update tests Co-authored-by: SDKAuto <[email protected]> Co-authored-by: Mita Garg <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: msyyc <[email protected]> Co-authored-by: BigCat20196 <[email protected]>
1 parent 2344a63 commit a6567a0

File tree

86 files changed

+5056
-22642
lines changed

Some content is hidden

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

86 files changed

+5056
-22642
lines changed

sdk/consumption/azure-mgmt-consumption/CHANGELOG.md

+100
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,105 @@
11
# Release History
22

3+
## 9.0.0 (2022-01-06)
4+
5+
**Features**
6+
7+
- Added operation EventsOperations.list_by_billing_account
8+
- Added operation EventsOperations.list_by_billing_profile
9+
- Added operation LotsOperations.list_by_billing_account
10+
- Added operation LotsOperations.list_by_billing_profile
11+
- Model Balance has a new parameter etag
12+
- Model Budget has a new parameter forecast_spend
13+
- Model ChargeSummary has a new parameter e_tag
14+
- Model CreditBalanceSummary has a new parameter estimated_balance_in_billing_currency
15+
- Model CreditSummary has a new parameter billing_currency
16+
- Model CreditSummary has a new parameter credit_currency
17+
- Model CreditSummary has a new parameter e_tag
18+
- Model CreditSummary has a new parameter etag
19+
- Model CreditSummary has a new parameter reseller
20+
- Model EventSummary has a new parameter adjustments_in_billing_currency
21+
- Model EventSummary has a new parameter billing_currency
22+
- Model EventSummary has a new parameter billing_profile_display_name
23+
- Model EventSummary has a new parameter billing_profile_id
24+
- Model EventSummary has a new parameter canceled_credit
25+
- Model EventSummary has a new parameter charges_in_billing_currency
26+
- Model EventSummary has a new parameter closed_balance_in_billing_currency
27+
- Model EventSummary has a new parameter credit_currency
28+
- Model EventSummary has a new parameter credit_expired_in_billing_currency
29+
- Model EventSummary has a new parameter e_tag
30+
- Model EventSummary has a new parameter e_tag_properties_e_tag
31+
- Model EventSummary has a new parameter lot_id
32+
- Model EventSummary has a new parameter lot_source
33+
- Model EventSummary has a new parameter new_credit_in_billing_currency
34+
- Model EventSummary has a new parameter reseller
35+
- Model LegacyChargeSummary has a new parameter e_tag
36+
- Model LegacyReservationRecommendation has a new parameter etag
37+
- Model LegacyReservationRecommendation has a new parameter resource_type
38+
- Model LegacyReservationTransaction has a new parameter billing_month
39+
- Model LegacyReservationTransaction has a new parameter monetary_commitment
40+
- Model LegacyReservationTransaction has a new parameter overage
41+
- Model LegacyUsageDetail has a new parameter benefit_id
42+
- Model LegacyUsageDetail has a new parameter benefit_name
43+
- Model LegacyUsageDetail has a new parameter etag
44+
- Model LegacyUsageDetail has a new parameter pay_g_price
45+
- Model LegacyUsageDetail has a new parameter pricing_model
46+
- Model LotSummary has a new parameter billing_currency
47+
- Model LotSummary has a new parameter closed_balance_in_billing_currency
48+
- Model LotSummary has a new parameter credit_currency
49+
- Model LotSummary has a new parameter e_tag
50+
- Model LotSummary has a new parameter e_tag_properties_e_tag
51+
- Model LotSummary has a new parameter original_amount_in_billing_currency
52+
- Model LotSummary has a new parameter purchased_date
53+
- Model LotSummary has a new parameter reseller
54+
- Model LotSummary has a new parameter status
55+
- Model ManagementGroupAggregatedCostResult has a new parameter etag
56+
- Model Marketplace has a new parameter additional_info
57+
- Model Marketplace has a new parameter etag
58+
- Model ModernChargeSummary has a new parameter e_tag
59+
- Model ModernReservationRecommendation has a new parameter etag
60+
- Model ModernReservationRecommendation has a new parameter location_properties_location
61+
- Model ModernReservationRecommendation has a new parameter sku_name
62+
- Model ModernUsageDetail has a new parameter benefit_id
63+
- Model ModernUsageDetail has a new parameter benefit_name
64+
- Model ModernUsageDetail has a new parameter cost_allocation_rule_name
65+
- Model ModernUsageDetail has a new parameter effective_price
66+
- Model ModernUsageDetail has a new parameter etag
67+
- Model ModernUsageDetail has a new parameter pay_g_price
68+
- Model ModernUsageDetail has a new parameter pricing_model
69+
- Model ModernUsageDetail has a new parameter provider
70+
- Model Notification has a new parameter locale
71+
- Model Operation has a new parameter id
72+
- Model OperationDisplay has a new parameter description
73+
- Model PriceSheetResult has a new parameter download
74+
- Model PriceSheetResult has a new parameter etag
75+
- Model ReservationDetail has a new parameter etag
76+
- Model ReservationRecommendation has a new parameter etag
77+
- Model ReservationRecommendationDetailsModel has a new parameter etag
78+
- Model ReservationRecommendationsListResult has a new parameter previous_link
79+
- Model ReservationSummary has a new parameter etag
80+
- Model ReservationTransaction has a new parameter billing_month
81+
- Model ReservationTransaction has a new parameter monetary_commitment
82+
- Model ReservationTransaction has a new parameter overage
83+
- Model Resource has a new parameter etag
84+
- Model Tag has a new parameter value
85+
- Model TagsResult has a new parameter next_link
86+
- Model TagsResult has a new parameter previous_link
87+
- Model UsageDetail has a new parameter etag
88+
89+
**Breaking changes**
90+
91+
- Model ChargeSummary no longer has parameter tags
92+
- Model EventSummary no longer has parameter tags
93+
- Model LegacyChargeSummary no longer has parameter tags
94+
- Model LotSummary no longer has parameter tags
95+
- Model ModernChargeSummary no longer has parameter tags
96+
- Operation ReservationRecommendationDetailsOperations.get has a new signature
97+
- Parameter scope of model LegacyReservationRecommendation is now required
98+
- Parameter scope of model LegacyReservationRecommendation is now required
99+
- Removed operation EventsOperations.list
100+
- Removed operation LotsOperations.list
101+
- Removed operation group ForecastsOperations
102+
3103
## 8.0.0 (2020-12-22)
4104

5105
**Features**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.7.2",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "87c075973362d149fd8e23b31b061692d8c6dd45",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/consumption/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
10+
"readme": "specification/consumption/resource-manager/readme.md"
11+
}

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
__version__ = VERSION
1313
__all__ = ['ConsumptionManagementClient']
1414

15-
try:
16-
from ._patch import patch_sdk # type: ignore
17-
patch_sdk()
18-
except ImportError:
19-
pass
15+
# `._patch.py` is used for handwritten extensions to the generated code
16+
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17+
from ._patch import patch_sdk
18+
patch_sdk()

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

+9-12
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import TYPE_CHECKING
9+
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.configuration import Configuration
1212
from azure.core.pipeline import policies
13-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
13+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1414

1515
from ._version import VERSION
1616

1717
if TYPE_CHECKING:
1818
# pylint: disable=unused-import,ungrouped-imports
19-
from typing import Any
20-
2119
from azure.core.credentials import TokenCredential
2220

2321

@@ -35,20 +33,19 @@ class ConsumptionManagementClientConfiguration(Configuration):
3533

3634
def __init__(
3735
self,
38-
credential, # type: "TokenCredential"
39-
subscription_id, # type: str
40-
**kwargs # type: Any
41-
):
42-
# type: (...) -> None
36+
credential: "TokenCredential",
37+
subscription_id: str,
38+
**kwargs: Any
39+
) -> None:
40+
super(ConsumptionManagementClientConfiguration, self).__init__(**kwargs)
4341
if credential is None:
4442
raise ValueError("Parameter 'credential' must not be None.")
4543
if subscription_id is None:
4644
raise ValueError("Parameter 'subscription_id' must not be None.")
47-
super(ConsumptionManagementClientConfiguration, self).__init__(**kwargs)
4845

4946
self.credential = credential
5047
self.subscription_id = subscription_id
51-
self.api_version = "2019-10-01"
48+
self.api_version = "2021-10-01"
5249
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5350
kwargs.setdefault('sdk_moniker', 'mgmt-consumption/{}'.format(VERSION))
5451
self._configure(**kwargs)
@@ -68,4 +65,4 @@ def _configure(
6865
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
6966
self.authentication_policy = kwargs.get('authentication_policy')
7067
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
68+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

0 commit comments

Comments
 (0)