Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
142 changes: 142 additions & 0 deletions sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,147 @@
# Release History

## 5.0.0 (2025-04-05)

### Features Added

- Client `CostManagementClient` added operation group `cost_allocation_rules`
- Client `CostManagementClient` added operation group `generate_benefit_utilization_summaries_report`
- Client `CostManagementClient` added operation group `budgets`
- Client `CostManagementClient` added operation group `settings`
- Model `CommonExportProperties` added property `data_overwrite_behavior`
- Model `CommonExportProperties` added property `compression_mode`
- Model `CommonExportProperties` added property `export_description`
- Model `CommonExportProperties` added property `system_suspension_context`
- Model `Export` added property `identity`
- Model `Export` added property `location`
- Model `Export` added property `data_overwrite_behavior`
- Model `Export` added property `compression_mode`
- Model `Export` added property `export_description`
- Model `Export` added property `system_suspension_context`
- Model `ExportDatasetConfiguration` added property `data_version`
- Model `ExportDatasetConfiguration` added property `filters`
- Model `ExportDeliveryDestination` added property `type`
- Model `ExportProperties` added property `data_overwrite_behavior`
- Model `ExportProperties` added property `compression_mode`
- Model `ExportProperties` added property `export_description`
- Model `ExportProperties` added property `system_suspension_context`
- Model `ExportRun` added property `start_date`
- Model `ExportRun` added property `end_date`
- Model `ExportRun` added property `manifest_file`
- Enum `ExportType` added member `FOCUS_COST`
- Enum `ExportType` added member `PRICE_SHEET`
- Enum `ExportType` added member `RESERVATION_DETAILS`
- Enum `ExportType` added member `RESERVATION_RECOMMENDATIONS`
- Enum `ExportType` added member `RESERVATION_TRANSACTIONS`
- Enum `FormatType` added member `PARQUET`
- Enum `GranularityType` added member `MONTHLY`
- Enum `OperationStatusType` added member `COMPLETE`
- Enum `TimeframeType` added member `THE_CURRENT_MONTH`
- Added model `AsyncOperationStatusProperties`
- Added model `BenefitUtilizationSummariesOperationStatus`
- Added model `BenefitUtilizationSummariesRequest`
- Added enum `BenefitUtilizationSummaryReportSchema`
- Added model `Budget`
- Added model `BudgetComparisonExpression`
- Added model `BudgetFilter`
- Added model `BudgetFilterProperties`
- Added enum `BudgetNotificationOperatorType`
- Added enum `BudgetOperatorType`
- Added model `BudgetTimePeriod`
- Added model `BudgetsListResult`
- Added enum `CategoryType`
- Added enum `CompressionModeType`
- Added enum `CostAllocationPolicyType`
- Added model `CostAllocationProportion`
- Added model `CostAllocationResource`
- Added enum `CostAllocationResourceType`
- Added model `CostAllocationRuleCheckNameAvailabilityRequest`
- Added model `CostAllocationRuleCheckNameAvailabilityResponse`
- Added model `CostAllocationRuleDefinition`
- Added model `CostAllocationRuleDetails`
- Added model `CostAllocationRuleList`
- Added model `CostAllocationRuleProperties`
- Added enum `CultureCode`
- Added model `CurrentSpend`
- Added enum `DataOverwriteBehaviorType`
- Added enum `DestinationType`
- Added model `EAPriceSheetProperties`
- Added model `ErrorAdditionalInfo`
- Added model `ErrorDetail`
- Added model `ErrorDetailAutoGenerated`
- Added model `ErrorResponseAutoGenerated`
- Added model `ErrorResponseAutoGenerated2`
- Added model `ExportRunRequest`
- Added model `ExportSuspensionContext`
- Added enum `FilterItemNames`
- Added model `FilterItems`
- Added model `ForecastSpend`
- Added enum `Frequency`
- Added model `MCAPriceSheetProperties`
- Added model `Notification`
- Added model `OperationStatusAutoGenerated`
- Added model `PricesheetDownloadProperties`
- Added enum `Reason`
- Added enum `RuleStatus`
- Added model `Setting`
- Added enum `SettingType`
- Added enum `SettingsKind`
- Added model `SettingsListResult`
- Added model `SourceCostAllocationResource`
- Added model `SystemAssignedServiceIdentity`
- Added enum `SystemAssignedServiceIdentityType`
- Added model `TagInheritanceProperties`
- Added model `TagInheritanceSetting`
- Added model `TargetCostAllocationResource`
- Added enum `ThresholdType`
- Added enum `TimeGrainType`
- Model `PriceSheetOperations` added method `begin_download_by_billing_account`
- Model `PriceSheetOperations` added method `begin_download_by_invoice`
- Added model `BudgetsOperations`
- Added model `CostAllocationRulesOperations`
- Added model `GenerateBenefitUtilizationSummariesReportOperations`
- Added model `SettingsOperations`
- Method `AlertsOperations.dismiss` has a new overload `def dismiss(self: None, scope: str, alert_id: str, parameters: IO[bytes], content_type: str)`
- Method `ExportsOperations.create_or_update` has a new overload `def create_or_update(self: None, scope: str, export_name: str, parameters: IO[bytes], content_type: str)`
- Method `ExportsOperations.execute` has a new overload `def execute(self: None, scope: str, export_name: str, parameters: Optional[ExportRunRequest], content_type: str)`
- Method `ExportsOperations.execute` has a new overload `def execute(self: None, scope: str, export_name: str, parameters: Optional[IO[bytes]], content_type: str)`
- Method `ForecastOperations.external_cloud_provider_usage` has a new overload `def external_cloud_provider_usage(self: None, external_cloud_provider_type: Union[str, ExternalCloudProviderType], external_cloud_provider_id: str, parameters: IO[bytes], filter: Optional[str], content_type: str)`
- Method `ForecastOperations.usage` has a new overload `def usage(self: None, scope: str, parameters: IO[bytes], filter: Optional[str], content_type: str)`
- Method `GenerateCostDetailsReportOperations.begin_create_operation` has a new overload `def begin_create_operation(self: None, scope: str, parameters: IO[bytes], content_type: str)`
- Method `GenerateDetailedCostReportOperations.begin_create_operation` has a new overload `def begin_create_operation(self: None, scope: str, parameters: IO[bytes], content_type: str)`
- Method `QueryOperations.usage` has a new overload `def usage(self: None, scope: str, parameters: IO[bytes], content_type: str)`
- Method `QueryOperations.usage_by_external_cloud_provider_type` has a new overload `def usage_by_external_cloud_provider_type(self: None, external_cloud_provider_type: Union[str, ExternalCloudProviderType], external_cloud_provider_id: str, parameters: IO[bytes], content_type: str)`
- Method `ScheduledActionsOperations.check_name_availability` has a new overload `def check_name_availability(self: None, check_name_availability_request: IO[bytes], content_type: str)`
- Method `ScheduledActionsOperations.check_name_availability_by_scope` has a new overload `def check_name_availability_by_scope(self: None, scope: str, check_name_availability_request: IO[bytes], content_type: str)`
- Method `ScheduledActionsOperations.create_or_update` has a new overload `def create_or_update(self: None, name: str, scheduled_action: IO[bytes], if_match: Optional[str], content_type: str)`
- Method `ScheduledActionsOperations.create_or_update_by_scope` has a new overload `def create_or_update_by_scope(self: None, scope: str, name: str, scheduled_action: IO[bytes], if_match: Optional[str], content_type: str)`
- Method `ViewsOperations.create_or_update` has a new overload `def create_or_update(self: None, view_name: str, parameters: IO[bytes], content_type: str)`
- Method `ViewsOperations.create_or_update_by_scope` has a new overload `def create_or_update_by_scope(self: None, scope: str, view_name: str, parameters: IO[bytes], content_type: str)`
- Method `BudgetsOperations.create_or_update` has a new overload `def create_or_update(self: None, scope: str, budget_name: str, parameters: Budget, content_type: str)`
- Method `BudgetsOperations.create_or_update` has a new overload `def create_or_update(self: None, scope: str, budget_name: str, parameters: IO[bytes], content_type: str)`
- Method `CostAllocationRulesOperations.check_name_availability` has a new overload `def check_name_availability(self: None, billing_account_id: str, cost_allocation_rule_check_name_availability_request: CostAllocationRuleCheckNameAvailabilityRequest, content_type: str)`
- Method `CostAllocationRulesOperations.check_name_availability` has a new overload `def check_name_availability(self: None, billing_account_id: str, cost_allocation_rule_check_name_availability_request: IO[bytes], content_type: str)`
- Method `CostAllocationRulesOperations.create_or_update` has a new overload `def create_or_update(self: None, billing_account_id: str, rule_name: str, cost_allocation_rule: CostAllocationRuleDefinition, content_type: str)`
- Method `CostAllocationRulesOperations.create_or_update` has a new overload `def create_or_update(self: None, billing_account_id: str, rule_name: str, cost_allocation_rule: IO[bytes], content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account` has a new overload `def begin_generate_by_billing_account(self: None, billing_account_id: str, benefit_utilization_summaries_request: BenefitUtilizationSummariesRequest, content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_account` has a new overload `def begin_generate_by_billing_account(self: None, billing_account_id: str, benefit_utilization_summaries_request: IO[bytes], content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile` has a new overload `def begin_generate_by_billing_profile(self: None, billing_account_id: str, billing_profile_id: str, benefit_utilization_summaries_request: BenefitUtilizationSummariesRequest, content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_billing_profile` has a new overload `def begin_generate_by_billing_profile(self: None, billing_account_id: str, billing_profile_id: str, benefit_utilization_summaries_request: IO[bytes], content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id` has a new overload `def begin_generate_by_reservation_id(self: None, reservation_order_id: str, reservation_id: str, benefit_utilization_summaries_request: BenefitUtilizationSummariesRequest, content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_id` has a new overload `def begin_generate_by_reservation_id(self: None, reservation_order_id: str, reservation_id: str, benefit_utilization_summaries_request: IO[bytes], content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id` has a new overload `def begin_generate_by_reservation_order_id(self: None, reservation_order_id: str, benefit_utilization_summaries_request: BenefitUtilizationSummariesRequest, content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_reservation_order_id` has a new overload `def begin_generate_by_reservation_order_id(self: None, reservation_order_id: str, benefit_utilization_summaries_request: IO[bytes], content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id` has a new overload `def begin_generate_by_savings_plan_id(self: None, savings_plan_order_id: str, savings_plan_id: str, benefit_utilization_summaries_request: BenefitUtilizationSummariesRequest, content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_id` has a new overload `def begin_generate_by_savings_plan_id(self: None, savings_plan_order_id: str, savings_plan_id: str, benefit_utilization_summaries_request: IO[bytes], content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id` has a new overload `def begin_generate_by_savings_plan_order_id(self: None, savings_plan_order_id: str, benefit_utilization_summaries_request: BenefitUtilizationSummariesRequest, content_type: str)`
- Method `GenerateBenefitUtilizationSummariesReportOperations.begin_generate_by_savings_plan_order_id` has a new overload `def begin_generate_by_savings_plan_order_id(self: None, savings_plan_order_id: str, benefit_utilization_summaries_request: IO[bytes], content_type: str)`
- Method `SettingsOperations.create_or_update_by_scope` has a new overload `def create_or_update_by_scope(self: None, scope: str, type: Union[str, SettingType], setting: Setting, content_type: str)`
- Method `SettingsOperations.create_or_update_by_scope` has a new overload `def create_or_update_by_scope(self: None, scope: str, type: Union[str, SettingType], setting: IO[bytes], content_type: str)`

### Breaking Changes

- Deleted or renamed method `PriceSheetOperations.begin_download`

## 4.0.1 (2023-07-19)

### Bugs Fixed
Expand Down
9 changes: 3 additions & 6 deletions sdk/costmanagement/azure-mgmt-costmanagement/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Cost Management Client Library.
This package has been tested with Python 3.7+.
This package has been tested with Python 3.8+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.7+ is required to use this package.
- Python 3.8+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand All @@ -24,7 +24,7 @@ pip install azure-identity

### Authentication

By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -55,6 +55,3 @@ Code samples for this package can be found at:
If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.



10 changes: 5 additions & 5 deletions sdk/costmanagement/azure-mgmt-costmanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "493aa7224fd65fe1e5b4cff59bcae5c6cdf4525e",
"commit": "4fc65ac4a5e6c48614807f211388d4c9b73c8559",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.6.0",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.27.4",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2022-10 --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/cost-management/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._cost_management_client import CostManagementClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._cost_management_client import CostManagementClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"CostManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,30 @@

from typing import Any, TYPE_CHECKING

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

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class CostManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
class CostManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for CostManagementClient.
Note that all parameters used to create this instance are saved as instance
attributes.
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
super(CostManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2022-10-01")
api_version: str = kwargs.pop("api_version", "2025-03-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -43,6 +40,7 @@ def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-costmanagement/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(self, **kwargs: Any) -> None:
Expand All @@ -51,9 +49,9 @@ def _configure(self, **kwargs: Any) -> None:
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(
Expand Down
Loading