Skip to content

Commit

Permalink
[AutoRelease] t2-consumption-2022-01-06-98359 (Azure#22360)
Browse files Browse the repository at this point in the history
* CodeGen from PR 17013 in Azure/azure-rest-api-specs
[Hub Generated] Review request for Microsoft.Consumption to add version stable/2021-10-01 (Azure#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 <v-migarg@microsoft.com>

* version,CHANGELOG

* test

* update dev_requirements.txt

* update tests

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: Mita Garg <v-migarg@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: BigCat20196 <1095260342@qq.com>
  • Loading branch information
5 people authored Jan 6, 2022
1 parent 2344a63 commit a6567a0
Show file tree
Hide file tree
Showing 86 changed files with 5,056 additions and 22,642 deletions.
100 changes: 100 additions & 0 deletions sdk/consumption/azure-mgmt-consumption/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,105 @@
# Release History

## 9.0.0 (2022-01-06)

**Features**

- Added operation EventsOperations.list_by_billing_account
- Added operation EventsOperations.list_by_billing_profile
- Added operation LotsOperations.list_by_billing_account
- Added operation LotsOperations.list_by_billing_profile
- Model Balance has a new parameter etag
- Model Budget has a new parameter forecast_spend
- Model ChargeSummary has a new parameter e_tag
- Model CreditBalanceSummary has a new parameter estimated_balance_in_billing_currency
- Model CreditSummary has a new parameter billing_currency
- Model CreditSummary has a new parameter credit_currency
- Model CreditSummary has a new parameter e_tag
- Model CreditSummary has a new parameter etag
- Model CreditSummary has a new parameter reseller
- Model EventSummary has a new parameter adjustments_in_billing_currency
- Model EventSummary has a new parameter billing_currency
- Model EventSummary has a new parameter billing_profile_display_name
- Model EventSummary has a new parameter billing_profile_id
- Model EventSummary has a new parameter canceled_credit
- Model EventSummary has a new parameter charges_in_billing_currency
- Model EventSummary has a new parameter closed_balance_in_billing_currency
- Model EventSummary has a new parameter credit_currency
- Model EventSummary has a new parameter credit_expired_in_billing_currency
- Model EventSummary has a new parameter e_tag
- Model EventSummary has a new parameter e_tag_properties_e_tag
- Model EventSummary has a new parameter lot_id
- Model EventSummary has a new parameter lot_source
- Model EventSummary has a new parameter new_credit_in_billing_currency
- Model EventSummary has a new parameter reseller
- Model LegacyChargeSummary has a new parameter e_tag
- Model LegacyReservationRecommendation has a new parameter etag
- Model LegacyReservationRecommendation has a new parameter resource_type
- Model LegacyReservationTransaction has a new parameter billing_month
- Model LegacyReservationTransaction has a new parameter monetary_commitment
- Model LegacyReservationTransaction has a new parameter overage
- Model LegacyUsageDetail has a new parameter benefit_id
- Model LegacyUsageDetail has a new parameter benefit_name
- Model LegacyUsageDetail has a new parameter etag
- Model LegacyUsageDetail has a new parameter pay_g_price
- Model LegacyUsageDetail has a new parameter pricing_model
- Model LotSummary has a new parameter billing_currency
- Model LotSummary has a new parameter closed_balance_in_billing_currency
- Model LotSummary has a new parameter credit_currency
- Model LotSummary has a new parameter e_tag
- Model LotSummary has a new parameter e_tag_properties_e_tag
- Model LotSummary has a new parameter original_amount_in_billing_currency
- Model LotSummary has a new parameter purchased_date
- Model LotSummary has a new parameter reseller
- Model LotSummary has a new parameter status
- Model ManagementGroupAggregatedCostResult has a new parameter etag
- Model Marketplace has a new parameter additional_info
- Model Marketplace has a new parameter etag
- Model ModernChargeSummary has a new parameter e_tag
- Model ModernReservationRecommendation has a new parameter etag
- Model ModernReservationRecommendation has a new parameter location_properties_location
- Model ModernReservationRecommendation has a new parameter sku_name
- Model ModernUsageDetail has a new parameter benefit_id
- Model ModernUsageDetail has a new parameter benefit_name
- Model ModernUsageDetail has a new parameter cost_allocation_rule_name
- Model ModernUsageDetail has a new parameter effective_price
- Model ModernUsageDetail has a new parameter etag
- Model ModernUsageDetail has a new parameter pay_g_price
- Model ModernUsageDetail has a new parameter pricing_model
- Model ModernUsageDetail has a new parameter provider
- Model Notification has a new parameter locale
- Model Operation has a new parameter id
- Model OperationDisplay has a new parameter description
- Model PriceSheetResult has a new parameter download
- Model PriceSheetResult has a new parameter etag
- Model ReservationDetail has a new parameter etag
- Model ReservationRecommendation has a new parameter etag
- Model ReservationRecommendationDetailsModel has a new parameter etag
- Model ReservationRecommendationsListResult has a new parameter previous_link
- Model ReservationSummary has a new parameter etag
- Model ReservationTransaction has a new parameter billing_month
- Model ReservationTransaction has a new parameter monetary_commitment
- Model ReservationTransaction has a new parameter overage
- Model Resource has a new parameter etag
- Model Tag has a new parameter value
- Model TagsResult has a new parameter next_link
- Model TagsResult has a new parameter previous_link
- Model UsageDetail has a new parameter etag

**Breaking changes**

- Model ChargeSummary no longer has parameter tags
- Model EventSummary no longer has parameter tags
- Model LegacyChargeSummary no longer has parameter tags
- Model LotSummary no longer has parameter tags
- Model ModernChargeSummary no longer has parameter tags
- Operation ReservationRecommendationDetailsOperations.get has a new signature
- Parameter scope of model LegacyReservationRecommendation is now required
- Parameter scope of model LegacyReservationRecommendation is now required
- Removed operation EventsOperations.list
- Removed operation LotsOperations.list
- Removed operation group ForecastsOperations

## 8.0.0 (2020-12-22)

**Features**
Expand Down
11 changes: 11 additions & 0 deletions sdk/consumption/azure-mgmt-consumption/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "87c075973362d149fd8e23b31b061692d8c6dd45",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/consumption/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
__version__ = VERSION
__all__ = ['ConsumptionManagementClient']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


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

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
):
# type: (...) -> None
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
) -> None:
super(ConsumptionManagementClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(ConsumptionManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2019-10-01"
self.api_version = "2021-10-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-consumption/{}'.format(VERSION))
self._configure(**kwargs)
Expand All @@ -68,4 +65,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit a6567a0

Please sign in to comment.