diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/ArmCostManagementModelFactory.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/ArmCostManagementModelFactory.cs
new file mode 100644
index 000000000000..c8d14124bc36
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/ArmCostManagementModelFactory.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using static Azure.Core.Pipeline.TaskExtensions;
+
+namespace Azure.ResourceManager.CostManagement.Models
+{
+ public static partial class ArmCostManagementModelFactory
+ {
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Scheduled action name.
+ /// Destination format of the view data. This is optional.
+ /// Notification properties based on scheduled action kind.
+ /// Email address of the point of contact that should get the unsubscribe requests and notification emails.
+ /// Schedule of the scheduled action.
+ /// Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
+ /// Status of the scheduled action.
+ /// Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample'.
+ /// Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not required.
+ /// Kind of the scheduled action.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ScheduledActionData ScheduledActionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IEnumerable fileFormats = null, NotificationProperties notification = null, string notificationEmail = null, ScheduleProperties schedule = null, ResourceIdentifier scope = null, ScheduledActionStatus? status = null, ResourceIdentifier viewId = null, ETag? eTag = null, ScheduledActionKind? kind = null)
+ => ScheduledActionData(id, name, resourceType, systemData, eTag, kind, displayName, fileFormats, notification, notificationEmail, schedule, scope, status, viewId);
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/CostManagementExportResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/CostManagementExportResource.cs
new file mode 100644
index 000000000000..5b50598e62b0
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/CostManagementExportResource.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using System.ComponentModel;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ public partial class CostManagementExportResource
+ {
+ ///
+ /// The operation to run an export.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run
+ ///
+ /// -
+ /// Operation Id
+ /// Exports_Execute
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public virtual async Task ExecuteAsync(CancellationToken cancellationToken = default)
+ => await ExecuteAsync(null, cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// The operation to run an export.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run
+ ///
+ /// -
+ /// Operation Id
+ /// Exports_Execute
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public virtual Response Execute(CancellationToken cancellationToken = default)
+ => Execute(null, cancellationToken);
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Extensions/MockableCostManagementTenantResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Extensions/MockableCostManagementTenantResource.cs
new file mode 100644
index 000000000000..0c8c0aa7fd80
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Extensions/MockableCostManagementTenantResource.cs
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.CostManagement.Models;
+
+namespace Azure.ResourceManager.CostManagement.Mocking
+{
+ public partial class MockableCostManagementTenantResource : ArmResource
+ {
+ ///
+ /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
+ ///
+ /// -
+ /// Operation Id
+ /// PriceSheet_DownloadByBillingProfile
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-03-01
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The ID that uniquely identifies a billing account.
+ /// The ID that uniquely identifies a billing profile.
+ /// The cancellation token to use.
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public virtual async Task> DownloadByBillingProfilePriceSheetAsync(WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(billingAccountName, nameof(billingAccountName));
+ Argument.AssertNotNullOrEmpty(billingProfileName, nameof(billingProfileName));
+
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadByBillingProfilePriceSheet");
+ scope.Start();
+ try
+ {
+ var response = await PriceSheetRestClient.DownloadByBillingProfileAsync(billingAccountName, billingProfileName, cancellationToken).ConfigureAwait(false);
+ var operation = new CostManagementArmOperation(new DownloadURLOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByBillingProfileRequest(billingAccountName, billingProfileName).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
+ ///
+ /// -
+ /// Operation Id
+ /// PriceSheet_DownloadByBillingProfile
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-03-01
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The ID that uniquely identifies a billing account.
+ /// The ID that uniquely identifies a billing profile.
+ /// The cancellation token to use.
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public virtual ArmOperation DownloadByBillingProfilePriceSheet(WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(billingAccountName, nameof(billingAccountName));
+ Argument.AssertNotNullOrEmpty(billingProfileName, nameof(billingProfileName));
+
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadByBillingProfilePriceSheet");
+ scope.Start();
+ try
+ {
+ var response = PriceSheetRestClient.DownloadByBillingProfile(billingAccountName, billingProfileName, cancellationToken);
+ var operation = new CostManagementArmOperation(new DownloadURLOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByBillingProfileRequest(billingAccountName, billingProfileName).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/CommonExportProperties.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/CommonExportProperties.cs
new file mode 100644
index 000000000000..c4a9eb13e4bb
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/CommonExportProperties.cs
@@ -0,0 +1,14 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.ResourceManager.CostManagement.Models
+{
+ [CodeGenModel(Usage = new[] { "Input" })]
+ public partial class CommonExportProperties
+ {
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportDataset.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportDataset.cs
new file mode 100644
index 000000000000..887039745f76
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportDataset.cs
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.CostManagement.Models
+{
+ public partial class ExportDataset
+ {
+ /// Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).
+ public IList Columns
+ {
+ get
+ {
+ if (Configuration is null)
+ Configuration = new ExportDatasetConfiguration();
+ return Configuration.Columns;
+ }
+ }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportDeliveryInfo.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportDeliveryInfo.cs
new file mode 100644
index 000000000000..da3194dfab1d
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportDeliveryInfo.cs
@@ -0,0 +1,14 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.ResourceManager.CostManagement.Models
+{
+ [CodeGenModel(Usage = new[] { "Input" })]
+ public partial class ExportDeliveryInfo
+ {
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportRun.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportRun.cs
new file mode 100644
index 000000000000..778d19f24da8
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Custom/Models/ExportRun.cs
@@ -0,0 +1,14 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.ResourceManager.CostManagement.Models
+{
+ [CodeGenModel(Usage = new[] { "Input" })]
+ public partial class ExportRun
+ {
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ArmCostManagementModelFactory.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ArmCostManagementModelFactory.cs
index 5810114d36c9..474bbffecf5d 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ArmCostManagementModelFactory.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ArmCostManagementModelFactory.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using Azure.Core;
using Azure.ResourceManager.Models;
@@ -16,6 +17,55 @@ namespace Azure.ResourceManager.CostManagement.Models
/// Model factory for models.
public static partial class ArmCostManagementModelFactory
{
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ /// defines the type of alert.
+ /// Alert description.
+ /// Source of alert.
+ /// Alert details.
+ /// related budget.
+ /// alert status.
+ /// dateTime in which alert was created.
+ /// dateTime in which alert was closed.
+ /// dateTime in which alert was last modified.
+ /// User who last modified the alert.
+ /// dateTime in which the alert status was last modified.
+ /// A new instance for mocking.
+ public static CostManagementAlertData CostManagementAlertData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, AlertPropertiesDefinition definition = null, string description = null, CostManagementAlertSource? source = null, AlertPropertiesDetails details = null, string costEntityId = null, CostManagementAlertStatus? status = null, DateTimeOffset? createdOn = null, DateTimeOffset? closeOn = null, DateTimeOffset? modifiedOn = null, string statusModificationUserName = null, DateTimeOffset? statusModifiedOn = null)
+ {
+ return new CostManagementAlertData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ eTag,
+ definition,
+ description,
+ source,
+ details,
+ costEntityId,
+ status,
+ createdOn,
+ closeOn,
+ modifiedOn,
+ statusModificationUserName,
+ statusModifiedOn,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Error code.
+ /// Error message indicating why the operation failed.
+ /// A new instance for mocking.
+ public static ExportRunErrorDetails ExportRunErrorDetails(string code = null, string message = null)
+ {
+ return new ExportRunErrorDetails(code, message, serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -122,51 +172,169 @@ public static AllSavingsList AllSavingsList(IEnumerable Initializes a new instance of .
- /// Error code.
- /// Error message indicating why the operation failed.
- /// A new instance for mocking.
- public static ExportRunErrorDetails ExportRunErrorDetails(string code = null, string message = null)
- {
- return new ExportRunErrorDetails(code, message, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// Supported values: 'SavingsPlan'.
- /// A new instance for mocking.
- public static BenefitUtilizationSummary BenefitUtilizationSummary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null)
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ ///
+ /// The category of the budget.
+ /// - 'Cost' defines a Budget.
+ /// - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ ///
+ ///
+ /// The total amount of cost to track with the budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ /// Required for CategoryType(s): Cost.
+ ///
+ ///
+ /// The time covered by a budget. Tracking of the amount will be reset based on the time grain.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// Supported timeGrainTypes for **CategoryType: Cost**
+ ///
+ /// - Monthly
+ /// - Quarterly
+ /// - Annually
+ /// - BillingMonth*
+ /// - BillingQuarter*
+ /// - BillingAnnual*
+ ///
+ /// *only supported for Web Direct customers.
+ ///
+ /// Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ /// - Last7Days
+ /// - Last30Days
+ ///
+ /// Required for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ ///
+ /// The time period that defines the active period of the budget. The budget will evaluate data on or after the startDate and will expire on the endDate.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// Required for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ ///
+ /// May be used to filter budgets by user-specified dimensions and/or tags.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ ///
+ /// The current amount of cost which is being tracked for a budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ ///
+ /// Dictionary of notifications associated with the budget.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5 notifications with thresholdType: Forecasted.
+ /// - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not applicable.
+ ///
+ ///
+ /// The forecasted cost which is being tracked for a budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ /// A new instance for mocking.
+ public static BudgetData BudgetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, CategoryType? category = null, float? amount = null, TimeGrainType? timeGrain = null, BudgetTimePeriod timePeriod = null, BudgetFilter filter = null, CurrentSpend currentSpend = null, IDictionary notifications = null, ForecastSpend forecastSpend = null)
{
- return new BenefitUtilizationSummary(
+ notifications ??= new Dictionary();
+
+ return new BudgetData(
id,
name,
resourceType,
systemData,
- kind == null ? default : new BillingAccountBenefitKind(kind),
+ eTag,
+ category,
+ amount,
+ timeGrain,
+ timePeriod,
+ filter,
+ currentSpend,
+ notifications,
+ forecastSpend,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Input given to create the benefit utilization summaries report.
- /// The status of the creation of the benefit utilization summaries report.
- /// Contains sas url to the async benefit utilization summaries report and a date that the url is valid until. These values will be empty if the report is in a Running or Failed state.
- /// A new instance for mocking.
- public static BenefitUtilizationSummariesOperationStatus BenefitUtilizationSummariesOperationStatus(BenefitUtilizationSummariesContent input = null, OperationStatusType? status = null, AsyncOperationStatusProperties properties = null)
+ /// Initializes a new instance of .
+ /// The total amount of cost which is being tracked by the budget.
+ /// The unit of measure for the budget amount.
+ /// A new instance for mocking.
+ public static CurrentSpend CurrentSpend(float? amount = null, string unit = null)
{
- return new BenefitUtilizationSummariesOperationStatus(input, status, properties, serializedAdditionalRawData: null);
+ return new CurrentSpend(amount, unit, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Sas url to the async benefit utilization summaries report. Will be empty if the report is in Running or Failed state.
- /// Sas url to async benefit utilization summaries report in secondary storage in case of primary outage. Will be empty if the report is in Running or Failed state.
- /// The date that the sas url provided in reportUrl expires.
- /// A new instance for mocking.
- public static AsyncOperationStatusProperties AsyncOperationStatusProperties(BenefitUtilizationSummaryReportSchema? reportUri = null, BenefitUtilizationSummaryReportSchema? secondaryReportUri = null, DateTimeOffset? validUntil = null)
+ /// Initializes a new instance of .
+ /// The forecasted cost for the total time period which is being tracked by the budget. This value is only provided if the budget contains a forecast alert type.
+ /// The unit of measure for the budget amount.
+ /// A new instance for mocking.
+ public static ForecastSpend ForecastSpend(float? amount = null, string unit = null)
{
- return new AsyncOperationStatusProperties(reportUri, secondaryReportUri, validUntil, serializedAdditionalRawData: null);
+ return new ForecastSpend(amount, unit, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Indicates if the resource name is available.
+ /// The reason why the given name is not available.
+ /// Detailed reason why the given name is available.
+ /// A new instance for mocking.
+ public static CostManagementNameAvailabilityResult CostManagementNameAvailabilityResult(bool? nameAvailable = null, CostManagementUnavailabilityReason? reason = null, string message = null)
+ {
+ return new CostManagementNameAvailabilityResult(nameAvailable, reason, message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Dimension description.
+ /// Filter enabled.
+ /// Grouping enabled.
+ /// Dimension data.
+ /// Total number of data for the dimension.
+ /// Dimension category.
+ /// Usage start.
+ /// Usage end.
+ /// The link (url) to the next page of results.
+ /// Location of the resource.
+ /// SKU of the resource.
+ /// ETag of the resource.
+ /// Resource tags.
+ /// A new instance for mocking.
+ public static CostManagementDimension CostManagementDimension(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, bool? isFilterEnabled = null, bool? isGroupingEnabled = null, IEnumerable data = null, int? total = null, string category = null, DateTimeOffset? usageStart = null, DateTimeOffset? usageEnd = null, string nextLink = null, AzureLocation? location = null, string sku = null, ETag? eTag = null, IReadOnlyDictionary tags = null)
+ {
+ data ??= new List();
+ tags ??= new Dictionary();
+
+ return new CostManagementDimension(
+ id,
+ name,
+ resourceType,
+ systemData,
+ description,
+ isFilterEnabled,
+ isGroupingEnabled,
+ data?.ToList(),
+ total,
+ category,
+ usageStart,
+ usageEnd,
+ nextLink,
+ location,
+ sku,
+ eTag,
+ tags,
+ serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
@@ -174,16 +342,22 @@ public static AsyncOperationStatusProperties AsyncOperationStatusProperties(Bene
/// The name.
/// The resourceType.
/// The systemData.
- /// The format of the export being delivered. Currently only 'Csv' is supported.
+ /// The managed identity associated with Export. Current supported identity types: None, SystemAssigned.
+ /// The location of the Export's managed identity. Only required when utilizing managed identity.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ /// The format of the export being delivered.
/// Has delivery information for the export.
/// Has the definition for the export.
/// If requested, has the most recent run history for the export.
- /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.
+ /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.
+ /// Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same month in customer storage account. By default set to CreateNewReport.
+ /// Allow customers to select compress data for exports. This setting will enable destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet.
+ /// The export description set by customer at time of export creation/update.
/// If the export has an active schedule, provides an estimate of the next run time.
+ /// The export suspension reason if export is in SystemSuspended state. This is not populated currently.
/// Has schedule information for the export.
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
/// A new instance for mocking.
- public static CostManagementExportData CostManagementExportData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExportFormatType? format = null, ExportDeliveryDestination deliveryInfoDestination = null, ExportDefinition definition = null, IEnumerable runHistoryValue = null, bool? partitionData = null, DateTimeOffset? nextRunTimeEstimate = null, ExportSchedule schedule = null, ETag? eTag = null)
+ public static CostManagementExportData CostManagementExportData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, AzureLocation? location = null, ETag? eTag = null, ExportFormatType? format = null, ExportDeliveryDestination deliveryInfoDestination = null, ExportDefinition definition = null, IEnumerable runHistoryValue = null, bool? partitionData = null, DataOverwriteBehaviorType? dataOverwriteBehavior = null, CompressionModeType? compressionMode = null, string exportDescription = null, DateTimeOffset? nextRunTimeEstimate = null, ExportSuspensionContext systemSuspensionContext = null, ExportSchedule schedule = null)
{
runHistoryValue ??= new List();
@@ -192,26 +366,36 @@ public static CostManagementExportData CostManagementExportData(ResourceIdentifi
name,
resourceType,
systemData,
+ identity,
+ location,
+ eTag,
format,
deliveryInfoDestination != null ? new ExportDeliveryInfo(deliveryInfoDestination, serializedAdditionalRawData: null) : null,
definition,
runHistoryValue != null ? new ExportExecutionListResult(runHistoryValue?.ToList(), serializedAdditionalRawData: null) : null,
partitionData,
+ dataOverwriteBehavior,
+ compressionMode,
+ exportDescription,
nextRunTimeEstimate,
+ systemSuspensionContext,
schedule,
- eTag,
serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
- /// The format of the export being delivered. Currently only 'Csv' is supported.
+ /// The format of the export being delivered.
/// Has delivery information for the export.
/// Has the definition for the export.
/// If requested, has the most recent run history for the export.
- /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.
+ /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.
+ /// Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same month in customer storage account. By default set to CreateNewReport.
+ /// Allow customers to select compress data for exports. This setting will enable destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet.
+ /// The export description set by customer at time of export creation/update.
/// If the export has an active schedule, provides an estimate of the next run time.
+ /// The export suspension reason if export is in SystemSuspended state. This is not populated currently.
/// A new instance for mocking.
- public static CommonExportProperties CommonExportProperties(ExportFormatType? format = null, ExportDeliveryDestination deliveryInfoDestination = null, ExportDefinition definition = null, IEnumerable runHistoryValue = null, bool? partitionData = null, DateTimeOffset? nextRunTimeEstimate = null)
+ public static CommonExportProperties CommonExportProperties(ExportFormatType? format = null, ExportDeliveryDestination deliveryInfoDestination = null, ExportDefinition definition = null, IEnumerable runHistoryValue = null, bool? partitionData = null, DataOverwriteBehaviorType? dataOverwriteBehavior = null, CompressionModeType? compressionMode = null, string exportDescription = null, DateTimeOffset? nextRunTimeEstimate = null, ExportSuspensionContext systemSuspensionContext = null)
{
runHistoryValue ??= new List();
@@ -221,7 +405,11 @@ public static CommonExportProperties CommonExportProperties(ExportFormatType? fo
definition,
runHistoryValue != null ? new ExportExecutionListResult(runHistoryValue?.ToList(), serializedAdditionalRawData: null) : null,
partitionData,
+ dataOverwriteBehavior,
+ compressionMode,
+ exportDescription,
nextRunTimeEstimate,
+ systemSuspensionContext,
serializedAdditionalRawData: null);
}
@@ -236,12 +424,15 @@ public static CommonExportProperties CommonExportProperties(ExportFormatType? fo
/// The time when export was queued to be run.
/// The time when export was picked up to be run.
/// The time when the export run finished.
+ /// The start datetime for the export.
+ /// The end datetime for the export.
/// The name of the exported file.
+ /// The manifest file location(URI location) for the exported files.
/// The export settings that were in effect for this run.
/// The details of any error.
/// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
/// A new instance for mocking.
- public static ExportRun ExportRun(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExportRunExecutionType? executionType = null, ExportRunExecutionStatus? status = null, string submittedBy = null, DateTimeOffset? submittedOn = null, DateTimeOffset? processingStartOn = null, DateTimeOffset? processingEndOn = null, string fileName = null, CommonExportProperties runSettings = null, ExportRunErrorDetails error = null, ETag? eTag = null)
+ public static ExportRun ExportRun(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExportRunExecutionType? executionType = null, ExportRunExecutionStatus? status = null, string submittedBy = null, DateTimeOffset? submittedOn = null, DateTimeOffset? processingStartOn = null, DateTimeOffset? processingEndOn = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string fileName = null, string manifestFile = null, CommonExportProperties runSettings = null, ExportRunErrorDetails error = null, ETag? eTag = null)
{
return new ExportRun(
id,
@@ -254,104 +445,24 @@ public static ExportRun ExportRun(ResourceIdentifier id = null, string name = nu
submittedOn,
processingStartOn,
processingEndOn,
+ startOn,
+ endOn,
fileName,
+ manifestFile,
runSettings,
error,
eTag,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// User input name of the view. Required.
- /// Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
- /// Date the user created this view.
- /// Date when the user last modified this view.
- /// Date range of the current view.
- /// Currency of the current view.
- /// Chart type of the main view in Cost Analysis. Required.
- /// Show costs accumulated over time.
- /// Metric to use when displaying costs.
- /// List of KPIs to show in Cost Analysis UI.
- /// Configuration of 3 sub-views in the Cost Analysis UI.
- /// The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
- /// The time frame for pulling data for the report. If custom, then a specific time period must be provided.
- /// Has time period for pulling data for the report.
- /// Has definition for data in this report config.
- /// If true, report includes monetary commitment.
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- /// A new instance for mocking.
- public static CostManagementViewData CostManagementViewData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, ResourceIdentifier scope = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string dateRange = null, string currency = null, ViewChartType? chart = null, AccumulatedType? accumulated = null, ViewMetricType? metric = null, IEnumerable kpis = null, IEnumerable pivots = null, ViewReportType? typePropertiesQueryType = null, ReportTimeframeType? timeframe = null, ReportConfigTimePeriod timePeriod = null, ReportConfigDataset dataSet = null, bool? includeMonetaryCommitment = null, ETag? eTag = null)
- {
- kpis ??= new List();
- pivots ??= new List();
-
- return new CostManagementViewData(
- id,
- name,
- resourceType,
- systemData,
- displayName,
- scope,
- createdOn,
- modifiedOn,
- dateRange,
- currency,
- chart,
- accumulated,
- metric,
- kpis?.ToList(),
- pivots?.ToList(),
- typePropertiesQueryType,
- timeframe,
- timePeriod,
- dataSet,
- includeMonetaryCommitment,
- eTag,
- serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// defines the type of alert.
- /// Alert description.
- /// Source of alert.
- /// Alert details.
- /// related budget.
- /// alert status.
- /// dateTime in which alert was created.
- /// dateTime in which alert was closed.
- /// dateTime in which alert was last modified.
- /// User who last modified the alert.
- /// dateTime in which the alert status was last modified.
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- /// A new instance for mocking.
- public static CostManagementAlertData CostManagementAlertData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AlertPropertiesDefinition definition = null, string description = null, CostManagementAlertSource? source = null, AlertPropertiesDetails details = null, string costEntityId = null, CostManagementAlertStatus? status = null, DateTimeOffset? createdOn = null, DateTimeOffset? closeOn = null, DateTimeOffset? modifiedOn = null, string statusModificationUserName = null, DateTimeOffset? statusModifiedOn = null, ETag? eTag = null)
+ /// Initializes a new instance of .
+ /// The code for export suspension.
+ /// The detailed reason for export suspension.
+ /// The time when the export was suspended.
+ /// A new instance for mocking.
+ public static ExportSuspensionContext ExportSuspensionContext(string suspensionCode = null, string suspensionReason = null, DateTimeOffset? suspensionOn = null)
{
- return new CostManagementAlertData(
- id,
- name,
- resourceType,
- systemData,
- definition,
- description,
- source,
- details,
- costEntityId,
- status,
- createdOn,
- closeOn,
- modifiedOn,
- statusModificationUserName,
- statusModifiedOn,
- eTag,
- serializedAdditionalRawData: null);
+ return new ExportSuspensionContext(suspensionCode, suspensionReason, suspensionOn, serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
@@ -417,44 +528,44 @@ public static ForecastColumn ForecastColumn(string name = null, string forecastC
return new ForecastColumn(name, forecastColumnType, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The type of the query.
+ /// The time frame for pulling data for the query. If custom, then a specific time period must be provided.
+ /// Has time period for pulling data for the query.
+ /// Has definition for data in this query.
+ /// A new instance for mocking.
+ public static QueryDefinition QueryDefinition(ExportType exportType = default, TimeframeType timeframe = default, QueryTimePeriod timePeriod = null, QueryDataset dataset = null)
+ {
+ return new QueryDefinition(exportType, timeframe, timePeriod, dataset, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// Dimension description.
- /// Filter enabled.
- /// Grouping enabled.
- /// Dimension data.
- /// Total number of data for the dimension.
- /// Dimension category.
- /// Usage start.
- /// Usage end.
/// The link (url) to the next page of results.
+ /// Array of columns.
+ /// Array of rows.
/// Location of the resource.
/// SKU of the resource.
/// ETag of the resource.
/// Resource tags.
- /// A new instance for mocking.
- public static CostManagementDimension CostManagementDimension(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, bool? isFilterEnabled = null, bool? isGroupingEnabled = null, IEnumerable data = null, int? total = null, string category = null, DateTimeOffset? usageStart = null, DateTimeOffset? usageEnd = null, string nextLink = null, AzureLocation? location = null, string sku = null, ETag? eTag = null, IReadOnlyDictionary tags = null)
+ /// A new instance for mocking.
+ public static QueryResult QueryResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string nextLink = null, IEnumerable columns = null, IEnumerable> rows = null, AzureLocation? location = null, string sku = null, ETag? eTag = null, IReadOnlyDictionary tags = null)
{
- data ??= new List();
+ columns ??= new List();
+ rows ??= new List>();
tags ??= new Dictionary();
- return new CostManagementDimension(
+ return new QueryResult(
id,
name,
resourceType,
systemData,
- description,
- isFilterEnabled,
- isGroupingEnabled,
- data?.ToList(),
- total,
- category,
- usageStart,
- usageEnd,
nextLink,
+ columns?.ToList(),
+ rows?.ToList(),
location,
sku,
eTag,
@@ -462,58 +573,122 @@ public static CostManagementDimension CostManagementDimension(ResourceIdentifier
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The type of the query.
- /// The time frame for pulling data for the query. If custom, then a specific time period must be provided.
- /// Has time period for pulling data for the query.
- /// Has definition for data in this query.
- /// A new instance for mocking.
- public static QueryDefinition QueryDefinition(ExportType exportType = default, TimeframeType timeframe = default, QueryTimePeriod timePeriod = null, QueryDataset dataset = null)
+ /// Initializes a new instance of .
+ /// The name of column.
+ /// The type of column.
+ /// A new instance for mocking.
+ public static QueryColumn QueryColumn(string name = null, string queryColumnType = null)
{
- return new QueryDefinition(exportType, timeframe, timePeriod, dataset, serializedAdditionalRawData: null);
+ return new QueryColumn(name, queryColumnType, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The link (url) to the next page of results.
- /// Array of columns.
- /// Array of rows.
- /// Location of the resource.
- /// SKU of the resource.
- /// ETag of the resource.
- /// Resource tags.
- /// A new instance for mocking.
- public static QueryResult QueryResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string nextLink = null, IEnumerable columns = null, IEnumerable> rows = null, AzureLocation? location = null, string sku = null, ETag? eTag = null, IReadOnlyDictionary tags = null)
+ /// Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not required.
+ /// Kind of the scheduled action.
+ /// Scheduled action name.
+ /// Destination format of the view data. This is optional.
+ /// Notification properties based on scheduled action kind.
+ /// Email address of the point of contact that should get the unsubscribe requests and notification emails.
+ /// Schedule of the scheduled action.
+ /// For private scheduled action(Create or Update), scope will be empty.<br /> For shared scheduled action(Create or Update By Scope), Cost Management scope can be 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
+ /// Status of the scheduled action.
+ /// Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample'.
+ /// A new instance for mocking.
+ public static ScheduledActionData ScheduledActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, ScheduledActionKind? kind = null, string displayName = null, IEnumerable fileFormats = null, NotificationProperties notification = null, string notificationEmail = null, ScheduleProperties schedule = null, ResourceIdentifier scope = null, ScheduledActionStatus? status = null, ResourceIdentifier viewId = null)
{
- columns ??= new List();
- rows ??= new List>();
- tags ??= new Dictionary();
+ fileFormats ??= new List();
- return new QueryResult(
+ return new ScheduledActionData(
id,
name,
resourceType,
systemData,
- nextLink,
- columns?.ToList(),
- rows?.ToList(),
- location,
- sku,
eTag,
- tags,
+ kind,
+ displayName,
+ fileFormats != null ? new FileDestination(fileFormats?.ToList(), serializedAdditionalRawData: null) : null,
+ notification,
+ notificationEmail,
+ schedule,
+ scope,
+ status,
+ viewId,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The name of column.
- /// The type of column.
- /// A new instance for mocking.
- public static QueryColumn QueryColumn(string name = null, string queryColumnType = null)
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
+ /// A new instance for mocking.
+ public static SettingData SettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null)
{
- return new QueryColumn(name, queryColumnType, serializedAdditionalRawData: null);
+ return new UnknownSetting(
+ id,
+ name,
+ resourceType,
+ systemData,
+ kind == null ? default : new SettingsKind(kind),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ /// User input name of the view. Required.
+ /// Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
+ /// Date the user created this view.
+ /// Date when the user last modified this view.
+ /// Date range of the current view.
+ /// Currency of the current view.
+ /// Chart type of the main view in Cost Analysis. Required.
+ /// Show costs accumulated over time.
+ /// Metric to use when displaying costs.
+ /// List of KPIs to show in Cost Analysis UI.
+ /// Configuration of 3 sub-views in the Cost Analysis UI.
+ /// The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
+ /// The time frame for pulling data for the report. If custom, then a specific time period must be provided.
+ /// Has time period for pulling data for the report.
+ /// Has definition for data in this report config.
+ /// If true, report includes monetary commitment.
+ /// A new instance for mocking.
+ public static CostManagementViewData CostManagementViewData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, string displayName = null, ResourceIdentifier scope = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string dateRange = null, string currency = null, ViewChartType? chart = null, AccumulatedType? accumulated = null, ViewMetricType? metric = null, IEnumerable kpis = null, IEnumerable pivots = null, ViewReportType? typePropertiesQueryType = null, ReportTimeframeType? timeframe = null, ReportConfigTimePeriod timePeriod = null, ReportConfigDataset dataSet = null, bool? includeMonetaryCommitment = null)
+ {
+ kpis ??= new List();
+ pivots ??= new List();
+
+ return new CostManagementViewData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ eTag,
+ displayName,
+ scope,
+ createdOn,
+ modifiedOn,
+ dateRange,
+ currency,
+ chart,
+ accumulated,
+ metric,
+ kpis?.ToList(),
+ pivots?.ToList(),
+ typePropertiesQueryType,
+ timeframe,
+ timePeriod,
+ dataSet,
+ includeMonetaryCommitment,
+ serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
@@ -536,55 +711,266 @@ public static DownloadURL DownloadURL(DateTimeOffset? expiryOn = null, DateTimeO
return new DownloadURL(expiryOn, validTill, downloadUri, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// Scheduled action name.
- /// Destination format of the view data. This is optional.
- /// Notification properties based on scheduled action kind.
- /// Email address of the point of contact that should get the unsubscribe requests and notification emails.
- /// Schedule of the scheduled action.
- /// Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
- /// Status of the scheduled action.
- /// Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample'.
- /// Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not required.
- /// Kind of the scheduled action.
- /// A new instance for mocking.
- public static ScheduledActionData ScheduledActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable fileFormats = null, NotificationProperties notification = null, string notificationEmail = null, ScheduleProperties schedule = null, ResourceIdentifier scope = null, ScheduledActionStatus? status = null, ResourceIdentifier viewId = null, ETag? eTag = null, ScheduledActionKind? kind = null)
+ /// Supported values: 'SavingsPlan'.
+ /// A new instance for mocking.
+ public static BenefitUtilizationSummary BenefitUtilizationSummary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null)
{
- fileFormats ??= new List();
+ return new BenefitUtilizationSummary(
+ id,
+ name,
+ resourceType,
+ systemData,
+ kind == null ? default : new BillingAccountBenefitKind(kind),
+ serializedAdditionalRawData: null);
+ }
- return new ScheduledActionData(
+ /// Initializes a new instance of .
+ /// Input given to create the benefit utilization summaries report.
+ /// The status of the creation of the benefit utilization summaries report.
+ /// Contains sas url to the async benefit utilization summaries report and a date that the url is valid until. These values will be empty if the report is in a Running or Failed state.
+ /// A new instance for mocking.
+ public static BenefitUtilizationSummariesOperationStatus BenefitUtilizationSummariesOperationStatus(BenefitUtilizationSummariesContent input = null, OperationStatusType? status = null, AsyncOperationStatusProperties properties = null)
+ {
+ return new BenefitUtilizationSummariesOperationStatus(input, status, properties, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Sas url to the async benefit utilization summaries report. Will be empty if the report is in Running or Failed state.
+ /// Sas url to async benefit utilization summaries report in secondary storage in case of primary outage. Will be empty if the report is in Running or Failed state.
+ /// The date that the sas url provided in reportUrl expires.
+ /// A new instance for mocking.
+ public static AsyncOperationStatusProperties AsyncOperationStatusProperties(BenefitUtilizationSummaryReportSchema? reportUri = null, BenefitUtilizationSummaryReportSchema? secondaryReportUri = null, DateTimeOffset? validUntil = null)
+ {
+ return new AsyncOperationStatusProperties(reportUri, secondaryReportUri, validUntil, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.
+ /// The URL to download the generated report.
+ /// The properties in downloaded file.
+ /// A new instance for mocking.
+ public static PricesheetDownloadProperties PricesheetDownloadProperties(DateTimeOffset? expiryOn = null, Uri downloadUri = null, MCAPriceSheetProperties downloadFileProperties = null)
+ {
+ return new PricesheetDownloadProperties(expiryOn, downloadUri, downloadFileProperties, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Unique identifier for the billing account.
+ /// Name of the billing profile that is set up to receive invoices. The prices in the price sheet are associated with this billing profile.
+ /// Unique identifier for the billing profile.
+ /// Name of the billing profile that is set up to receive invoices. The prices in the price sheet are associated with this billing profile.
+ ///
+ /// Name of the purchased product plan. Indicates if this pricing is standard Azure Plan pricing, Dev/Test pricing etc.
+ ///
+ /// Currently unavailable for Azure 3rd party and ReservedInstance meters.
+ ///
+ /// Type of Azure service. For example, Compute, Analytics, and Security.
+ /// Name of the product accruing the charges.
+ /// Unique identifier for the product whose meter is consumed.
+ /// Unique identifier of the SKU.
+ /// How usage is measured for the service.
+ /// Unique identifier of the meter.
+ /// Name of the meter. The meter represents the deployable resource of an Azure service.
+ /// Name of the meter type.
+ /// Name of the classification category for the meter. For example, Cloud services, Networking, etc.
+ /// Name of the meter subclassification category.
+ /// Name of the Azure region where the meter for the service is available.
+ /// Defines the lower bound of the tier range for which prices are defined. For example, if the range is 0 to 100, tierMinimumUnits would be 0.
+ /// Effective start date of the Price Sheet billing period.
+ /// Effective end date of the Price Sheet billing period.
+ ///
+ /// The per-unit price at the time of billing for a given product or service, inclusive of any negotiated discounts on top of the market price.
+ ///
+ /// For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year commitment including discounts.
+ ///
+ /// Note: The unit price isn't the same as the effective price in usage details downloads when services have differential prices across tiers.
+ ///
+ /// If services have multi-tiered pricing, the effective price is a blended rate across the tiers and doesn't show a tier-specific unit price. The blended price or effective price is the net price for the consumed quantity spanning across the multiple tiers (where each tier has a specific unit price).
+ ///
+ ///
+ /// The unit price at the time the customer signs on or the unit price at the time of service meter GA launch if it is after sign-on.
+ ///
+ /// This is applicable for Enterprise Agreement users
+ ///
+ ///
+ /// The current list price for a given product or service. This price is without any negotiations and is based on your Microsoft Agreement type.
+ ///
+ /// For PriceType Consumption, market price is reflected as the pay-as-you-go price.
+ ///
+ /// For PriceType Savings Plan, market price reflects the Savings plan benefit on top of pay-as-you-go price for the corresponding commitment term.
+ ///
+ /// For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year commitment.
+ ///
+ /// Currency in which all the prices are reflected.
+ /// Currency in which charges are posted.
+ /// Term length for Azure Savings Plan or Reservation term – one year or three years (P1Y or P3Y).
+ /// Price type for a product. For example, an Azure resource with a pay-as-you-go rate with priceType as Consumption. Other price types include ReservedInstance and Savings Plan.
+ /// A new instance for mocking.
+ public static MCAPriceSheetProperties MCAPriceSheetProperties(string billingAccountId = null, string billingAccountName = null, string billingProfileId = null, string billingProfileName = null, string productOrderName = null, float? serviceFamily = null, string product = null, string productId = null, string skuId = null, string unitOfMeasure = null, string meterId = null, string meterName = null, string meterType = null, string meterCategory = null, string meterSubCategory = null, string meterRegion = null, string tierMinimumUnits = null, DateTimeOffset? effectiveStartOn = null, DateTimeOffset? effectiveEndOn = null, string unitPrice = null, string basePrice = null, string marketPrice = null, string currency = null, string billingCurrency = null, string term = null, string priceType = null)
+ {
+ return new MCAPriceSheetProperties(
+ billingAccountId,
+ billingAccountName,
+ billingProfileId,
+ billingProfileName,
+ productOrderName,
+ serviceFamily,
+ product,
+ productId,
+ skuId,
+ unitOfMeasure,
+ meterId,
+ meterName,
+ meterType,
+ meterCategory,
+ meterSubCategory,
+ meterRegion,
+ tierMinimumUnits,
+ effectiveStartOn,
+ effectiveEndOn,
+ unitPrice,
+ basePrice,
+ marketPrice,
+ currency,
+ billingCurrency,
+ term,
+ priceType,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Cost allocation rule properties.
+ /// A new instance for mocking.
+ public static CostAllocationRuleDefinitionData CostAllocationRuleDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CostAllocationRuleProperties properties = null)
+ {
+ return new CostAllocationRuleDefinitionData(
id,
name,
resourceType,
systemData,
- displayName,
- fileFormats != null ? new FileDestination(fileFormats?.ToList(), serializedAdditionalRawData: null) : null,
- notification,
- notificationEmail,
- schedule,
- scope,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Description of a cost allocation rule.
+ /// Resource information for the cost allocation rule.
+ /// Status of the rule.
+ /// Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
+ /// Time at which the rule was last updated.
+ /// A new instance for mocking.
+ public static CostAllocationRuleProperties CostAllocationRuleProperties(string description = null, CostAllocationRuleDetails details = null, RuleStatus status = default, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null)
+ {
+ return new CostAllocationRuleProperties(
+ description,
+ details,
status,
- viewId,
- eTag,
- kind,
+ createdOn,
+ updatedOn,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Indicates if the resource name is available.
- /// The reason why the given name is not available.
- /// Detailed reason why the given name is available.
- /// A new instance for mocking.
- public static CostManagementNameAvailabilityResult CostManagementNameAvailabilityResult(bool? nameAvailable = null, CostManagementUnavailabilityReason? reason = null, string message = null)
+ /// Initializes a new instance of .
+ /// Whether this rule name is available.
+ /// The reason this name is not available.
+ /// Error message if the name is not available.
+ /// A new instance for mocking.
+ public static CostAllocationRuleCheckNameAvailabilityResponse CostAllocationRuleCheckNameAvailabilityResponse(bool? nameAvailable = null, Reason? reason = null, string message = null)
{
- return new CostManagementNameAvailabilityResult(nameAvailable, reason, message, serializedAdditionalRawData: null);
+ return new CostAllocationRuleCheckNameAvailabilityResponse(nameAvailable, reason, message, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan.
+ /// The benefit ID is the identifier of the benefit.
+ /// The benefit order ID is the identifier for a benefit purchase.
+ /// The benefit type. Supported values: 'SavingsPlan'.
+ /// Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.
+ /// This is the utilized percentage for the benefit ID.
+ /// A new instance for mocking.
+ public static IncludedQuantityUtilizationSummary IncludedQuantityUtilizationSummary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string armSkuName = null, string benefitId = null, string benefitOrderId = null, BillingAccountBenefitKind? benefitType = null, DateTimeOffset? usageOn = null, decimal? utilizationPercentage = null)
+ {
+ return new IncludedQuantityUtilizationSummary(
+ id,
+ name,
+ resourceType,
+ systemData,
+ BillingAccountBenefitKind.IncludedQuantity,
+ serializedAdditionalRawData: null,
+ armSkuName,
+ benefitId,
+ benefitOrderId,
+ benefitType,
+ usageOn,
+ utilizationPercentage);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan.
+ /// The benefit ID is the identifier of the benefit.
+ /// The benefit order ID is the identifier for a benefit purchase.
+ /// The benefit type. Supported values: 'SavingsPlan'.
+ /// Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.
+ /// This is the average hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the avgUtilizationPercentage value will be equal to the average of the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day.
+ /// This is the minimum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the minUtilizationPercentage value will be equal to the smallest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the lowest utilization percentage was 10% at hour 4, then the value for the minUtilizationPercentage in the response will be 10%.
+ /// This is the maximum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the maxUtilizationPercentage value will be equal to the largest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the largest utilization percentage was 90% at hour 5, then the value for the maxUtilizationPercentage in the response will be 90%.
+ /// A new instance for mocking.
+ public static SavingsPlanUtilizationSummary SavingsPlanUtilizationSummary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string armSkuName = null, string benefitId = null, string benefitOrderId = null, BillingAccountBenefitKind? benefitType = null, DateTimeOffset? usageOn = null, decimal? avgUtilizationPercentage = null, decimal? minUtilizationPercentage = null, decimal? maxUtilizationPercentage = null)
+ {
+ return new SavingsPlanUtilizationSummary(
+ id,
+ name,
+ resourceType,
+ systemData,
+ BillingAccountBenefitKind.SavingsPlan,
+ serializedAdditionalRawData: null,
+ armSkuName,
+ benefitId,
+ benefitOrderId,
+ benefitType,
+ usageOn,
+ avgUtilizationPercentage,
+ minUtilizationPercentage,
+ maxUtilizationPercentage);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The properties of the tag inheritance setting.
+ /// A new instance for mocking.
+ public static TagInheritanceSetting TagInheritanceSetting(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? preferContainerTags = null)
+ {
+ return new TagInheritanceSetting(
+ id,
+ name,
+ resourceType,
+ systemData,
+ SettingsKind.Taginheritance,
+ serializedAdditionalRawData: null,
+ preferContainerTags.HasValue ? new TagInheritanceProperties(preferContainerTags.Value, serializedAdditionalRawData: null) : null);
+ }
+
+ /// Initializes a new instance of .
/// The first usage date used for looking back for computing the recommendations.
/// The last usage date used for looking back for computing the recommendations.
/// The number of days of usage evaluated for computing the recommendations.
@@ -597,12 +983,10 @@ public static CostManagementNameAvailabilityResult CostManagementNameAvailabilit
/// The current cost without benefit, corresponds to 'totalHours' in the look-back period.
/// The details of the proposed recommendation.
/// The list of all benefit recommendations with the recommendation details.
- /// The subscription ID that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope.
- /// The resource group that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope and 'ResourceGroup' request scope.
- /// A new instance for mocking.
- public static SingleScopeBenefitRecommendationProperties SingleScopeBenefitRecommendationProperties(DateTimeOffset? firstConsumptionOn = null, DateTimeOffset? lastConsumptionOn = null, LookBackPeriod? lookBackPeriod = null, int? totalHours = null, RecommendationUsageDetails usage = null, string armSkuName = null, BenefitRecommendationPeriodTerm? term = null, BenefitRecommendationUsageGrain? commitmentGranularity = null, string currencyCode = null, decimal? costWithoutBenefit = null, AllSavingsBenefitDetails recommendationDetails = null, AllSavingsList allRecommendationDetails = null, string subscriptionId = null, string resourceGroup = null)
+ /// A new instance for mocking.
+ public static SharedScopeBenefitRecommendationProperties SharedScopeBenefitRecommendationProperties(DateTimeOffset? firstConsumptionOn = null, DateTimeOffset? lastConsumptionOn = null, LookBackPeriod? lookBackPeriod = null, int? totalHours = null, RecommendationUsageDetails usage = null, string armSkuName = null, BenefitRecommendationPeriodTerm? term = null, BenefitRecommendationUsageGrain? commitmentGranularity = null, string currencyCode = null, decimal? costWithoutBenefit = null, AllSavingsBenefitDetails recommendationDetails = null, AllSavingsList allRecommendationDetails = null)
{
- return new SingleScopeBenefitRecommendationProperties(
+ return new SharedScopeBenefitRecommendationProperties(
firstConsumptionOn,
lastConsumptionOn,
lookBackPeriod,
@@ -615,13 +999,11 @@ public static SingleScopeBenefitRecommendationProperties SingleScopeBenefitRecom
costWithoutBenefit,
recommendationDetails,
allRecommendationDetails,
- BenefitRecommendationScope.Single,
- serializedAdditionalRawData: null,
- subscriptionId,
- resourceGroup);
+ BenefitRecommendationScope.Shared,
+ serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The first usage date used for looking back for computing the recommendations.
/// The last usage date used for looking back for computing the recommendations.
/// The number of days of usage evaluated for computing the recommendations.
@@ -634,10 +1016,12 @@ public static SingleScopeBenefitRecommendationProperties SingleScopeBenefitRecom
/// The current cost without benefit, corresponds to 'totalHours' in the look-back period.
/// The details of the proposed recommendation.
/// The list of all benefit recommendations with the recommendation details.
- /// A new instance for mocking.
- public static SharedScopeBenefitRecommendationProperties SharedScopeBenefitRecommendationProperties(DateTimeOffset? firstConsumptionOn = null, DateTimeOffset? lastConsumptionOn = null, LookBackPeriod? lookBackPeriod = null, int? totalHours = null, RecommendationUsageDetails usage = null, string armSkuName = null, BenefitRecommendationPeriodTerm? term = null, BenefitRecommendationUsageGrain? commitmentGranularity = null, string currencyCode = null, decimal? costWithoutBenefit = null, AllSavingsBenefitDetails recommendationDetails = null, AllSavingsList allRecommendationDetails = null)
+ /// The subscription ID that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope.
+ /// The resource group that this single scope recommendation is for. Applicable only if recommendation is for 'Single' scope and 'ResourceGroup' request scope.
+ /// A new instance for mocking.
+ public static SingleScopeBenefitRecommendationProperties SingleScopeBenefitRecommendationProperties(DateTimeOffset? firstConsumptionOn = null, DateTimeOffset? lastConsumptionOn = null, LookBackPeriod? lookBackPeriod = null, int? totalHours = null, RecommendationUsageDetails usage = null, string armSkuName = null, BenefitRecommendationPeriodTerm? term = null, BenefitRecommendationUsageGrain? commitmentGranularity = null, string currencyCode = null, decimal? costWithoutBenefit = null, AllSavingsBenefitDetails recommendationDetails = null, AllSavingsList allRecommendationDetails = null, string subscriptionId = null, string resourceGroup = null)
{
- return new SharedScopeBenefitRecommendationProperties(
+ return new SingleScopeBenefitRecommendationProperties(
firstConsumptionOn,
lastConsumptionOn,
lookBackPeriod,
@@ -650,70 +1034,66 @@ public static SharedScopeBenefitRecommendationProperties SharedScopeBenefitRecom
costWithoutBenefit,
recommendationDetails,
allRecommendationDetails,
- BenefitRecommendationScope.Shared,
- serializedAdditionalRawData: null);
+ BenefitRecommendationScope.Single,
+ serializedAdditionalRawData: null,
+ subscriptionId,
+ resourceGroup);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan.
- /// The benefit ID is the identifier of the benefit.
- /// The benefit order ID is the identifier for a benefit purchase.
- /// The benefit type. Supported values: 'SavingsPlan'.
- /// Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.
- /// This is the utilized percentage for the benefit ID.
- /// A new instance for mocking.
- public static IncludedQuantityUtilizationSummary IncludedQuantityUtilizationSummary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string armSkuName = null, string benefitId = null, string benefitOrderId = null, BillingAccountBenefitKind? benefitType = null, DateTimeOffset? usageOn = null, decimal? utilizationPercentage = null)
+ /// The format of the export being delivered. Currently only 'Csv' is supported.
+ /// Has delivery information for the export.
+ /// Has the definition for the export.
+ /// If requested, has the most recent run history for the export.
+ /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.
+ /// If the export has an active schedule, provides an estimate of the next run time.
+ /// Has schedule information for the export.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static CostManagementExportData CostManagementExportData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ExportFormatType? format, ExportDeliveryDestination deliveryInfoDestination, ExportDefinition definition, IEnumerable runHistoryValue, bool? partitionData, DateTimeOffset? nextRunTimeEstimate, ExportSchedule schedule, ETag? eTag)
{
- return new IncludedQuantityUtilizationSummary(
- id,
- name,
- resourceType,
- systemData,
- BillingAccountBenefitKind.IncludedQuantity,
- serializedAdditionalRawData: null,
- armSkuName,
- benefitId,
- benefitOrderId,
- benefitType,
- usageOn,
- utilizationPercentage);
+ return CostManagementExportData(id: id, name: name, resourceType: resourceType, systemData: systemData, identity: default, location: default, eTag: eTag, format: format, deliveryInfoDestination: deliveryInfoDestination, definition: definition, runHistoryValue: runHistoryValue, partitionData: partitionData, dataOverwriteBehavior: default, compressionMode: default, exportDescription: default, nextRunTimeEstimate: nextRunTimeEstimate, systemSuspensionContext: default, schedule: schedule);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The format of the export being delivered. Currently only 'Csv' is supported.
+ /// Has delivery information for the export.
+ /// Has the definition for the export.
+ /// If requested, has the most recent run history for the export.
+ /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.
+ /// If the export has an active schedule, provides an estimate of the next run time.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static CommonExportProperties CommonExportProperties(ExportFormatType? format, ExportDeliveryDestination deliveryInfoDestination, ExportDefinition definition, IEnumerable runHistoryValue, bool? partitionData, DateTimeOffset? nextRunTimeEstimate)
+ {
+ return CommonExportProperties(format: format, deliveryInfoDestination: deliveryInfoDestination, definition: definition, runHistoryValue: runHistoryValue, partitionData: partitionData, dataOverwriteBehavior: default, compressionMode: default, exportDescription: default, nextRunTimeEstimate: nextRunTimeEstimate, systemSuspensionContext: default);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// ARM SKU name. For example, 'Compute_Savings_Plan' for savings plan.
- /// The benefit ID is the identifier of the benefit.
- /// The benefit order ID is the identifier for a benefit purchase.
- /// The benefit type. Supported values: 'SavingsPlan'.
- /// Date corresponding to the utilization summary record. If the grain of data is monthly, value for this field will be first day of the month.
- /// This is the average hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2023-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the avgUtilizationPercentage value will be equal to the average of the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day.
- /// This is the minimum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2023-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the minUtilizationPercentage value will be equal to the smallest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the lowest utilization percentage was 10% at hour 4, then the value for the minUtilizationPercentage in the response will be 10%.
- /// This is the maximum hourly utilization for each date range that corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2023-03-01 and usageDate < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day, the maxUtilizationPercentage value will be equal to the largest in the set of values where the set contains 24 utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the largest utilization percentage was 90% at hour 5, then the value for the maxUtilizationPercentage in the response will be 90%.
- /// A new instance for mocking.
- public static SavingsPlanUtilizationSummary SavingsPlanUtilizationSummary(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string armSkuName = null, string benefitId = null, string benefitOrderId = null, BillingAccountBenefitKind? benefitType = null, DateTimeOffset? usageOn = null, decimal? avgUtilizationPercentage = null, decimal? minUtilizationPercentage = null, decimal? maxUtilizationPercentage = null)
+ /// The type of the export run.
+ /// The last known status of the export run.
+ /// The identifier for the entity that triggered the export. For on-demand runs it is the user email. For scheduled runs it is 'System'.
+ /// The time when export was queued to be run.
+ /// The time when export was picked up to be run.
+ /// The time when the export run finished.
+ /// The name of the exported file.
+ /// The export settings that were in effect for this run.
+ /// The details of any error.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ExportRun ExportRun(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ExportRunExecutionType? executionType, ExportRunExecutionStatus? status, string submittedBy, DateTimeOffset? submittedOn, DateTimeOffset? processingStartOn, DateTimeOffset? processingEndOn, string fileName, CommonExportProperties runSettings, ExportRunErrorDetails error, ETag? eTag)
{
- return new SavingsPlanUtilizationSummary(
- id,
- name,
- resourceType,
- systemData,
- BillingAccountBenefitKind.SavingsPlan,
- serializedAdditionalRawData: null,
- armSkuName,
- benefitId,
- benefitOrderId,
- benefitType,
- usageOn,
- avgUtilizationPercentage,
- minUtilizationPercentage,
- maxUtilizationPercentage);
+ return ExportRun(id: id, name: name, resourceType: resourceType, systemData: systemData, executionType: executionType, status: status, submittedBy: submittedBy, submittedOn: submittedOn, processingStartOn: processingStartOn, processingEndOn: processingEndOn, startOn: default, endOn: default, fileName: fileName, manifestFile: default, runSettings: runSettings, error: error, eTag: eTag);
}
}
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetCollection.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetCollection.cs
new file mode 100644
index 000000000000..b644e2f1954f
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetCollection.cs
@@ -0,0 +1,489 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetBudgets method from an instance of .
+ ///
+ public partial class BudgetCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _budgetClientDiagnostics;
+ private readonly BudgetsRestOperations _budgetRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected BudgetCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal BudgetCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _budgetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CostManagement", BudgetResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(BudgetResource.ResourceType, out string budgetApiVersion);
+ _budgetRestClient = new BudgetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, budgetApiVersion);
+ }
+
+ ///
+ /// The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Budget Name.
+ /// Parameters supplied to the Create Budget operation.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string budgetName, BudgetData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _budgetRestClient.CreateOrUpdateAsync(Id, budgetName, data, cancellationToken).ConfigureAwait(false);
+ var uri = _budgetRestClient.CreateCreateOrUpdateRequestUri(Id, budgetName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new BudgetResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Budget Name.
+ /// Parameters supplied to the Create Budget operation.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string budgetName, BudgetData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _budgetRestClient.CreateOrUpdate(Id, budgetName, data, cancellationToken);
+ var uri = _budgetRestClient.CreateCreateOrUpdateRequestUri(Id, budgetName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new BudgetResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the budget for the scope by budget name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Budget Name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string budgetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _budgetRestClient.GetAsync(Id, budgetName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new BudgetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the budget for the scope by budget name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Budget Name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string budgetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _budgetRestClient.Get(Id, budgetName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new BudgetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Lists all budgets for the defined scope.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// OData filter option. May be used to filter budgets by properties/category. The filter supports 'eq' only.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(string filter = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _budgetRestClient.CreateListRequest(Id, filter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _budgetRestClient.CreateListNextPageRequest(nextLink, Id, filter);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new BudgetResource(Client, BudgetData.DeserializeBudgetData(e)), _budgetClientDiagnostics, Pipeline, "BudgetCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists all budgets for the defined scope.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// OData filter option. May be used to filter budgets by properties/category. The filter supports 'eq' only.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(string filter = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _budgetRestClient.CreateListRequest(Id, filter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _budgetRestClient.CreateListNextPageRequest(nextLink, Id, filter);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new BudgetResource(Client, BudgetData.DeserializeBudgetData(e)), _budgetClientDiagnostics, Pipeline, "BudgetCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Budget Name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string budgetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _budgetRestClient.GetAsync(Id, budgetName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Budget Name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string budgetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _budgetRestClient.Get(Id, budgetName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Budget Name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string budgetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _budgetRestClient.GetAsync(Id, budgetName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new BudgetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Budget Name.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string budgetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(budgetName, nameof(budgetName));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _budgetRestClient.Get(Id, budgetName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new BudgetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetData.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetData.Serialization.cs
new file mode 100644
index 000000000000..1f36cb598d97
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetData.Serialization.cs
@@ -0,0 +1,310 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.CostManagement.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ public partial class BudgetData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BudgetData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(ETag))
+ {
+ writer.WritePropertyName("eTag"u8);
+ writer.WriteStringValue(ETag.Value.ToString());
+ }
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Category))
+ {
+ writer.WritePropertyName("category"u8);
+ writer.WriteStringValue(Category.Value.ToString());
+ }
+ if (Optional.IsDefined(Amount))
+ {
+ writer.WritePropertyName("amount"u8);
+ writer.WriteNumberValue(Amount.Value);
+ }
+ if (Optional.IsDefined(TimeGrain))
+ {
+ writer.WritePropertyName("timeGrain"u8);
+ writer.WriteStringValue(TimeGrain.Value.ToString());
+ }
+ if (Optional.IsDefined(TimePeriod))
+ {
+ writer.WritePropertyName("timePeriod"u8);
+ writer.WriteObjectValue(TimePeriod, options);
+ }
+ if (Optional.IsDefined(Filter))
+ {
+ writer.WritePropertyName("filter"u8);
+ writer.WriteObjectValue(Filter, options);
+ }
+ if (options.Format != "W" && Optional.IsDefined(CurrentSpend))
+ {
+ writer.WritePropertyName("currentSpend"u8);
+ writer.WriteObjectValue(CurrentSpend, options);
+ }
+ if (Optional.IsCollectionDefined(Notifications))
+ {
+ writer.WritePropertyName("notifications"u8);
+ writer.WriteStartObject();
+ foreach (var item in Notifications)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteObjectValue(item.Value, options);
+ }
+ writer.WriteEndObject();
+ }
+ if (options.Format != "W" && Optional.IsDefined(ForecastSpend))
+ {
+ writer.WritePropertyName("forecastSpend"u8);
+ writer.WriteObjectValue(ForecastSpend, options);
+ }
+ writer.WriteEndObject();
+ }
+
+ BudgetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BudgetData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBudgetData(document.RootElement, options);
+ }
+
+ internal static BudgetData DeserializeBudgetData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ETag? eTag = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ CategoryType? category = default;
+ float? amount = default;
+ TimeGrainType? timeGrain = default;
+ BudgetTimePeriod timePeriod = default;
+ BudgetFilter filter = default;
+ CurrentSpend currentSpend = default;
+ IDictionary notifications = default;
+ ForecastSpend forecastSpend = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("eTag"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ eTag = new ETag(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerCostManagementContext.Default);
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("category"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ category = new CategoryType(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("amount"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ amount = property0.Value.GetSingle();
+ continue;
+ }
+ if (property0.NameEquals("timeGrain"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ timeGrain = new TimeGrainType(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("timePeriod"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ timePeriod = BudgetTimePeriod.DeserializeBudgetTimePeriod(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("filter"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ filter = BudgetFilter.DeserializeBudgetFilter(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("currentSpend"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ currentSpend = CurrentSpend.DeserializeCurrentSpend(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("notifications"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property1 in property0.Value.EnumerateObject())
+ {
+ dictionary.Add(property1.Name, Notification.DeserializeNotification(property1.Value, options));
+ }
+ notifications = dictionary;
+ continue;
+ }
+ if (property0.NameEquals("forecastSpend"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ forecastSpend = ForecastSpend.DeserializeForecastSpend(property0.Value, options);
+ continue;
+ }
+ }
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new BudgetData(
+ id,
+ name,
+ type,
+ systemData,
+ eTag,
+ category,
+ amount,
+ timeGrain,
+ timePeriod,
+ filter,
+ currentSpend,
+ notifications ?? new ChangeTrackingDictionary(),
+ forecastSpend,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerCostManagementContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(BudgetData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ BudgetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBudgetData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BudgetData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetData.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetData.cs
new file mode 100644
index 000000000000..87867a90ae84
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetData.cs
@@ -0,0 +1,220 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.CostManagement.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ ///
+ /// A class representing the Budget data model.
+ /// A budget resource.
+ ///
+ public partial class BudgetData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public BudgetData()
+ {
+ Notifications = new ChangeTrackingDictionary();
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ ///
+ /// The category of the budget.
+ /// - 'Cost' defines a Budget.
+ /// - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ ///
+ ///
+ /// The total amount of cost to track with the budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ /// Required for CategoryType(s): Cost.
+ ///
+ ///
+ /// The time covered by a budget. Tracking of the amount will be reset based on the time grain.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// Supported timeGrainTypes for **CategoryType: Cost**
+ ///
+ /// - Monthly
+ /// - Quarterly
+ /// - Annually
+ /// - BillingMonth*
+ /// - BillingQuarter*
+ /// - BillingAnnual*
+ ///
+ /// *only supported for Web Direct customers.
+ ///
+ /// Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ /// - Last7Days
+ /// - Last30Days
+ ///
+ /// Required for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ ///
+ /// The time period that defines the active period of the budget. The budget will evaluate data on or after the startDate and will expire on the endDate.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// Required for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ ///
+ /// May be used to filter budgets by user-specified dimensions and/or tags.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ ///
+ /// The current amount of cost which is being tracked for a budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ ///
+ /// Dictionary of notifications associated with the budget.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5 notifications with thresholdType: Forecasted.
+ /// - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not applicable.
+ ///
+ ///
+ /// The forecasted cost which is being tracked for a budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ /// Keeps track of any properties unknown to the library.
+ internal BudgetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, CategoryType? category, float? amount, TimeGrainType? timeGrain, BudgetTimePeriod timePeriod, BudgetFilter filter, CurrentSpend currentSpend, IDictionary notifications, ForecastSpend forecastSpend, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ ETag = eTag;
+ Category = category;
+ Amount = amount;
+ TimeGrain = timeGrain;
+ TimePeriod = timePeriod;
+ Filter = filter;
+ CurrentSpend = currentSpend;
+ Notifications = notifications;
+ ForecastSpend = forecastSpend;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ public ETag? ETag { get; set; }
+ ///
+ /// The category of the budget.
+ /// - 'Cost' defines a Budget.
+ /// - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ ///
+ public CategoryType? Category { get; set; }
+ ///
+ /// The total amount of cost to track with the budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ /// Required for CategoryType(s): Cost.
+ ///
+ public float? Amount { get; set; }
+ ///
+ /// The time covered by a budget. Tracking of the amount will be reset based on the time grain.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// Supported timeGrainTypes for **CategoryType: Cost**
+ ///
+ /// - Monthly
+ /// - Quarterly
+ /// - Annually
+ /// - BillingMonth*
+ /// - BillingQuarter*
+ /// - BillingAnnual*
+ ///
+ /// *only supported for Web Direct customers.
+ ///
+ /// Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ /// - Last7Days
+ /// - Last30Days
+ ///
+ /// Required for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ public TimeGrainType? TimeGrain { get; set; }
+ ///
+ /// The time period that defines the active period of the budget. The budget will evaluate data on or after the startDate and will expire on the endDate.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// Required for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ public BudgetTimePeriod TimePeriod { get; set; }
+ ///
+ /// May be used to filter budgets by user-specified dimensions and/or tags.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ public BudgetFilter Filter { get; set; }
+ ///
+ /// The current amount of cost which is being tracked for a budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ public CurrentSpend CurrentSpend { get; }
+ ///
+ /// Dictionary of notifications associated with the budget.
+ ///
+ /// Supported for CategoryType(s): Cost, ReservationUtilization.
+ ///
+ /// - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5 notifications with thresholdType: Forecasted.
+ /// - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not applicable.
+ ///
+ public IDictionary Notifications { get; }
+ ///
+ /// The forecasted cost which is being tracked for a budget.
+ ///
+ /// Supported for CategoryType(s): Cost.
+ ///
+ public ForecastSpend ForecastSpend { get; }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetResource.Serialization.cs
new file mode 100644
index 000000000000..cf5b568788a6
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetResource.Serialization.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ public partial class BudgetResource : IJsonModel
+ {
+ private static BudgetData s_dataDeserializationInstance;
+ private static BudgetData DataDeserializationInstance => s_dataDeserializationInstance ??= new();
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ BudgetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default);
+
+ BudgetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetResource.cs
new file mode 100644
index 000000000000..412f2fbf6e79
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/BudgetResource.cs
@@ -0,0 +1,353 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ ///
+ /// A Class representing a Budget along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetBudgetResource method.
+ /// Otherwise you can get one from its parent resource using the GetBudget method.
+ ///
+ public partial class BudgetResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The scope.
+ /// The budgetName.
+ public static ResourceIdentifier CreateResourceIdentifier(string scope, string budgetName)
+ {
+ var resourceId = $"{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _budgetClientDiagnostics;
+ private readonly BudgetsRestOperations _budgetRestClient;
+ private readonly BudgetData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.CostManagement/budgets";
+
+ /// Initializes a new instance of the class for mocking.
+ protected BudgetResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal BudgetResource(ArmClient client, BudgetData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal BudgetResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _budgetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CostManagement", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string budgetApiVersion);
+ _budgetRestClient = new BudgetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, budgetApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual BudgetData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Gets the budget for the scope by budget name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _budgetRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new BudgetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the budget for the scope by budget name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _budgetRestClient.Get(Id.Parent, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new BudgetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// The operation to delete a budget.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _budgetRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var uri = _budgetRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// The operation to delete a budget.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _budgetRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
+ var uri = _budgetRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Parameters supplied to the Create Budget operation.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, BudgetData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _budgetRestClient.CreateOrUpdateAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var uri = _budgetRestClient.CreateCreateOrUpdateRequestUri(Id.Parent, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new BudgetResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Budgets_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Parameters supplied to the Create Budget operation.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, BudgetData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _budgetClientDiagnostics.CreateScope("BudgetResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _budgetRestClient.CreateOrUpdate(Id.Parent, Id.Name, data, cancellationToken);
+ var uri = _budgetRestClient.CreateCreateOrUpdateRequestUri(Id.Parent, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new BudgetResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionCollection.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionCollection.cs
new file mode 100644
index 000000000000..f1df916515e5
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionCollection.cs
@@ -0,0 +1,503 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetCostAllocationRuleDefinitions method from an instance of .
+ ///
+ public partial class CostAllocationRuleDefinitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics;
+ private readonly CostAllocationRulesRestOperations _costAllocationRuleDefinitionCostAllocationRulesRestClient;
+ private readonly string _billingAccountId;
+
+ /// Initializes a new instance of the class for mocking.
+ protected CostAllocationRuleDefinitionCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ /// BillingAccount ID.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ internal CostAllocationRuleDefinitionCollection(ArmClient client, ResourceIdentifier id, string billingAccountId) : base(client, id)
+ {
+ _billingAccountId = billingAccountId;
+ _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CostManagement", CostAllocationRuleDefinitionResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(CostAllocationRuleDefinitionResource.ResourceType, out string costAllocationRuleDefinitionCostAllocationRulesApiVersion);
+ _costAllocationRuleDefinitionCostAllocationRulesRestClient = new CostAllocationRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, costAllocationRuleDefinitionCostAllocationRulesApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != TenantResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, TenantResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create/Update a rule to allocate cost between different resources within a billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// Cost allocation rule to be created or updated.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ruleName, CostAllocationRuleDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateOrUpdateAsync(_billingAccountId, ruleName, data, cancellationToken).ConfigureAwait(false);
+ var uri = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateCreateOrUpdateRequestUri(_billingAccountId, ruleName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create/Update a rule to allocate cost between different resources within a billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// Cost allocation rule to be created or updated.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ruleName, CostAllocationRuleDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateOrUpdate(_billingAccountId, ruleName, data, cancellationToken);
+ var uri = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateCreateOrUpdateRequestUri(_billingAccountId, ruleName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string ruleName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _costAllocationRuleDefinitionCostAllocationRulesRestClient.GetAsync(_billingAccountId, ruleName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string ruleName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _costAllocationRuleDefinitionCostAllocationRulesRestClient.Get(_billingAccountId, ruleName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the list of all cost allocation rules for a billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateListRequest(_billingAccountId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateListNextPageRequest(nextLink, _billingAccountId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CostAllocationRuleDefinitionResource(Client, CostAllocationRuleDefinitionData.DeserializeCostAllocationRuleDefinitionData(e)), _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics, Pipeline, "CostAllocationRuleDefinitionCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Get the list of all cost allocation rules for a billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateListRequest(_billingAccountId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateListNextPageRequest(nextLink, _billingAccountId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CostAllocationRuleDefinitionResource(Client, CostAllocationRuleDefinitionData.DeserializeCostAllocationRuleDefinitionData(e)), _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics, Pipeline, "CostAllocationRuleDefinitionCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string ruleName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _costAllocationRuleDefinitionCostAllocationRulesRestClient.GetAsync(_billingAccountId, ruleName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string ruleName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _costAllocationRuleDefinitionCostAllocationRulesRestClient.Get(_billingAccountId, ruleName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string ruleName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _costAllocationRuleDefinitionCostAllocationRulesRestClient.GetAsync(_billingAccountId, ruleName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string ruleName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _costAllocationRuleDefinitionCostAllocationRulesRestClient.Get(_billingAccountId, ruleName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionData.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionData.Serialization.cs
new file mode 100644
index 000000000000..1e69fdaa89d9
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionData.Serialization.cs
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.CostManagement.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ public partial class CostAllocationRuleDefinitionData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(CostAllocationRuleDefinitionData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ CostAllocationRuleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(CostAllocationRuleDefinitionData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeCostAllocationRuleDefinitionData(document.RootElement, options);
+ }
+
+ internal static CostAllocationRuleDefinitionData DeserializeCostAllocationRuleDefinitionData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ CostAllocationRuleProperties properties = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = CostAllocationRuleProperties.DeserializeCostAllocationRuleProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerCostManagementContext.Default);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new CostAllocationRuleDefinitionData(
+ id,
+ name,
+ type,
+ systemData,
+ properties,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerCostManagementContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(CostAllocationRuleDefinitionData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ CostAllocationRuleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeCostAllocationRuleDefinitionData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(CostAllocationRuleDefinitionData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionData.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionData.cs
new file mode 100644
index 000000000000..d82396134494
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionData.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.CostManagement.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ ///
+ /// A class representing the CostAllocationRuleDefinition data model.
+ /// The cost allocation rule model definition
+ ///
+ public partial class CostAllocationRuleDefinitionData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public CostAllocationRuleDefinitionData()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Cost allocation rule properties.
+ /// Keeps track of any properties unknown to the library.
+ internal CostAllocationRuleDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CostAllocationRuleProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Cost allocation rule properties.
+ public CostAllocationRuleProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionResource.Serialization.cs
new file mode 100644
index 000000000000..e65ed004fbf3
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionResource.Serialization.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ public partial class CostAllocationRuleDefinitionResource : IJsonModel
+ {
+ private static CostAllocationRuleDefinitionData s_dataDeserializationInstance;
+ private static CostAllocationRuleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new();
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ CostAllocationRuleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default);
+
+ CostAllocationRuleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionResource.cs
new file mode 100644
index 000000000000..4e2f53599de0
--- /dev/null
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostAllocationRuleDefinitionResource.cs
@@ -0,0 +1,354 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.CostManagement
+{
+ ///
+ /// A Class representing a CostAllocationRuleDefinition along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetCostAllocationRuleDefinitionResource method.
+ /// Otherwise you can get one from its parent resource using the GetCostAllocationRuleDefinition method.
+ ///
+ public partial class CostAllocationRuleDefinitionResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The billingAccountId.
+ /// The ruleName.
+ public static ResourceIdentifier CreateResourceIdentifier(string billingAccountId, string ruleName)
+ {
+ var resourceId = $"/providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics;
+ private readonly CostAllocationRulesRestOperations _costAllocationRuleDefinitionCostAllocationRulesRestClient;
+ private readonly CostAllocationRuleDefinitionData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.CostManagement/costAllocationRules";
+
+ /// Initializes a new instance of the class for mocking.
+ protected CostAllocationRuleDefinitionResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal CostAllocationRuleDefinitionResource(ArmClient client, CostAllocationRuleDefinitionData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal CostAllocationRuleDefinitionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.CostManagement", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string costAllocationRuleDefinitionCostAllocationRulesApiVersion);
+ _costAllocationRuleDefinitionCostAllocationRulesRestClient = new CostAllocationRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, costAllocationRuleDefinitionCostAllocationRulesApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual CostAllocationRuleDefinitionData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _costAllocationRuleDefinitionCostAllocationRulesRestClient.GetAsync(Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _costAllocationRuleDefinitionCostAllocationRulesRestClient.Get(Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete cost allocation rule for billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _costAllocationRuleDefinitionCostAllocationRulesRestClient.DeleteAsync(Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var uri = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateDeleteRequestUri(Id.Parent.Name, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete cost allocation rule for billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _costAllocationRuleDefinitionCostAllocationRulesRestClient.Delete(Id.Parent.Name, Id.Name, cancellationToken);
+ var uri = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateDeleteRequestUri(Id.Parent.Name, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create/Update a rule to allocate cost between different resources within a billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Cost allocation rule to be created or updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, CostAllocationRuleDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateOrUpdateAsync(Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var uri = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateCreateOrUpdateRequestUri(Id.Parent.Name, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create/Update a rule to allocate cost between different resources within a billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Cost allocation rule to be created or updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, CostAllocationRuleDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics.CreateScope("CostAllocationRuleDefinitionResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateOrUpdate(Id.Parent.Name, Id.Name, data, cancellationToken);
+ var uri = _costAllocationRuleDefinitionCostAllocationRulesRestClient.CreateCreateOrUpdateRequestUri(Id.Parent.Name, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new CostManagementArmOperation(Response.FromValue(new CostAllocationRuleDefinitionResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertCollection.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertCollection.cs
index a80c010a3be2..96cd7143bc30 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertCollection.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertCollection.cs
@@ -54,7 +54,7 @@ internal CostManagementAlertCollection(ArmClient client, ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -98,7 +98,7 @@ public virtual async Task> GetAsync(string
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -142,7 +142,7 @@ public virtual Response Get(string alertId, Cancell
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -171,7 +171,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -200,7 +200,7 @@ public virtual Pageable GetAll(CancellationToken ca
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -242,7 +242,7 @@ public virtual async Task> ExistsAsync(string alertId, Cancellati
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -284,7 +284,7 @@ public virtual Response Exists(string alertId, CancellationToken cancellat
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -328,7 +328,7 @@ public virtual async Task> GetIfEx
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.Serialization.cs
index c5d35c8e94d1..8caa1a214482 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.Serialization.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.Serialization.cs
@@ -286,6 +286,7 @@ internal static CostManagementAlertData DeserializeCostManagementAlertData(JsonE
name,
type,
systemData,
+ eTag,
definition,
description,
source,
@@ -297,7 +298,6 @@ internal static CostManagementAlertData DeserializeCostManagementAlertData(JsonE
modificationTime,
statusModificationUserName,
statusModificationTime,
- eTag,
serializedAdditionalRawData);
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.cs
index a59cc76dc89b..73216024f546 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertData.cs
@@ -61,6 +61,7 @@ public CostManagementAlertData()
/// The name.
/// The resourceType.
/// The systemData.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
/// defines the type of alert.
/// Alert description.
/// Source of alert.
@@ -72,10 +73,10 @@ public CostManagementAlertData()
/// dateTime in which alert was last modified.
/// User who last modified the alert.
/// dateTime in which the alert status was last modified.
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
/// Keeps track of any properties unknown to the library.
- internal CostManagementAlertData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AlertPropertiesDefinition definition, string description, CostManagementAlertSource? source, AlertPropertiesDetails details, string costEntityId, CostManagementAlertStatus? status, DateTimeOffset? createdOn, DateTimeOffset? closeOn, DateTimeOffset? modifiedOn, string statusModificationUserName, DateTimeOffset? statusModifiedOn, ETag? eTag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal CostManagementAlertData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, AlertPropertiesDefinition definition, string description, CostManagementAlertSource? source, AlertPropertiesDetails details, string costEntityId, CostManagementAlertStatus? status, DateTimeOffset? createdOn, DateTimeOffset? closeOn, DateTimeOffset? modifiedOn, string statusModificationUserName, DateTimeOffset? statusModifiedOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
+ ETag = eTag;
Definition = definition;
Description = description;
Source = source;
@@ -87,10 +88,11 @@ internal CostManagementAlertData(ResourceIdentifier id, string name, ResourceTyp
ModifiedOn = modifiedOn;
StatusModificationUserName = statusModificationUserName;
StatusModifiedOn = statusModifiedOn;
- ETag = eTag;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ public ETag? ETag { get; set; }
/// defines the type of alert.
public AlertPropertiesDefinition Definition { get; set; }
/// Alert description.
@@ -113,7 +115,5 @@ internal CostManagementAlertData(ResourceIdentifier id, string name, ResourceTyp
public string StatusModificationUserName { get; set; }
/// dateTime in which the alert status was last modified.
public DateTimeOffset? StatusModifiedOn { get; set; }
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- public ETag? ETag { get; set; }
}
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.cs
index 98df91947cea..282b2ec92f09 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.cs
@@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancel
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cance
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -222,7 +222,7 @@ public virtual async Task> UpdateAsync(Cos
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportCollection.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportCollection.cs
index 143743c49def..c5bfd696fbae 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportCollection.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportCollection.cs
@@ -54,7 +54,7 @@ internal CostManagementExportCollection(ArmClient client, ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -105,7 +105,7 @@ public virtual async Task> CreateOrUp
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -156,7 +156,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -202,7 +202,7 @@ public virtual async Task> GetAsync(strin
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -248,7 +248,7 @@ public virtual Response Get(string exportName, str
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(string ex
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -308,7 +308,7 @@ public virtual Pageable GetAll(string expand = nul
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(string exportName, string
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -396,7 +396,7 @@ public virtual Response Exists(string exportName, string expand = null, Ca
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -442,7 +442,7 @@ public virtual async Task> GetIfE
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.Serialization.cs
index 860c981367e4..958be8b50dd3 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.Serialization.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.Serialization.cs
@@ -38,6 +38,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
}
base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Identity))
+ {
+ writer.WritePropertyName("identity"u8);
+ ((IJsonModel)Identity).Write(writer, options);
+ }
+ if (Optional.IsDefined(Location))
+ {
+ writer.WritePropertyName("location"u8);
+ writer.WriteStringValue(Location.Value);
+ }
if (Optional.IsDefined(ETag))
{
writer.WritePropertyName("eTag"u8);
@@ -70,11 +80,31 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
writer.WritePropertyName("partitionData"u8);
writer.WriteBooleanValue(PartitionData.Value);
}
+ if (Optional.IsDefined(DataOverwriteBehavior))
+ {
+ writer.WritePropertyName("dataOverwriteBehavior"u8);
+ writer.WriteStringValue(DataOverwriteBehavior.Value.ToString());
+ }
+ if (Optional.IsDefined(CompressionMode))
+ {
+ writer.WritePropertyName("compressionMode"u8);
+ writer.WriteStringValue(CompressionMode.Value.ToString());
+ }
+ if (Optional.IsDefined(ExportDescription))
+ {
+ writer.WritePropertyName("exportDescription"u8);
+ writer.WriteStringValue(ExportDescription);
+ }
if (options.Format != "W" && Optional.IsDefined(NextRunTimeEstimate))
{
writer.WritePropertyName("nextRunTimeEstimate"u8);
writer.WriteStringValue(NextRunTimeEstimate.Value, "O");
}
+ if (options.Format != "W" && Optional.IsDefined(SystemSuspensionContext))
+ {
+ writer.WritePropertyName("systemSuspensionContext"u8);
+ writer.WriteObjectValue(SystemSuspensionContext, options);
+ }
if (Optional.IsDefined(Schedule))
{
writer.WritePropertyName("schedule"u8);
@@ -103,6 +133,8 @@ internal static CostManagementExportData DeserializeCostManagementExportData(Jso
{
return null;
}
+ ManagedServiceIdentity identity = default;
+ AzureLocation? location = default;
ETag? eTag = default;
ResourceIdentifier id = default;
string name = default;
@@ -113,12 +145,34 @@ internal static CostManagementExportData DeserializeCostManagementExportData(Jso
ExportDefinition definition = default;
ExportExecutionListResult runHistory = default;
bool? partitionData = default;
+ DataOverwriteBehaviorType? dataOverwriteBehavior = default;
+ CompressionModeType? compressionMode = default;
+ string exportDescription = default;
DateTimeOffset? nextRunTimeEstimate = default;
+ ExportSuspensionContext systemSuspensionContext = default;
ExportSchedule schedule = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
+ if (property.NameEquals("identity"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerCostManagementContext.Default);
+ continue;
+ }
+ if (property.NameEquals("location"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ location = new AzureLocation(property.Value.GetString());
+ continue;
+ }
if (property.NameEquals("eTag"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -206,6 +260,29 @@ internal static CostManagementExportData DeserializeCostManagementExportData(Jso
partitionData = property0.Value.GetBoolean();
continue;
}
+ if (property0.NameEquals("dataOverwriteBehavior"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ dataOverwriteBehavior = new DataOverwriteBehaviorType(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("compressionMode"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ compressionMode = new CompressionModeType(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("exportDescription"u8))
+ {
+ exportDescription = property0.Value.GetString();
+ continue;
+ }
if (property0.NameEquals("nextRunTimeEstimate"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -215,6 +292,15 @@ internal static CostManagementExportData DeserializeCostManagementExportData(Jso
nextRunTimeEstimate = property0.Value.GetDateTimeOffset("O");
continue;
}
+ if (property0.NameEquals("systemSuspensionContext"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemSuspensionContext = ExportSuspensionContext.DeserializeExportSuspensionContext(property0.Value, options);
+ continue;
+ }
if (property0.NameEquals("schedule"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -238,14 +324,20 @@ internal static CostManagementExportData DeserializeCostManagementExportData(Jso
name,
type,
systemData,
+ identity,
+ location,
+ eTag,
format,
deliveryInfo,
definition,
runHistory,
partitionData,
+ dataOverwriteBehavior,
+ compressionMode,
+ exportDescription,
nextRunTimeEstimate,
+ systemSuspensionContext,
schedule,
- eTag,
serializedAdditionalRawData);
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.cs
index 7276d23353b5..07f145ef7d6b 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportData.cs
@@ -61,29 +61,47 @@ public CostManagementExportData()
/// The name.
/// The resourceType.
/// The systemData.
- /// The format of the export being delivered. Currently only 'Csv' is supported.
+ /// The managed identity associated with Export. Current supported identity types: None, SystemAssigned.
+ /// The location of the Export's managed identity. Only required when utilizing managed identity.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ /// The format of the export being delivered.
/// Has delivery information for the export.
/// Has the definition for the export.
/// If requested, has the most recent run history for the export.
- /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.
+ /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.
+ /// Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same month in customer storage account. By default set to CreateNewReport.
+ /// Allow customers to select compress data for exports. This setting will enable destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet.
+ /// The export description set by customer at time of export creation/update.
/// If the export has an active schedule, provides an estimate of the next run time.
+ /// The export suspension reason if export is in SystemSuspended state. This is not populated currently.
/// Has schedule information for the export.
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
/// Keeps track of any properties unknown to the library.
- internal CostManagementExportData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ExportFormatType? format, ExportDeliveryInfo deliveryInfo, ExportDefinition definition, ExportExecutionListResult runHistory, bool? partitionData, DateTimeOffset? nextRunTimeEstimate, ExportSchedule schedule, ETag? eTag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal CostManagementExportData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, AzureLocation? location, ETag? eTag, ExportFormatType? format, ExportDeliveryInfo deliveryInfo, ExportDefinition definition, ExportExecutionListResult runHistory, bool? partitionData, DataOverwriteBehaviorType? dataOverwriteBehavior, CompressionModeType? compressionMode, string exportDescription, DateTimeOffset? nextRunTimeEstimate, ExportSuspensionContext systemSuspensionContext, ExportSchedule schedule, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
+ Identity = identity;
+ Location = location;
+ ETag = eTag;
Format = format;
DeliveryInfo = deliveryInfo;
Definition = definition;
RunHistory = runHistory;
PartitionData = partitionData;
+ DataOverwriteBehavior = dataOverwriteBehavior;
+ CompressionMode = compressionMode;
+ ExportDescription = exportDescription;
NextRunTimeEstimate = nextRunTimeEstimate;
+ SystemSuspensionContext = systemSuspensionContext;
Schedule = schedule;
- ETag = eTag;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// The format of the export being delivered. Currently only 'Csv' is supported.
+ /// The managed identity associated with Export. Current supported identity types: None, SystemAssigned.
+ public ManagedServiceIdentity Identity { get; set; }
+ /// The location of the Export's managed identity. Only required when utilizing managed identity.
+ public AzureLocation? Location { get; set; }
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ public ETag? ETag { get; set; }
+ /// The format of the export being delivered.
public ExportFormatType? Format { get; set; }
/// Has delivery information for the export.
internal ExportDeliveryInfo DeliveryInfo { get; set; }
@@ -109,13 +127,19 @@ public IReadOnlyList RunHistoryValue
}
}
- /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.
+ /// If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.
public bool? PartitionData { get; set; }
+ /// Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same month in customer storage account. By default set to CreateNewReport.
+ public DataOverwriteBehaviorType? DataOverwriteBehavior { get; set; }
+ /// Allow customers to select compress data for exports. This setting will enable destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet.
+ public CompressionModeType? CompressionMode { get; set; }
+ /// The export description set by customer at time of export creation/update.
+ public string ExportDescription { get; set; }
/// If the export has an active schedule, provides an estimate of the next run time.
public DateTimeOffset? NextRunTimeEstimate { get; }
+ /// The export suspension reason if export is in SystemSuspended state. This is not populated currently.
+ public ExportSuspensionContext SystemSuspensionContext { get; }
/// Has schedule information for the export.
public ExportSchedule Schedule { get; set; }
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- public ETag? ETag { get; set; }
}
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.cs
index d95db81fa6de..7a8d13523968 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.cs
@@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -142,7 +142,7 @@ public virtual async Task> GetAsync(strin
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -183,7 +183,7 @@ public virtual Response Get(string expand = null,
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -319,7 +319,7 @@ public virtual async Task> UpdateAsyn
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUntil waitU
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -375,14 +375,15 @@ public virtual ArmOperation Update(WaitUntil waitU
///
///
///
+ /// Parameters supplied to the Execute Export operation.
/// The cancellation token to use.
- public virtual async Task ExecuteAsync(CancellationToken cancellationToken = default)
+ public virtual async Task ExecuteAsync(ExportRunContent content = null, CancellationToken cancellationToken = default)
{
using var scope = _costManagementExportExportsClientDiagnostics.CreateScope("CostManagementExportResource.Execute");
scope.Start();
try
{
- var response = await _costManagementExportExportsRestClient.ExecuteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var response = await _costManagementExportExportsRestClient.ExecuteAsync(Id.Parent, Id.Name, content, cancellationToken).ConfigureAwait(false);
return response;
}
catch (Exception e)
@@ -405,7 +406,7 @@ public virtual async Task ExecuteAsync(CancellationToken cancellationT
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -413,14 +414,15 @@ public virtual async Task ExecuteAsync(CancellationToken cancellationT
///
///
///
+ /// Parameters supplied to the Execute Export operation.
/// The cancellation token to use.
- public virtual Response Execute(CancellationToken cancellationToken = default)
+ public virtual Response Execute(ExportRunContent content = null, CancellationToken cancellationToken = default)
{
using var scope = _costManagementExportExportsClientDiagnostics.CreateScope("CostManagementExportResource.Execute");
scope.Start();
try
{
- var response = _costManagementExportExportsRestClient.Execute(Id.Parent, Id.Name, cancellationToken);
+ var response = _costManagementExportExportsRestClient.Execute(Id.Parent, Id.Name, content, cancellationToken);
return response;
}
catch (Exception e)
@@ -443,7 +445,7 @@ public virtual Response Execute(CancellationToken cancellationToken = default)
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -472,7 +474,7 @@ public virtual AsyncPageable GetExecutionHistoryAsync(CancellationTok
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.Serialization.cs
index 44b4d423d8e7..4720d3dfc4c3 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.Serialization.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.Serialization.cs
@@ -60,12 +60,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
writer.WritePropertyName("createdOn"u8);
writer.WriteStringValue(CreatedOn.Value, "O");
}
- if (options.Format != "W" && Optional.IsDefined(ModifiedOn))
+ if (Optional.IsDefined(ModifiedOn))
{
writer.WritePropertyName("modifiedOn"u8);
writer.WriteStringValue(ModifiedOn.Value, "O");
}
- if (options.Format != "W" && Optional.IsDefined(DateRange))
+ if (Optional.IsDefined(DateRange))
{
writer.WritePropertyName("dateRange"u8);
writer.WriteStringValue(DateRange);
@@ -396,6 +396,7 @@ internal static CostManagementViewData DeserializeCostManagementViewData(JsonEle
name,
type,
systemData,
+ eTag,
displayName,
scope,
createdOn,
@@ -412,7 +413,6 @@ internal static CostManagementViewData DeserializeCostManagementViewData(JsonEle
timePeriod,
dataSet,
includeMonetaryCommitment,
- eTag,
serializedAdditionalRawData);
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.cs
index 4f6b866af8ff..be473f2f686d 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewData.cs
@@ -63,6 +63,7 @@ public CostManagementViewData()
/// The name.
/// The resourceType.
/// The systemData.
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
/// User input name of the view. Required.
/// Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
/// Date the user created this view.
@@ -79,10 +80,10 @@ public CostManagementViewData()
/// Has time period for pulling data for the report.
/// Has definition for data in this report config.
/// If true, report includes monetary commitment.
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
/// Keeps track of any properties unknown to the library.
- internal CostManagementViewData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, ResourceIdentifier scope, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string dateRange, string currency, ViewChartType? chart, AccumulatedType? accumulated, ViewMetricType? metric, IList kpis, IList pivots, ViewReportType? typePropertiesQueryType, ReportTimeframeType? timeframe, ReportConfigTimePeriod timePeriod, ReportConfigDataset dataSet, bool? includeMonetaryCommitment, ETag? eTag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal CostManagementViewData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, string displayName, ResourceIdentifier scope, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string dateRange, string currency, ViewChartType? chart, AccumulatedType? accumulated, ViewMetricType? metric, IList kpis, IList pivots, ViewReportType? typePropertiesQueryType, ReportTimeframeType? timeframe, ReportConfigTimePeriod timePeriod, ReportConfigDataset dataSet, bool? includeMonetaryCommitment, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
+ ETag = eTag;
DisplayName = displayName;
Scope = scope;
CreatedOn = createdOn;
@@ -99,10 +100,11 @@ internal CostManagementViewData(ResourceIdentifier id, string name, ResourceType
TimePeriod = timePeriod;
DataSet = dataSet;
IncludeMonetaryCommitment = includeMonetaryCommitment;
- ETag = eTag;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
+ /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ public ETag? ETag { get; set; }
/// User input name of the view. Required.
public string DisplayName { get; set; }
/// Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
@@ -110,9 +112,9 @@ internal CostManagementViewData(ResourceIdentifier id, string name, ResourceType
/// Date the user created this view.
public DateTimeOffset? CreatedOn { get; }
/// Date when the user last modified this view.
- public DateTimeOffset? ModifiedOn { get; }
+ public DateTimeOffset? ModifiedOn { get; set; }
/// Date range of the current view.
- public string DateRange { get; }
+ public string DateRange { get; set; }
/// Currency of the current view.
public string Currency { get; }
/// Chart type of the main view in Cost Analysis. Required.
@@ -135,7 +137,5 @@ internal CostManagementViewData(ResourceIdentifier id, string name, ResourceType
public ReportConfigDataset DataSet { get; set; }
/// If true, report includes monetary commitment.
public bool? IncludeMonetaryCommitment { get; set; }
- /// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- public ETag? ETag { get; set; }
}
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsCollection.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsCollection.cs
index 397bfbe5da8e..4bb9acafe0e7 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsCollection.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsCollection.cs
@@ -54,7 +54,7 @@ internal CostManagementViewsCollection(ArmClient client, ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -105,7 +105,7 @@ public virtual async Task> CreateOrUpd
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -156,7 +156,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -201,7 +201,7 @@ public virtual async Task> GetAsync(string
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -246,7 +246,7 @@ public virtual Response Get(string viewName, Cancel
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -276,7 +276,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -306,7 +306,7 @@ public virtual Pageable GetAll(CancellationToken ca
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(string viewName, Cancellat
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -392,7 +392,7 @@ public virtual Response Exists(string viewName, CancellationToken cancella
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -437,7 +437,7 @@ public virtual async Task> GetIfEx
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.cs
index 68589ae59e6b..afeb097518b2 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.cs
@@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -139,7 +139,7 @@ public virtual async Task> GetAsync(Cancel
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -179,7 +179,7 @@ public virtual Response Get(CancellationToken cance
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/CostManagementExtensions.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/CostManagementExtensions.cs
index 3ece39770f65..012dd1f6331d 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/CostManagementExtensions.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/CostManagementExtensions.cs
@@ -29,663 +29,647 @@ private static MockableCostManagementTenantResource GetMockableCostManagementTen
}
///
- /// Gets a collection of CostManagementExportResources in the ArmClient.
+ /// Gets a collection of CostManagementAlertResources in the ArmClient.
///
-
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
/// is null.
- /// An object representing collection of CostManagementExportResources and their operations over a CostManagementExportResource.
- public static CostManagementExportCollection GetCostManagementExports(this ArmClient client, ResourceIdentifier scope)
+ /// An object representing collection of CostManagementAlertResources and their operations over a CostManagementAlertResource.
+ public static CostManagementAlertCollection GetCostManagementAlerts(this ArmClient client, ResourceIdentifier scope)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementExports(scope);
+ return GetMockableCostManagementArmClient(client).GetCostManagementAlerts(scope);
}
///
- /// The operation to get the export for the defined scope by export name.
+ /// Gets the alert for the scope by alert ID.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
+ /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
///
/// -
/// Operation Id
- /// Exports_Get
+ /// Alerts_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Export Name.
- /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
+ /// Alert ID.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
[ForwardsClientCalls]
- public static async Task> GetCostManagementExportAsync(this ArmClient client, ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
+ public static async Task> GetCostManagementAlertAsync(this ArmClient client, ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return await GetMockableCostManagementArmClient(client).GetCostManagementExportAsync(scope, exportName, expand, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementArmClient(client).GetCostManagementAlertAsync(scope, alertId, cancellationToken).ConfigureAwait(false);
}
///
- /// The operation to get the export for the defined scope by export name.
+ /// Gets the alert for the scope by alert ID.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
+ /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
///
/// -
/// Operation Id
- /// Exports_Get
+ /// Alerts_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Export Name.
- /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
+ /// Alert ID.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
[ForwardsClientCalls]
- public static Response GetCostManagementExport(this ArmClient client, ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
+ public static Response GetCostManagementAlert(this ArmClient client, ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementExport(scope, exportName, expand, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetCostManagementAlert(scope, alertId, cancellationToken);
}
///
- /// Gets a collection of CostManagementViewsResources in the ArmClient.
+ /// Gets a collection of BudgetResources in the ArmClient.
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
/// is null.
- /// An object representing collection of CostManagementViewsResources and their operations over a CostManagementViewsResource.
- public static CostManagementViewsCollection GetAllCostManagementViews(this ArmClient client, ResourceIdentifier scope)
+ /// An object representing collection of BudgetResources and their operations over a BudgetResource.
+ public static BudgetCollection GetBudgets(this ArmClient client, ResourceIdentifier scope)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetAllCostManagementViews(scope);
+ return GetMockableCostManagementArmClient(client).GetBudgets(scope);
}
///
- /// Gets the view for the defined scope by view name.
+ /// Gets the budget for the scope by budget name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
///
/// -
/// Operation Id
- /// Views_GetByScope
+ /// Budgets_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// View name.
+ /// Budget Name.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static async Task> GetCostManagementViewsAsync(this ArmClient client, ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
+ public static async Task> GetBudgetAsync(this ArmClient client, ResourceIdentifier scope, string budgetName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return await GetMockableCostManagementArmClient(client).GetCostManagementViewsAsync(scope, viewName, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementArmClient(client).GetBudgetAsync(scope, budgetName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets the view for the defined scope by view name.
+ /// Gets the budget for the scope by budget name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
///
/// -
/// Operation Id
- /// Views_GetByScope
+ /// Budgets_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// View name.
+ /// Budget Name.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static Response GetCostManagementViews(this ArmClient client, ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
+ public static Response GetBudget(this ArmClient client, ResourceIdentifier scope, string budgetName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementViews(scope, viewName, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetBudget(scope, budgetName, cancellationToken);
}
///
- /// Gets a collection of CostManagementAlertResources in the ArmClient.
+ /// Gets a collection of ScheduledActionResources in the ArmClient.
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
/// is null.
- /// An object representing collection of CostManagementAlertResources and their operations over a CostManagementAlertResource.
- public static CostManagementAlertCollection GetCostManagementAlerts(this ArmClient client, ResourceIdentifier scope)
+ /// An object representing collection of ScheduledActionResources and their operations over a ScheduledActionResource.
+ public static ScheduledActionCollection GetScheduledActions(this ArmClient client, ResourceIdentifier scope)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementAlerts(scope);
+ return GetMockableCostManagementArmClient(client).GetScheduledActions(scope);
}
///
- /// Gets the alert for the scope by alert ID.
+ /// Get the shared scheduled action from the given scope by name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
+ /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
///
/// -
/// Operation Id
- /// Alerts_Get
+ /// ScheduledActions_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Alert ID.
+ /// Scheduled action name.
/// The cancellation token to use.
- /// or is null.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static async Task> GetCostManagementAlertAsync(this ArmClient client, ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
+ public static async Task> GetScheduledActionAsync(this ArmClient client, ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return await GetMockableCostManagementArmClient(client).GetCostManagementAlertAsync(scope, alertId, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementArmClient(client).GetScheduledActionAsync(scope, name, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets the alert for the scope by alert ID.
+ /// Get the shared scheduled action from the given scope by name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
+ /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
///
/// -
/// Operation Id
- /// Alerts_Get
+ /// ScheduledActions_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Alert ID.
+ /// Scheduled action name.
/// The cancellation token to use.
- /// or is null.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static Response GetCostManagementAlert(this ArmClient client, ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
+ public static Response GetScheduledAction(this ArmClient client, ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementAlert(scope, alertId, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetScheduledAction(scope, name, cancellationToken);
}
///
- /// Gets a collection of ScheduledActionResources in the ArmClient.
+ /// Gets a collection of CostManagementExportResources in the ArmClient.
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
/// is null.
- /// An object representing collection of ScheduledActionResources and their operations over a ScheduledActionResource.
- public static ScheduledActionCollection GetScheduledActions(this ArmClient client, ResourceIdentifier scope)
+ /// An object representing collection of CostManagementExportResources and their operations over a CostManagementExportResource.
+ public static CostManagementExportCollection GetCostManagementExports(this ArmClient client, ResourceIdentifier scope)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetScheduledActions(scope);
+ return GetMockableCostManagementArmClient(client).GetCostManagementExports(scope);
}
///
- /// Get the shared scheduled action from the given scope by name.
+ /// The operation to get the export for the defined scope by export name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
///
/// -
/// Operation Id
- /// ScheduledActions_GetByScope
+ /// Exports_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Scheduled action name.
+ /// Export Name.
+ /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static async Task> GetScheduledActionAsync(this ArmClient client, ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
+ public static async Task> GetCostManagementExportAsync(this ArmClient client, ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return await GetMockableCostManagementArmClient(client).GetScheduledActionAsync(scope, name, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementArmClient(client).GetCostManagementExportAsync(scope, exportName, expand, cancellationToken).ConfigureAwait(false);
}
///
- /// Get the shared scheduled action from the given scope by name.
+ /// The operation to get the export for the defined scope by export name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
///
/// -
/// Operation Id
- /// ScheduledActions_GetByScope
+ /// Exports_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Scheduled action name.
+ /// Export Name.
+ /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static Response GetScheduledAction(this ArmClient client, ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
+ public static Response GetCostManagementExport(this ArmClient client, ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetScheduledAction(scope, name, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetCostManagementExport(scope, exportName, expand, cancellationToken);
}
///
- /// List of recommendations for purchasing savings plan.
- ///
- /// -
- /// Request Path
- /// /{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations
- ///
- /// -
- /// Operation Id
- /// BenefitRecommendations_List
- ///
- /// -
- /// Default Api Version
- /// 2023-03-01
- ///
- ///
+ /// Gets a collection of SettingResources in the ArmClient.
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; properties/subscriptionId; properties/resourceGroup.
- /// May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. There is no need to use this clause.
- /// May be used to expand the properties by: properties/usage, properties/allRecommendationDetails.
- /// The cancellation token to use.
/// is null.
- public static AsyncPageable GetBenefitRecommendationsAsync(this ArmClient client, ResourceIdentifier scope, string filter = null, string orderby = null, string expand = null, CancellationToken cancellationToken = default)
+ /// An object representing collection of SettingResources and their operations over a SettingResource.
+ public static SettingCollection GetSettings(this ArmClient client, ResourceIdentifier scope)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetBenefitRecommendationsAsync(scope, filter, orderby, expand, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetSettings(scope);
}
///
- /// List of recommendations for purchasing savings plan.
+ /// Get the setting from the given scope by name.
///
/// -
/// Request Path
- /// /{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations
+ /// /{scope}/providers/Microsoft.CostManagement/settings/{type}
///
/// -
/// Operation Id
- /// BenefitRecommendations_List
+ /// Settings_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; properties/subscriptionId; properties/resourceGroup.
- /// May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. There is no need to use this clause.
- /// May be used to expand the properties by: properties/usage, properties/allRecommendationDetails.
+ /// Setting type.
/// The cancellation token to use.
/// is null.
- public static Pageable GetBenefitRecommendations(this ArmClient client, ResourceIdentifier scope, string filter = null, string orderby = null, string expand = null, CancellationToken cancellationToken = default)
+ [ForwardsClientCalls]
+ public static async Task> GetSettingAsync(this ArmClient client, ResourceIdentifier scope, SettingType type, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetBenefitRecommendations(scope, filter, orderby, expand, cancellationToken);
+ return await GetMockableCostManagementArmClient(client).GetSettingAsync(scope, type, cancellationToken).ConfigureAwait(false);
}
///
- /// Lists the forecast charges for scope defined.
+ /// Get the setting from the given scope by name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/forecast
+ /// /{scope}/providers/Microsoft.CostManagement/settings/{type}
///
/// -
/// Operation Id
- /// Forecast_Usage
+ /// Settings_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// Setting type.
/// The cancellation token to use.
- /// or is null.
- public static async Task> UsageForecastAsync(this ArmClient client, ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// is null.
+ [ForwardsClientCalls]
+ public static Response GetSetting(this ArmClient client, ResourceIdentifier scope, SettingType type, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return await GetMockableCostManagementArmClient(client).UsageForecastAsync(scope, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
+ return GetMockableCostManagementArmClient(client).GetSetting(scope, type, cancellationToken);
}
///
- /// Lists the forecast charges for scope defined.
- ///
- /// -
- /// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/forecast
- ///
- /// -
- /// Operation Id
- /// Forecast_Usage
- ///
- /// -
- /// Default Api Version
- /// 2023-03-01
- ///
- ///
+ /// Gets a collection of CostManagementViewsResources in the ArmClient.
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
- /// The cancellation token to use.
- /// or is null.
- public static Response UsageForecast(this ArmClient client, ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// is null.
+ /// An object representing collection of CostManagementViewsResources and their operations over a CostManagementViewsResource.
+ public static CostManagementViewsCollection GetAllCostManagementViews(this ArmClient client, ResourceIdentifier scope)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).UsageForecast(scope, forecastDefinition, filter, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetAllCostManagementViews(scope);
}
///
- /// Lists the dimensions by the defined scope.
+ /// Gets the view for the defined scope by view name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/dimensions
+ /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
///
/// -
/// Operation Id
- /// Dimensions_List
+ /// Views_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.
- /// May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.
- /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
- /// May be used to limit the number of results to the most recent N dimension data.
+ /// View name.
/// The cancellation token to use.
- /// is null.
- public static AsyncPageable GetDimensionsAsync(this ArmClient client, ResourceIdentifier scope, string filter = null, string expand = null, string skiptoken = null, int? top = null, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetCostManagementViewsAsync(this ArmClient client, ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetDimensionsAsync(scope, filter, expand, skiptoken, top, cancellationToken);
+ return await GetMockableCostManagementArmClient(client).GetCostManagementViewsAsync(scope, viewName, cancellationToken).ConfigureAwait(false);
}
///
- /// Lists the dimensions by the defined scope.
+ /// Gets the view for the defined scope by view name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/dimensions
+ /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
///
/// -
/// Operation Id
- /// Dimensions_List
+ /// Views_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.
- /// May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.
- /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
- /// May be used to limit the number of results to the most recent N dimension data.
+ /// View name.
/// The cancellation token to use.
- /// is null.
- public static Pageable GetDimensions(this ArmClient client, ResourceIdentifier scope, string filter = null, string expand = null, string skiptoken = null, int? top = null, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetCostManagementViews(this ArmClient client, ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetDimensions(scope, filter, expand, skiptoken, top, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetCostManagementViews(scope, viewName, cancellationToken);
}
///
- /// Query the usage data for scope defined.
+ /// List of recommendations for purchasing savings plan.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/query
+ /// /{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations
///
/// -
/// Operation Id
- /// Query_Usage
+ /// BenefitRecommendations_List
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; properties/subscriptionId; properties/resourceGroup.
+ /// May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. There is no need to use this clause.
+ /// May be used to expand the properties by: properties/usage, properties/allRecommendationDetails.
/// The cancellation token to use.
- /// or is null.
- public static async Task> UsageQueryAsync(this ArmClient client, ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
+ /// is null.
+ public static AsyncPageable GetBenefitRecommendationsAsync(this ArmClient client, ResourceIdentifier scope, string filter = null, string orderby = null, string expand = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return await GetMockableCostManagementArmClient(client).UsageQueryAsync(scope, queryDefinition, cancellationToken).ConfigureAwait(false);
+ return GetMockableCostManagementArmClient(client).GetBenefitRecommendationsAsync(scope, filter, orderby, expand, cancellationToken);
}
///
- /// Query the usage data for scope defined.
+ /// List of recommendations for purchasing savings plan.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/query
+ /// /{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations
///
/// -
/// Operation Id
- /// Query_Usage
+ /// BenefitRecommendations_List
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; properties/subscriptionId; properties/resourceGroup.
+ /// May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. There is no need to use this clause.
+ /// May be used to expand the properties by: properties/usage, properties/allRecommendationDetails.
/// The cancellation token to use.
- /// or is null.
- public static Response UsageQuery(this ArmClient client, ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
+ /// is null.
+ public static Pageable GetBenefitRecommendations(this ArmClient client, ResourceIdentifier scope, string filter = null, string orderby = null, string expand = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).UsageQuery(scope, queryDefinition, cancellationToken);
+ return GetMockableCostManagementArmClient(client).GetBenefitRecommendations(scope, filter, orderby, expand, cancellationToken);
}
///
@@ -701,7 +685,7 @@ public static Response UsageQuery(this ArmClient client, ResourceId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
@@ -734,7 +718,7 @@ public static async Task> CheckCo
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
@@ -755,119 +739,475 @@ public static Response CheckCostManagement
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Lists the dimensions by the defined scope.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/dimensions
+ ///
+ /// -
+ /// Operation Id
+ /// Dimensions_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The resource ID of the resource to get.
+ /// The scope that the resource will apply against.
+ /// May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.
+ /// May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.
+ /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
+ /// May be used to limit the number of results to the most recent N dimension data.
+ /// The cancellation token to use.
/// is null.
- /// Returns a object.
- public static CostManagementExportResource GetCostManagementExportResource(this ArmClient client, ResourceIdentifier id)
+ public static AsyncPageable GetDimensionsAsync(this ArmClient client, ResourceIdentifier scope, string filter = null, string expand = null, string skiptoken = null, int? top = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementExportResource(id);
+ return GetMockableCostManagementArmClient(client).GetDimensionsAsync(scope, filter, expand, skiptoken, top, cancellationToken);
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Lists the dimensions by the defined scope.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/dimensions
+ ///
+ /// -
+ /// Operation Id
+ /// Dimensions_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The resource ID of the resource to get.
+ /// The scope that the resource will apply against.
+ /// May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.
+ /// May be used to expand the properties/data within a dimension category. By default, data is not included when listing dimensions.
+ /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
+ /// May be used to limit the number of results to the most recent N dimension data.
+ /// The cancellation token to use.
/// is null.
- /// Returns a object.
- public static TenantsCostManagementViewsResource GetTenantsCostManagementViewsResource(this ArmClient client, ResourceIdentifier id)
+ public static Pageable GetDimensions(this ArmClient client, ResourceIdentifier scope, string filter = null, string expand = null, string skiptoken = null, int? top = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetTenantsCostManagementViewsResource(id);
+ return GetMockableCostManagementArmClient(client).GetDimensions(scope, filter, expand, skiptoken, top, cancellationToken);
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Lists the forecast charges for scope defined.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/forecast
+ ///
+ /// -
+ /// Operation Id
+ /// Forecast_Usage
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// is null.
- /// Returns a object.
- public static CostManagementViewsResource GetCostManagementViewsResource(this ArmClient client, ResourceIdentifier id)
+ /// The scope that the resource will apply against.
+ /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// The cancellation token to use.
+ /// or is null.
+ public static async Task> UsageForecastAsync(this ArmClient client, ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementViewsResource(id);
+ return await GetMockableCostManagementArmClient(client).UsageForecastAsync(scope, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Lists the forecast charges for scope defined.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/forecast
+ ///
+ /// -
+ /// Operation Id
+ /// Forecast_Usage
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// is null.
- /// Returns a object.
- public static CostManagementAlertResource GetCostManagementAlertResource(this ArmClient client, ResourceIdentifier id)
+ /// The scope that the resource will apply against.
+ /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// The cancellation token to use.
+ /// or is null.
+ public static Response UsageForecast(this ArmClient client, ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetCostManagementAlertResource(id);
+ return GetMockableCostManagementArmClient(client).UsageForecast(scope, forecastDefinition, filter, cancellationToken);
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Query the usage data for scope defined.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/query
+ ///
+ /// -
+ /// Operation Id
+ /// Query_Usage
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// is null.
- /// Returns a object.
- public static TenantScheduledActionResource GetTenantScheduledActionResource(this ArmClient client, ResourceIdentifier id)
+ /// The scope that the resource will apply against.
+ /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// The cancellation token to use.
+ /// or is null.
+ public static async Task> UsageQueryAsync(this ArmClient client, ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableCostManagementArmClient(client).GetTenantScheduledActionResource(id);
+ return await GetMockableCostManagementArmClient(client).UsageQueryAsync(scope, queryDefinition, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Query the usage data for scope defined.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/query
+ ///
+ /// -
+ /// Operation Id
+ /// Query_Usage
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// is null.
- /// Returns a object.
- public static ScheduledActionResource GetScheduledActionResource(this ArmClient client, ResourceIdentifier id)
+ /// The scope that the resource will apply against.
+ /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// The cancellation token to use.
+ /// or is null.
+ public static Response UsageQuery(this ArmClient client, ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).UsageQuery(scope, queryDefinition, cancellationToken);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static CostManagementAlertResource GetCostManagementAlertResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetCostManagementAlertResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static BudgetResource GetBudgetResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetBudgetResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static ScheduledActionResource GetScheduledActionResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCostManagementArmClient(client).GetScheduledActionResource(id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static TenantScheduledActionResource GetTenantScheduledActionResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetTenantScheduledActionResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static CostManagementExportResource GetCostManagementExportResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetCostManagementExportResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SettingResource GetSettingResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetSettingResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static CostManagementViewsResource GetCostManagementViewsResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetCostManagementViewsResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static TenantsCostManagementViewsResource GetTenantsCostManagementViewsResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetTenantsCostManagementViewsResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static CostAllocationRuleDefinitionResource GetCostAllocationRuleDefinitionResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableCostManagementArmClient(client).GetCostAllocationRuleDefinitionResource(id);
+ }
+
+ ///
+ /// Gets a collection of TenantScheduledActionResources in the TenantResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// is null.
+ /// An object representing collection of TenantScheduledActionResources and their operations over a TenantScheduledActionResource.
+ public static TenantScheduledActionCollection GetTenantScheduledActions(this TenantResource tenantResource)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableCostManagementTenantResource(tenantResource).GetTenantScheduledActions();
+ }
+
+ ///
+ /// Get the private scheduled action by name.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ ///
+ /// -
+ /// Operation Id
+ /// ScheduledActions_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Scheduled action name.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetTenantScheduledActionAsync(this TenantResource tenantResource, string name, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return await GetMockableCostManagementTenantResource(tenantResource).GetTenantScheduledActionAsync(name, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get the private scheduled action by name.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ ///
+ /// -
+ /// Operation Id
+ /// ScheduledActions_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Scheduled action name.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetTenantScheduledAction(this TenantResource tenantResource, string name, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableCostManagementTenantResource(tenantResource).GetTenantScheduledAction(name, cancellationToken);
+ }
+
///
/// Gets a collection of TenantsCostManagementViewsResources in the TenantResource.
/// -
@@ -882,1532 +1222,1714 @@ public static TenantsCostManagementViewsCollection GetAllTenantsCostManagementVi
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetAllTenantsCostManagementViews();
+ return GetMockableCostManagementTenantResource(tenantResource).GetAllTenantsCostManagementViews();
+ }
+
+ ///
+ /// Gets the view by view name.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.CostManagement/views/{viewName}
+ ///
+ /// -
+ /// Operation Id
+ /// Views_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// View name.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetTenantsCostManagementViewsAsync(this TenantResource tenantResource, string viewName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return await GetMockableCostManagementTenantResource(tenantResource).GetTenantsCostManagementViewsAsync(viewName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the view by view name.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.CostManagement/views/{viewName}
+ ///
+ /// -
+ /// Operation Id
+ /// Views_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// View name.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetTenantsCostManagementViews(this TenantResource tenantResource, string viewName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableCostManagementTenantResource(tenantResource).GetTenantsCostManagementViews(viewName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of CostAllocationRuleDefinitionResources in the TenantResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// BillingAccount ID.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// An object representing collection of CostAllocationRuleDefinitionResources and their operations over a CostAllocationRuleDefinitionResource.
+ public static CostAllocationRuleDefinitionCollection GetCostAllocationRuleDefinitions(this TenantResource tenantResource, string billingAccountId)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableCostManagementTenantResource(tenantResource).GetCostAllocationRuleDefinitions(billingAccountId);
+ }
+
+ ///
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
+ ///
+ /// -
+ /// Operation Id
+ /// CostAllocationRules_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// BillingAccount ID.
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
+ /// The cancellation token to use.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetCostAllocationRuleDefinitionAsync(this TenantResource tenantResource, string billingAccountId, string ruleName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return await GetMockableCostManagementTenantResource(tenantResource).GetCostAllocationRuleDefinitionAsync(billingAccountId, ruleName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets the view by view name.
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/views/{viewName}
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
///
/// -
/// Operation Id
- /// Views_Get
+ /// CostAllocationRules_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// View name.
+ /// BillingAccount ID.
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static async Task> GetTenantsCostManagementViewsAsync(this TenantResource tenantResource, string viewName, CancellationToken cancellationToken = default)
+ public static Response GetCostAllocationRuleDefinition(this TenantResource tenantResource, string billingAccountId, string ruleName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GetTenantsCostManagementViewsAsync(viewName, cancellationToken).ConfigureAwait(false);
+ return GetMockableCostManagementTenantResource(tenantResource).GetCostAllocationRuleDefinition(billingAccountId, ruleName, cancellationToken);
}
///
- /// Gets the view by view name.
+ /// Lists the Alerts for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/views/{viewName}
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
///
/// -
/// Operation Id
- /// Views_Get
+ /// Alerts_ListExternal
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// View name.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
- [ForwardsClientCalls]
- public static Response GetTenantsCostManagementViews(this TenantResource tenantResource, string viewName, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetCostManagementAlertsAsync(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetTenantsCostManagementViews(viewName, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GetCostManagementAlertsAsync(externalCloudProviderType, externalCloudProviderId, cancellationToken);
}
///
- /// Gets a collection of TenantScheduledActionResources in the TenantResource.
+ /// Lists the Alerts for external cloud provider type defined.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
+ ///
+ /// -
+ /// Operation Id
+ /// Alerts_ListExternal
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// is null.
- /// An object representing collection of TenantScheduledActionResources and their operations over a TenantScheduledActionResource.
- public static TenantScheduledActionCollection GetTenantScheduledActions(this TenantResource tenantResource)
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetCostManagementAlerts(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetTenantScheduledActions();
+ return GetMockableCostManagementTenantResource(tenantResource).GetCostManagementAlerts(externalCloudProviderType, externalCloudProviderId, cancellationToken);
}
///
- /// Get the private scheduled action by name.
+ /// Checks availability and correctness of the name for a scheduled action.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /providers/Microsoft.CostManagement/checkNameAvailability
///
/// -
/// Operation Id
- /// ScheduledActions_Get
+ /// ScheduledActions_CheckNameAvailability
///
/// -
/// Default Api Version
- /// 2023-03-01
- ///
- /// -
- /// Resource
- ///
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Scheduled action name.
+ /// The request body.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
- [ForwardsClientCalls]
- public static async Task> GetTenantScheduledActionAsync(this TenantResource tenantResource, string name, CancellationToken cancellationToken = default)
+ /// or is null.
+ public static async Task> CheckCostManagementNameAvailabilityByScheduledActionAsync(this TenantResource tenantResource, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GetTenantScheduledActionAsync(name, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).CheckCostManagementNameAvailabilityByScheduledActionAsync(content, cancellationToken).ConfigureAwait(false);
}
///
- /// Get the private scheduled action by name.
+ /// Checks availability and correctness of the name for a scheduled action.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /providers/Microsoft.CostManagement/checkNameAvailability
///
/// -
/// Operation Id
- /// ScheduledActions_Get
+ /// ScheduledActions_CheckNameAvailability
///
/// -
/// Default Api Version
- /// 2023-03-01
- ///
- /// -
- /// Resource
- ///
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Scheduled action name.
+ /// The request body.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
- [ForwardsClientCalls]
- public static Response GetTenantScheduledAction(this TenantResource tenantResource, string name, CancellationToken cancellationToken = default)
+ /// or is null.
+ public static Response CheckCostManagementNameAvailabilityByScheduledAction(this TenantResource tenantResource, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetTenantScheduledAction(name, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).CheckCostManagementNameAvailabilityByScheduledAction(content, cancellationToken);
}
///
- /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Lists the dimensions by the external cloud provider type.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingAccountId
+ /// Dimensions_ByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Billing account ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetBenefitUtilizationSummariesByBillingAccountIdAsync(this TenantResource tenantResource, string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable ByExternalCloudProviderTypeDimensionsAsync(this TenantResource tenantResource, TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingAccountIdAsync(billingAccountId, grainParameter, filter, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).ByExternalCloudProviderTypeDimensionsAsync(options, cancellationToken);
}
///
- /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Lists the dimensions by the external cloud provider type.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingAccountId
+ /// Dimensions_ByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Billing account ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetBenefitUtilizationSummariesByBillingAccountId(this TenantResource tenantResource, string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable ByExternalCloudProviderTypeDimensions(this TenantResource tenantResource, TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingAccountId(billingAccountId, grainParameter, filter, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).ByExternalCloudProviderTypeDimensions(options, cancellationToken);
}
///
- /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Lists the forecast charges for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingProfileId
+ /// Forecast_ExternalCloudProviderUsage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Billing account ID.
- /// Billing profile ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetBenefitUtilizationSummariesByBillingProfileIdAsync(this TenantResource tenantResource, string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static async Task> ExternalCloudProviderUsageForecastAsync(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingProfileIdAsync(billingAccountId, billingProfileId, grainParameter, filter, cancellationToken);
+ return await GetMockableCostManagementTenantResource(tenantResource).ExternalCloudProviderUsageForecastAsync(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
}
///
- /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Lists the forecast charges for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingProfileId
+ /// Forecast_ExternalCloudProviderUsage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Billing account ID.
- /// Billing profile ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetBenefitUtilizationSummariesByBillingProfileId(this TenantResource tenantResource, string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static Response ExternalCloudProviderUsageForecast(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingProfileId(billingAccountId, billingProfileId, grainParameter, filter, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).ExternalCloudProviderUsageForecast(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken);
}
///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ /// Query the usage data for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
+ /// Query_UsageByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Savings plan order ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanOrderAsync(this TenantResource tenantResource, string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static async Task> UsageByExternalCloudProviderTypeQueryAsync(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanOrderAsync(savingsPlanOrderId, filter, grainParameter, cancellationToken);
+ return await GetMockableCostManagementTenantResource(tenantResource).UsageByExternalCloudProviderTypeQueryAsync(externalCloudProviderType, externalCloudProviderId, queryDefinition, cancellationToken).ConfigureAwait(false);
}
///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ /// Query the usage data for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
+ /// Query_UsageByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Savings plan order ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetBenefitUtilizationSummariesBySavingsPlanOrder(this TenantResource tenantResource, string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static Response UsageByExternalCloudProviderTypeQuery(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanOrder(savingsPlanOrderId, filter, grainParameter, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).UsageByExternalCloudProviderTypeQuery(externalCloudProviderType, externalCloudProviderId, queryDefinition, cancellationToken);
}
///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ /// Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for Enterprise Agreement customers.
+ ///
+ /// **Migrate to version 2025-03-01**
+ ///
+ /// You can use the 2025-03-01 API version with the new URI:
+ ///
+ /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ ///
+ /// With a new schema detailed below, the new version of the price sheet provides additional information and includes prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing.
+ ///
+ /// The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a billing period older than 13 months, please contact support.
+ ///
+ /// The Azure price sheet download experience has been updated from a single .csv file to a zip file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST method; details can be found below.
+ ///
+ /// All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no longer be supported after this date.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanId
+ /// PriceSheet_DownloadByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Savings plan order ID.
- /// Savings plan ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Billing Period Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanIdAsync(this TenantResource tenantResource, string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static async Task> DownloadByBillingAccountPriceSheetAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingPeriodName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanIdAsync(savingsPlanOrderId, savingsPlanId, filter, grainParameter, cancellationToken);
- }
-
- ///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ return await GetMockableCostManagementTenantResource(tenantResource).DownloadByBillingAccountPriceSheetAsync(waitUntil, billingAccountId, billingPeriodName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for Enterprise Agreement customers.
+ ///
+ /// **Migrate to version 2025-03-01**
+ ///
+ /// You can use the 2025-03-01 API version with the new URI:
+ ///
+ /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ ///
+ /// With a new schema detailed below, the new version of the price sheet provides additional information and includes prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing.
+ ///
+ /// The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a billing period older than 13 months, please contact support.
+ ///
+ /// The Azure price sheet download experience has been updated from a single .csv file to a zip file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST method; details can be found below.
+ ///
+ /// All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no longer be supported after this date.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanId
+ /// PriceSheet_DownloadByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
- ///
- /// The instance the method will execute against.
- /// Savings plan order ID.
- /// Savings plan ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ ///
+ /// The instance the method will execute against.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Billing Period Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetBenefitUtilizationSummariesBySavingsPlanId(this TenantResource tenantResource, string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static ArmOperation DownloadByBillingAccountPriceSheet(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingPeriodName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanId(savingsPlanOrderId, savingsPlanId, filter, grainParameter, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).DownloadByBillingAccountPriceSheet(waitUntil, billingAccountId, billingPeriodName, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
+ /// Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BillingAccountScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByInvoice
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
+ /// The ID that uniquely identifies an invoice.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static async Task> GenerateBenefitUtilizationSummariesReportBillingAccountScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// , or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static async Task> DownloadPriceSheetAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingAccountScopeAsync(waitUntil, billingAccountId, content, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).DownloadPriceSheetAsync(waitUntil, billingAccountName, billingProfileName, invoiceName, cancellationToken).ConfigureAwait(false);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
+ /// Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BillingAccountScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByInvoice
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
+ /// The ID that uniquely identifies an invoice.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static ArmOperation GenerateBenefitUtilizationSummariesReportBillingAccountScope(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// , or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static ArmOperation DownloadPriceSheet(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingAccountScope(waitUntil, billingAccountId, content, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).DownloadPriceSheet(waitUntil, billingAccountName, billingProfileName, invoiceName, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
+ /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ ///
+ /// You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI) pricing is only available through the new version of the API.
+ ///
+ /// Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BillingProfileScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Billing profile ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static async Task> GenerateBenefitUtilizationSummariesReportBillingProfileScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static async Task> DownloadPriceSheetByBillingProfileAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingProfileScopeAsync(waitUntil, billingAccountId, billingProfileId, content, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).DownloadPriceSheetByBillingProfileAsync(waitUntil, billingAccountName, billingProfileName, cancellationToken).ConfigureAwait(false);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
+ /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ ///
+ /// You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI) pricing is only available through the new version of the API.
+ ///
+ /// Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BillingProfileScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Billing profile ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static ArmOperation GenerateBenefitUtilizationSummariesReportBillingProfileScope(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static ArmOperation DownloadPriceSheetByBillingProfile(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingProfileScope(waitUntil, billingAccountId, billingProfileId, content, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).DownloadPriceSheetByBillingProfile(waitUntil, billingAccountName, billingProfileName, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// ReservationOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListByBillingProfileId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static async Task> GenerateBenefitUtilizationSummariesReportReservationOrderScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetBenefitUtilizationSummariesByBillingProfileIdAsync(this TenantResource tenantResource, string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationOrderScopeAsync(waitUntil, reservationOrderId, content, cancellationToken).ConfigureAwait(false);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingProfileIdAsync(billingAccountId, billingProfileId, grainParameter, filter, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// ReservationOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListByBillingProfileId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static ArmOperation GenerateBenefitUtilizationSummariesReportReservationOrderScope(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetBenefitUtilizationSummariesByBillingProfileId(this TenantResource tenantResource, string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationOrderScope(waitUntil, reservationOrderId, content, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingProfileId(billingAccountId, billingProfileId, grainParameter, filter, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided reservation.
+ /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// ReservationScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListByBillingAccountId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Reservation ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static async Task> GenerateBenefitUtilizationSummariesReportReservationScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, string reservationId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetBenefitUtilizationSummariesByBillingAccountIdAsync(this TenantResource tenantResource, string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationScopeAsync(waitUntil, reservationOrderId, reservationId, content, cancellationToken).ConfigureAwait(false);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingAccountIdAsync(billingAccountId, grainParameter, filter, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided reservation.
+ /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// ReservationScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListByBillingAccountId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Reservation ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static ArmOperation GenerateBenefitUtilizationSummariesReportReservationScope(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, string reservationId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetBenefitUtilizationSummariesByBillingAccountId(this TenantResource tenantResource, string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationScope(waitUntil, reservationOrderId, reservationId, content, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesByBillingAccountId(billingAccountId, grainParameter, filter, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Savings plan order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static async Task> GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanOrderAsync(this TenantResource tenantResource, string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScopeAsync(waitUntil, savingsPlanOrderId, content, cancellationToken).ConfigureAwait(false);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanOrderAsync(savingsPlanOrderId, filter, grainParameter, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Savings plan order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static ArmOperation GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetBenefitUtilizationSummariesBySavingsPlanOrder(this TenantResource tenantResource, string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope(waitUntil, savingsPlanOrderId, content, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanOrder(savingsPlanOrderId, filter, grainParameter, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanScope_GenerateBenefitUtilizationSummariesReportAsync
+ /// BenefitUtilizationSummaries_ListBySavingsPlanId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Savings plan order ID.
/// Savings plan ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
/// The cancellation token to use.
/// or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static async Task> GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, string savingsPlanId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// , or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanIdAsync(this TenantResource tenantResource, string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScopeAsync(waitUntil, savingsPlanOrderId, savingsPlanId, content, cancellationToken).ConfigureAwait(false);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanIdAsync(savingsPlanOrderId, savingsPlanId, filter, grainParameter, cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanScope_GenerateBenefitUtilizationSummariesReportAsync
+ /// BenefitUtilizationSummaries_ListBySavingsPlanId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Savings plan order ID.
/// Savings plan ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
/// The cancellation token to use.
/// or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static ArmOperation GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScope(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, string savingsPlanId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// , or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetBenefitUtilizationSummariesBySavingsPlanId(this TenantResource tenantResource, string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScope(waitUntil, savingsPlanOrderId, savingsPlanId, content, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GetBenefitUtilizationSummariesBySavingsPlanId(savingsPlanOrderId, savingsPlanId, filter, grainParameter, cancellationToken);
}
///
- /// Lists the Alerts for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Alerts_ListExternal
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
- ///
- /// -
- /// Resource
- ///
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetCostManagementAlertsAsync(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static async Task> GenerateBenefitUtilizationSummariesReportBillingProfileScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetCostManagementAlertsAsync(externalCloudProviderType, externalCloudProviderId, cancellationToken);
+ return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingProfileScopeAsync(waitUntil, billingAccountId, billingProfileId, content, cancellationToken).ConfigureAwait(false);
}
///
- /// Lists the Alerts for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Alerts_ListExternal
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
- ///
- /// -
- /// Resource
- ///
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetCostManagementAlerts(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static ArmOperation GenerateBenefitUtilizationSummariesReportBillingProfileScope(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).GetCostManagementAlerts(externalCloudProviderType, externalCloudProviderId, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingProfileScope(waitUntil, billingAccountId, billingProfileId, content, cancellationToken);
}
///
- /// Lists the forecast charges for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Forecast_ExternalCloudProviderUsage
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
- ///
- /// The instance the method will execute against.
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ ///
+ /// The instance the method will execute against.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static async Task> ExternalCloudProviderUsageForecastAsync(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static async Task> GenerateBenefitUtilizationSummariesReportBillingAccountScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).ExternalCloudProviderUsageForecastAsync(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingAccountScopeAsync(waitUntil, billingAccountId, content, cancellationToken).ConfigureAwait(false);
}
///
- /// Lists the forecast charges for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Forecast_ExternalCloudProviderUsage
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static Response ExternalCloudProviderUsageForecast(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static ArmOperation GenerateBenefitUtilizationSummariesReportBillingAccountScope(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).ExternalCloudProviderUsageForecast(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportBillingAccountScope(waitUntil, billingAccountId, content, cancellationToken);
}
///
- /// Lists the dimensions by the external cloud provider type.
+ /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Dimensions_ByExternalCloudProviderType
+ /// GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanOrderId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Savings plan order ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable ByExternalCloudProviderTypeDimensionsAsync(this TenantResource tenantResource, TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static async Task> GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).ByExternalCloudProviderTypeDimensionsAsync(options, cancellationToken);
+ return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScopeAsync(waitUntil, savingsPlanOrderId, content, cancellationToken).ConfigureAwait(false);
}
///
- /// Lists the dimensions by the external cloud provider type.
+ /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Dimensions_ByExternalCloudProviderType
+ /// GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanOrderId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Savings plan order ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable ByExternalCloudProviderTypeDimensions(this TenantResource tenantResource, TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static ArmOperation GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).ByExternalCloudProviderTypeDimensions(options, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope(waitUntil, savingsPlanOrderId, content, cancellationToken);
}
///
- /// Query the usage data for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided savings plan.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Query_UsageByExternalCloudProviderType
+ /// GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Savings plan order ID.
+ /// Savings plan ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static async Task> UsageByExternalCloudProviderTypeQueryAsync(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static async Task> GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, string savingsPlanId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).UsageByExternalCloudProviderTypeQueryAsync(externalCloudProviderType, externalCloudProviderId, queryDefinition, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScopeAsync(waitUntil, savingsPlanOrderId, savingsPlanId, content, cancellationToken).ConfigureAwait(false);
}
///
- /// Query the usage data for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided savings plan.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Query_UsageByExternalCloudProviderType
+ /// GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Savings plan order ID.
+ /// Savings plan ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static Response UsageByExternalCloudProviderTypeQuery(this TenantResource tenantResource, ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static ArmOperation GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScope(this TenantResource tenantResource, WaitUntil waitUntil, string savingsPlanOrderId, string savingsPlanId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).UsageByExternalCloudProviderTypeQuery(externalCloudProviderType, externalCloudProviderId, queryDefinition, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScope(waitUntil, savingsPlanOrderId, savingsPlanId, content, cancellationToken);
}
///
- /// Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role
+ /// Triggers generation of a benefit utilization summaries report for the provided reservation order.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
+ /// /providers/microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// GenerateReservationDetailsReport_ByBillingAccountId
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByReservationOrderId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Enrollment ID (Legacy BillingAccount ID).
- /// Start Date.
- /// End Date.
+ /// Reservation Order ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static async Task> ByBillingAccountIdGenerateReservationDetailsReportAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string startDate, string endDate, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static async Task> GenerateBenefitUtilizationSummariesReportReservationOrderScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).ByBillingAccountIdGenerateReservationDetailsReportAsync(waitUntil, billingAccountId, startDate, endDate, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationOrderScopeAsync(waitUntil, reservationOrderId, content, cancellationToken).ConfigureAwait(false);
}
///
- /// Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role
+ /// Triggers generation of a benefit utilization summaries report for the provided reservation order.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
+ /// /providers/microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// GenerateReservationDetailsReport_ByBillingAccountId
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByReservationOrderId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Enrollment ID (Legacy BillingAccount ID).
- /// Start Date.
- /// End Date.
+ /// Reservation Order ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static ArmOperation ByBillingAccountIdGenerateReservationDetailsReport(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string startDate, string endDate, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public static ArmOperation GenerateBenefitUtilizationSummariesReportReservationOrderScope(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).ByBillingAccountIdGenerateReservationDetailsReport(waitUntil, billingAccountId, startDate, endDate, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationOrderScope(waitUntil, reservationOrderId, content, cancellationToken);
}
///
- /// Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access
+ /// Triggers generation of a benefit utilization summaries report for the provided reservation.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
+ /// /providers/microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// GenerateReservationDetailsReport_ByBillingProfileId
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByReservationId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Billing profile ID.
- /// Start Date.
- /// End Date.
+ /// Reservation Order ID.
+ /// Reservation ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , , , or is null.
- public static async Task> ByBillingProfileIdGenerateReservationDetailsReportAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, string startDate, string endDate, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static async Task> GenerateBenefitUtilizationSummariesReportReservationScopeAsync(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, string reservationId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).ByBillingProfileIdGenerateReservationDetailsReportAsync(waitUntil, billingAccountId, billingProfileId, startDate, endDate, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationScopeAsync(waitUntil, reservationOrderId, reservationId, content, cancellationToken).ConfigureAwait(false);
}
///
- /// Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access
+ /// Triggers generation of a benefit utilization summaries report for the provided reservation.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
+ /// /providers/microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// GenerateReservationDetailsReport_ByBillingProfileId
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByReservationId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Billing profile ID.
- /// Start Date.
- /// End Date.
+ /// Reservation Order ID.
+ /// Reservation ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , , , or is null.
- public static ArmOperation ByBillingProfileIdGenerateReservationDetailsReport(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, string startDate, string endDate, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static ArmOperation GenerateBenefitUtilizationSummariesReportReservationScope(this TenantResource tenantResource, WaitUntil waitUntil, string reservationOrderId, string reservationId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).ByBillingProfileIdGenerateReservationDetailsReport(waitUntil, billingAccountId, billingProfileId, startDate, endDate, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).GenerateBenefitUtilizationSummariesReportReservationScope(waitUntil, reservationOrderId, reservationId, content, cancellationToken);
}
///
- /// Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ /// Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
///
/// -
/// Operation Id
- /// PriceSheet_Download
+ /// GenerateReservationDetailsReport_ByBillingProfileId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// The ID that uniquely identifies a billing account.
- /// The ID that uniquely identifies a billing profile.
- /// The ID that uniquely identifies an invoice.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Start Date.
+ /// End Date.
/// The cancellation token to use.
- /// , or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static async Task> DownloadPriceSheetAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , , or is null.
+ public static async Task> ByBillingProfileIdGenerateReservationDetailsReportAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, string startDate, string endDate, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).DownloadPriceSheetAsync(waitUntil, billingAccountName, billingProfileName, invoiceName, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).ByBillingProfileIdGenerateReservationDetailsReportAsync(waitUntil, billingAccountId, billingProfileId, startDate, endDate, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ /// Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
///
/// -
/// Operation Id
- /// PriceSheet_Download
+ /// GenerateReservationDetailsReport_ByBillingProfileId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// The ID that uniquely identifies a billing account.
- /// The ID that uniquely identifies a billing profile.
- /// The ID that uniquely identifies an invoice.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Start Date.
+ /// End Date.
/// The cancellation token to use.
- /// , or is an empty string, and was expected to be non-empty.
- /// , , or is null.
- public static ArmOperation DownloadPriceSheet(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , , , or is null.
+ public static ArmOperation ByBillingProfileIdGenerateReservationDetailsReport(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string billingProfileId, string startDate, string endDate, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).DownloadPriceSheet(waitUntil, billingAccountName, billingProfileName, invoiceName, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).ByBillingProfileIdGenerateReservationDetailsReport(waitUntil, billingAccountId, billingProfileId, startDate, endDate, cancellationToken);
}
///
- /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records.
+ /// Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
///
/// -
/// Operation Id
- /// PriceSheet_DownloadByBillingProfile
+ /// GenerateReservationDetailsReport_ByBillingAccountId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// The ID that uniquely identifies a billing account.
- /// The ID that uniquely identifies a billing profile.
+ /// BillingAccount ID.
+ /// Start Date.
+ /// End Date.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static async Task> DownloadByBillingProfilePriceSheetAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static async Task> ByBillingAccountIdGenerateReservationDetailsReportAsync(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string startDate, string endDate, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).DownloadByBillingProfilePriceSheetAsync(waitUntil, billingAccountName, billingProfileName, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).ByBillingAccountIdGenerateReservationDetailsReportAsync(waitUntil, billingAccountId, startDate, endDate, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records.
+ /// Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport
///
/// -
/// Operation Id
- /// PriceSheet_DownloadByBillingProfile
+ /// GenerateReservationDetailsReport_ByBillingAccountId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// The ID that uniquely identifies a billing account.
- /// The ID that uniquely identifies a billing profile.
+ /// BillingAccount ID.
+ /// Start Date.
+ /// End Date.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public static ArmOperation DownloadByBillingProfilePriceSheet(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// , , or is null.
+ public static ArmOperation ByBillingAccountIdGenerateReservationDetailsReport(this TenantResource tenantResource, WaitUntil waitUntil, string billingAccountId, string startDate, string endDate, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).DownloadByBillingProfilePriceSheet(waitUntil, billingAccountName, billingProfileName, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).ByBillingAccountIdGenerateReservationDetailsReport(waitUntil, billingAccountId, startDate, endDate, cancellationToken);
}
///
- /// Checks availability and correctness of the name for a scheduled action.
+ /// Checks availability and correctness of a name for a cost allocation rule
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/checkNameAvailability
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability
///
/// -
/// Operation Id
- /// ScheduledActions_CheckNameAvailability
+ /// CostAllocationRules_CheckNameAvailability
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Scheduled action to be created or updated.
+ /// Cost allocation rule to be created or updated.
/// The cancellation token to use.
/// or is null.
- public static async Task> CheckCostManagementNameAvailabilityByScheduledActionAsync(this TenantResource tenantResource, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
+ public static async Task> CheckNameAvailabilityCostAllocationRuleAsync(this TenantResource tenantResource, CostAllocationRuleCheckNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return await GetMockableCostManagementTenantResource(tenantResource).CheckCostManagementNameAvailabilityByScheduledActionAsync(content, cancellationToken).ConfigureAwait(false);
+ return await GetMockableCostManagementTenantResource(tenantResource).CheckNameAvailabilityCostAllocationRuleAsync(content, cancellationToken).ConfigureAwait(false);
}
///
- /// Checks availability and correctness of the name for a scheduled action.
+ /// Checks availability and correctness of a name for a cost allocation rule
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/checkNameAvailability
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability
///
/// -
/// Operation Id
- /// ScheduledActions_CheckNameAvailability
+ /// CostAllocationRules_CheckNameAvailability
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
- /// Scheduled action to be created or updated.
+ /// Cost allocation rule to be created or updated.
/// The cancellation token to use.
/// or is null.
- public static Response CheckCostManagementNameAvailabilityByScheduledAction(this TenantResource tenantResource, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
+ public static Response CheckNameAvailabilityCostAllocationRule(this TenantResource tenantResource, CostAllocationRuleCheckNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tenantResource, nameof(tenantResource));
- return GetMockableCostManagementTenantResource(tenantResource).CheckCostManagementNameAvailabilityByScheduledAction(content, cancellationToken);
+ return GetMockableCostManagementTenantResource(tenantResource).CheckNameAvailabilityCostAllocationRule(content, cancellationToken);
}
}
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementArmClient.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementArmClient.cs
index dc50f2c2bacc..cfb34a1bb4be 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementArmClient.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementArmClient.cs
@@ -20,14 +20,14 @@ public partial class MockableCostManagementArmClient : ArmResource
{
private ClientDiagnostics _benefitRecommendationsClientDiagnostics;
private BenefitRecommendationsRestOperations _benefitRecommendationsRestClient;
- private ClientDiagnostics _forecastClientDiagnostics;
- private ForecastRestOperations _forecastRestClient;
+ private ClientDiagnostics _scheduledActionsClientDiagnostics;
+ private ScheduledActionsRestOperations _scheduledActionsRestClient;
private ClientDiagnostics _dimensionsClientDiagnostics;
private DimensionsRestOperations _dimensionsRestClient;
+ private ClientDiagnostics _forecastClientDiagnostics;
+ private ForecastRestOperations _forecastRestClient;
private ClientDiagnostics _queryClientDiagnostics;
private QueryRestOperations _queryRestClient;
- private ClientDiagnostics _scheduledActionsClientDiagnostics;
- private ScheduledActionsRestOperations _scheduledActionsRestClient;
/// Initializes a new instance of the class for mocking.
protected MockableCostManagementArmClient()
@@ -47,14 +47,14 @@ internal MockableCostManagementArmClient(ArmClient client) : this(client, Resour
private ClientDiagnostics BenefitRecommendationsClientDiagnostics => _benefitRecommendationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private BenefitRecommendationsRestOperations BenefitRecommendationsRestClient => _benefitRecommendationsRestClient ??= new BenefitRecommendationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics ForecastClientDiagnostics => _forecastClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private ForecastRestOperations ForecastRestClient => _forecastRestClient ??= new ForecastRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics ScheduledActionsClientDiagnostics => _scheduledActionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private ScheduledActionsRestOperations ScheduledActionsRestClient => _scheduledActionsRestClient ??= new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics DimensionsClientDiagnostics => _dimensionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private DimensionsRestOperations DimensionsRestClient => _dimensionsRestClient ??= new DimensionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics ForecastClientDiagnostics => _forecastClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private ForecastRestOperations ForecastRestClient => _forecastRestClient ??= new ForecastRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics QueryClientDiagnostics => _queryClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private QueryRestOperations QueryRestClient => _queryRestClient ??= new QueryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics ScheduledActionsClientDiagnostics => _scheduledActionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private ScheduledActionsRestOperations ScheduledActionsRestClient => _scheduledActionsRestClient ??= new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private string GetApiVersionOrNull(ResourceType resourceType)
{
@@ -62,292 +62,432 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}
- /// Gets a collection of CostManagementExportResources in the ArmClient.
+ /// Gets a collection of CostManagementAlertResources in the ArmClient.
/// The scope that the resource will apply against.
- /// An object representing collection of CostManagementExportResources and their operations over a CostManagementExportResource.
- public virtual CostManagementExportCollection GetCostManagementExports(ResourceIdentifier scope)
+ /// An object representing collection of CostManagementAlertResources and their operations over a CostManagementAlertResource.
+ public virtual CostManagementAlertCollection GetCostManagementAlerts(ResourceIdentifier scope)
{
- return new CostManagementExportCollection(Client, scope);
+ return new CostManagementAlertCollection(Client, scope);
}
///
- /// The operation to get the export for the defined scope by export name.
+ /// Gets the alert for the scope by alert ID.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
+ /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
///
/// -
/// Operation Id
- /// Exports_Get
+ /// Alerts_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// Export Name.
- /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
+ /// Alert ID.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public virtual async Task> GetCostManagementExportAsync(ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
+ public virtual async Task> GetCostManagementAlertAsync(ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
{
- return await GetCostManagementExports(scope).GetAsync(exportName, expand, cancellationToken).ConfigureAwait(false);
+ return await GetCostManagementAlerts(scope).GetAsync(alertId, cancellationToken).ConfigureAwait(false);
}
///
- /// The operation to get the export for the defined scope by export name.
+ /// Gets the alert for the scope by alert ID.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
+ /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
///
/// -
/// Operation Id
- /// Exports_Get
+ /// Alerts_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// Export Name.
- /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
+ /// Alert ID.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public virtual Response GetCostManagementExport(ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
+ public virtual Response GetCostManagementAlert(ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
{
- return GetCostManagementExports(scope).Get(exportName, expand, cancellationToken);
+ return GetCostManagementAlerts(scope).Get(alertId, cancellationToken);
}
- /// Gets a collection of CostManagementViewsResources in the ArmClient.
+ /// Gets a collection of BudgetResources in the ArmClient.
/// The scope that the resource will apply against.
- /// An object representing collection of CostManagementViewsResources and their operations over a CostManagementViewsResource.
- public virtual CostManagementViewsCollection GetAllCostManagementViews(ResourceIdentifier scope)
+ /// An object representing collection of BudgetResources and their operations over a BudgetResource.
+ public virtual BudgetCollection GetBudgets(ResourceIdentifier scope)
{
- return new CostManagementViewsCollection(Client, scope);
+ return new BudgetCollection(Client, scope);
}
///
- /// Gets the view for the defined scope by view name.
+ /// Gets the budget for the scope by budget name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
///
/// -
/// Operation Id
- /// Views_GetByScope
+ /// Budgets_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// View name.
+ /// Budget Name.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual async Task> GetCostManagementViewsAsync(ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
+ public virtual async Task> GetBudgetAsync(ResourceIdentifier scope, string budgetName, CancellationToken cancellationToken = default)
{
- return await GetAllCostManagementViews(scope).GetAsync(viewName, cancellationToken).ConfigureAwait(false);
+ return await GetBudgets(scope).GetAsync(budgetName, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets the view for the defined scope by view name.
+ /// Gets the budget for the scope by budget name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
+ /// /{scope}/providers/Microsoft.CostManagement/budgets/{budgetName}
///
/// -
/// Operation Id
- /// Views_GetByScope
+ /// Budgets_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// View name.
+ /// Budget Name.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual Response GetCostManagementViews(ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
+ public virtual Response GetBudget(ResourceIdentifier scope, string budgetName, CancellationToken cancellationToken = default)
{
- return GetAllCostManagementViews(scope).Get(viewName, cancellationToken);
+ return GetBudgets(scope).Get(budgetName, cancellationToken);
}
- /// Gets a collection of CostManagementAlertResources in the ArmClient.
+ /// Gets a collection of ScheduledActionResources in the ArmClient.
/// The scope that the resource will apply against.
- /// An object representing collection of CostManagementAlertResources and their operations over a CostManagementAlertResource.
- public virtual CostManagementAlertCollection GetCostManagementAlerts(ResourceIdentifier scope)
+ /// An object representing collection of ScheduledActionResources and their operations over a ScheduledActionResource.
+ public virtual ScheduledActionCollection GetScheduledActions(ResourceIdentifier scope)
{
- return new CostManagementAlertCollection(Client, scope);
+ return new ScheduledActionCollection(Client, scope);
}
///
- /// Gets the alert for the scope by alert ID.
+ /// Get the shared scheduled action from the given scope by name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
+ /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
///
/// -
/// Operation Id
- /// Alerts_Get
+ /// ScheduledActions_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// Alert ID.
+ /// Scheduled action name.
/// The cancellation token to use.
- /// is null.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual async Task> GetCostManagementAlertAsync(ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
+ public virtual async Task> GetScheduledActionAsync(ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
{
- return await GetCostManagementAlerts(scope).GetAsync(alertId, cancellationToken).ConfigureAwait(false);
+ return await GetScheduledActions(scope).GetAsync(name, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets the alert for the scope by alert ID.
+ /// Get the shared scheduled action from the given scope by name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/alerts/{alertId}
+ /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
///
/// -
/// Operation Id
- /// Alerts_Get
+ /// ScheduledActions_GetByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// Alert ID.
+ /// Scheduled action name.
/// The cancellation token to use.
- /// is null.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual Response GetCostManagementAlert(ResourceIdentifier scope, string alertId, CancellationToken cancellationToken = default)
+ public virtual Response GetScheduledAction(ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
{
- return GetCostManagementAlerts(scope).Get(alertId, cancellationToken);
+ return GetScheduledActions(scope).Get(name, cancellationToken);
}
- /// Gets a collection of ScheduledActionResources in the ArmClient.
+ /// Gets a collection of CostManagementExportResources in the ArmClient.
/// The scope that the resource will apply against.
- /// An object representing collection of ScheduledActionResources and their operations over a ScheduledActionResource.
- public virtual ScheduledActionCollection GetScheduledActions(ResourceIdentifier scope)
+ /// An object representing collection of CostManagementExportResources and their operations over a CostManagementExportResource.
+ public virtual CostManagementExportCollection GetCostManagementExports(ResourceIdentifier scope)
{
- return new ScheduledActionCollection(Client, scope);
+ return new CostManagementExportCollection(Client, scope);
}
///
- /// Get the shared scheduled action from the given scope by name.
+ /// The operation to get the export for the defined scope by export name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
///
/// -
/// Operation Id
- /// ScheduledActions_GetByScope
+ /// Exports_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// Scheduled action name.
+ /// Export Name.
+ /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual async Task> GetScheduledActionAsync(ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
+ public virtual async Task> GetCostManagementExportAsync(ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
{
- return await GetScheduledActions(scope).GetAsync(name, cancellationToken).ConfigureAwait(false);
+ return await GetCostManagementExports(scope).GetAsync(exportName, expand, cancellationToken).ConfigureAwait(false);
}
///
- /// Get the shared scheduled action from the given scope by name.
+ /// The operation to get the export for the defined scope by export name.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /{scope}/providers/Microsoft.CostManagement/exports/{exportName}
///
/// -
/// Operation Id
- /// ScheduledActions_GetByScope
+ /// Exports_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The scope that the resource will apply against.
- /// Scheduled action name.
+ /// Export Name.
+ /// May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 runs of the export.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual Response GetScheduledAction(ResourceIdentifier scope, string name, CancellationToken cancellationToken = default)
+ public virtual Response GetCostManagementExport(ResourceIdentifier scope, string exportName, string expand = null, CancellationToken cancellationToken = default)
{
- return GetScheduledActions(scope).Get(name, cancellationToken);
+ return GetCostManagementExports(scope).Get(exportName, expand, cancellationToken);
+ }
+
+ /// Gets a collection of SettingResources in the ArmClient.
+ /// The scope that the resource will apply against.
+ /// An object representing collection of SettingResources and their operations over a SettingResource.
+ public virtual SettingCollection GetSettings(ResourceIdentifier scope)
+ {
+ return new SettingCollection(Client, scope);
+ }
+
+ ///
+ /// Get the setting from the given scope by name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/settings/{type}
+ ///
+ /// -
+ /// Operation Id
+ /// Settings_GetByScope
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// Setting type.
+ /// The cancellation token to use.
+ [ForwardsClientCalls]
+ public virtual async Task> GetSettingAsync(ResourceIdentifier scope, SettingType type, CancellationToken cancellationToken = default)
+ {
+ return await GetSettings(scope).GetAsync(type, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get the setting from the given scope by name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/settings/{type}
+ ///
+ /// -
+ /// Operation Id
+ /// Settings_GetByScope
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// Setting type.
+ /// The cancellation token to use.
+ [ForwardsClientCalls]
+ public virtual Response GetSetting(ResourceIdentifier scope, SettingType type, CancellationToken cancellationToken = default)
+ {
+ return GetSettings(scope).Get(type, cancellationToken);
+ }
+
+ /// Gets a collection of CostManagementViewsResources in the ArmClient.
+ /// The scope that the resource will apply against.
+ /// An object representing collection of CostManagementViewsResources and their operations over a CostManagementViewsResource.
+ public virtual CostManagementViewsCollection GetAllCostManagementViews(ResourceIdentifier scope)
+ {
+ return new CostManagementViewsCollection(Client, scope);
+ }
+
+ ///
+ /// Gets the view for the defined scope by view name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
+ ///
+ /// -
+ /// Operation Id
+ /// Views_GetByScope
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// View name.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetCostManagementViewsAsync(ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
+ {
+ return await GetAllCostManagementViews(scope).GetAsync(viewName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the view for the defined scope by view name.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.CostManagement/views/{viewName}
+ ///
+ /// -
+ /// Operation Id
+ /// Views_GetByScope
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// View name.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetCostManagementViews(ResourceIdentifier scope, string viewName, CancellationToken cancellationToken = default)
+ {
+ return GetAllCostManagementViews(scope).Get(viewName, cancellationToken);
}
///
@@ -363,7 +503,7 @@ public virtual Response GetScheduledAction(ResourceIden
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
@@ -396,7 +536,7 @@ public virtual AsyncPageable GetBenefitRecommendatio
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
@@ -417,37 +557,36 @@ public virtual Pageable GetBenefitRecommendations(Re
}
///
- /// Lists the forecast charges for scope defined.
+ /// Checks availability and correctness of the name for a scheduled action within the given scope.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/forecast
+ /// /{scope}/providers/Microsoft.CostManagement/checkNameAvailability
///
/// -
/// Operation Id
- /// Forecast_Usage
+ /// ScheduledActions_CheckNameAvailabilityByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// Scheduled action to be created or updated.
/// The cancellation token to use.
- /// or is null.
- public virtual async Task> UsageForecastAsync(ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// or is null.
+ public virtual async Task> CheckCostManagementNameAvailabilityByScopeScheduledActionAsync(ResourceIdentifier scope, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));
- Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
+ Argument.AssertNotNull(content, nameof(content));
- using var scope0 = ForecastClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageForecast");
+ using var scope0 = ScheduledActionsClientDiagnostics.CreateScope("MockableCostManagementArmClient.CheckCostManagementNameAvailabilityByScopeScheduledAction");
scope0.Start();
try
{
- var response = await ForecastRestClient.UsageAsync(scope, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
+ var response = await ScheduledActionsRestClient.CheckNameAvailabilityByScopeAsync(scope, content, cancellationToken).ConfigureAwait(false);
return response;
}
catch (Exception e)
@@ -458,37 +597,36 @@ public virtual async Task> UsageForecastAsync(ResourceI
}
///
- /// Lists the forecast charges for scope defined.
+ /// Checks availability and correctness of the name for a scheduled action within the given scope.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/forecast
+ /// /{scope}/providers/Microsoft.CostManagement/checkNameAvailability
///
/// -
/// Operation Id
- /// Forecast_Usage
+ /// ScheduledActions_CheckNameAvailabilityByScope
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// Scheduled action to be created or updated.
/// The cancellation token to use.
- /// or is null.
- public virtual Response UsageForecast(ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// or is null.
+ public virtual Response CheckCostManagementNameAvailabilityByScopeScheduledAction(ResourceIdentifier scope, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));
- Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
+ Argument.AssertNotNull(content, nameof(content));
- using var scope0 = ForecastClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageForecast");
+ using var scope0 = ScheduledActionsClientDiagnostics.CreateScope("MockableCostManagementArmClient.CheckCostManagementNameAvailabilityByScopeScheduledAction");
scope0.Start();
try
{
- var response = ForecastRestClient.Usage(scope, forecastDefinition, filter, cancellationToken);
+ var response = ScheduledActionsRestClient.CheckNameAvailabilityByScope(scope, content, cancellationToken);
return response;
}
catch (Exception e)
@@ -511,7 +649,7 @@ public virtual Response UsageForecast(ResourceIdentifier scope,
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
@@ -528,7 +666,8 @@ public virtual AsyncPageable GetDimensionsAsync(Resourc
Argument.AssertNotNull(scope, nameof(scope));
HttpMessage FirstPageRequest(int? pageSizeHint) => DimensionsRestClient.CreateListRequest(scope, filter, expand, skiptoken, top);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementArmClient.GetDimensions", "value", null, cancellationToken);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DimensionsRestClient.CreateListNextPageRequest(nextLink, scope, filter, expand, skiptoken, top);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementArmClient.GetDimensions", "value", "nextLink", cancellationToken);
}
///
@@ -544,7 +683,7 @@ public virtual AsyncPageable GetDimensionsAsync(Resourc
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
@@ -561,40 +700,42 @@ public virtual Pageable GetDimensions(ResourceIdentifie
Argument.AssertNotNull(scope, nameof(scope));
HttpMessage FirstPageRequest(int? pageSizeHint) => DimensionsRestClient.CreateListRequest(scope, filter, expand, skiptoken, top);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementArmClient.GetDimensions", "value", null, cancellationToken);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DimensionsRestClient.CreateListNextPageRequest(nextLink, scope, filter, expand, skiptoken, top);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementArmClient.GetDimensions", "value", "nextLink", cancellationToken);
}
///
- /// Query the usage data for scope defined.
+ /// Lists the forecast charges for scope defined.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/query
+ /// /{scope}/providers/Microsoft.CostManagement/forecast
///
/// -
/// Operation Id
- /// Query_Usage
+ /// Forecast_Usage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
/// The cancellation token to use.
- /// or is null.
- public virtual async Task> UsageQueryAsync(ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
+ /// or is null.
+ public virtual async Task> UsageForecastAsync(ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));
- Argument.AssertNotNull(queryDefinition, nameof(queryDefinition));
+ Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
- using var scope0 = QueryClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageQuery");
+ using var scope0 = ForecastClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageForecast");
scope0.Start();
try
{
- var response = await QueryRestClient.UsageAsync(scope, queryDefinition, cancellationToken).ConfigureAwait(false);
+ var response = await ForecastRestClient.UsageAsync(scope, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
return response;
}
catch (Exception e)
@@ -605,36 +746,37 @@ public virtual async Task> UsageQueryAsync(ResourceIdentif
}
///
- /// Query the usage data for scope defined.
+ /// Lists the forecast charges for scope defined.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/query
+ /// /{scope}/providers/Microsoft.CostManagement/forecast
///
/// -
/// Operation Id
- /// Query_Usage
+ /// Forecast_Usage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// The scope that the resource will apply against.
- /// Parameters supplied to the CreateOrUpdate Query Config operation.
+ /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
/// The cancellation token to use.
- /// or is null.
- public virtual Response UsageQuery(ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
+ /// or is null.
+ public virtual Response UsageForecast(ResourceIdentifier scope, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));
- Argument.AssertNotNull(queryDefinition, nameof(queryDefinition));
+ Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
- using var scope0 = QueryClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageQuery");
+ using var scope0 = ForecastClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageForecast");
scope0.Start();
try
{
- var response = QueryRestClient.Usage(scope, queryDefinition, cancellationToken);
+ var response = ForecastRestClient.Usage(scope, forecastDefinition, filter, cancellationToken);
return response;
}
catch (Exception e)
@@ -645,36 +787,36 @@ public virtual Response UsageQuery(ResourceIdentifier scope, QueryD
}
///
- /// Checks availability and correctness of the name for a scheduled action within the given scope.
+ /// Query the usage data for scope defined.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/checkNameAvailability
+ /// /{scope}/providers/Microsoft.CostManagement/query
///
/// -
/// Operation Id
- /// ScheduledActions_CheckNameAvailabilityByScope
+ /// Query_Usage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// The scope that the resource will apply against.
- /// Scheduled action to be created or updated.
+ /// Parameters supplied to the CreateOrUpdate Query Config operation.
/// The cancellation token to use.
- /// or is null.
- public virtual async Task> CheckCostManagementNameAvailabilityByScopeScheduledActionAsync(ResourceIdentifier scope, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
+ /// or is null.
+ public virtual async Task> UsageQueryAsync(ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNull(queryDefinition, nameof(queryDefinition));
- using var scope0 = ScheduledActionsClientDiagnostics.CreateScope("MockableCostManagementArmClient.CheckCostManagementNameAvailabilityByScopeScheduledAction");
+ using var scope0 = QueryClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageQuery");
scope0.Start();
try
{
- var response = await ScheduledActionsRestClient.CheckNameAvailabilityByScopeAsync(scope, content, cancellationToken).ConfigureAwait(false);
+ var response = await QueryRestClient.UsageAsync(scope, queryDefinition, cancellationToken).ConfigureAwait(false);
return response;
}
catch (Exception e)
@@ -685,36 +827,36 @@ public virtual async Task> CheckC
}
///
- /// Checks availability and correctness of the name for a scheduled action within the given scope.
+ /// Query the usage data for scope defined.
///
/// -
/// Request Path
- /// /{scope}/providers/Microsoft.CostManagement/checkNameAvailability
+ /// /{scope}/providers/Microsoft.CostManagement/query
///
/// -
/// Operation Id
- /// ScheduledActions_CheckNameAvailabilityByScope
+ /// Query_Usage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// The scope that the resource will apply against.
- /// Scheduled action to be created or updated.
+ /// Parameters supplied to the CreateOrUpdate Query Config operation.
/// The cancellation token to use.
- /// or is null.
- public virtual Response CheckCostManagementNameAvailabilityByScopeScheduledAction(ResourceIdentifier scope, CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
+ /// or is null.
+ public virtual Response UsageQuery(ResourceIdentifier scope, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNull(queryDefinition, nameof(queryDefinition));
- using var scope0 = ScheduledActionsClientDiagnostics.CreateScope("MockableCostManagementArmClient.CheckCostManagementNameAvailabilityByScopeScheduledAction");
+ using var scope0 = QueryClientDiagnostics.CreateScope("MockableCostManagementArmClient.UsageQuery");
scope0.Start();
try
{
- var response = ScheduledActionsRestClient.CheckNameAvailabilityByScope(scope, content, cancellationToken);
+ var response = QueryRestClient.Usage(scope, queryDefinition, cancellationToken);
return response;
}
catch (Exception e)
@@ -723,6 +865,54 @@ public virtual Response CheckCostManagemen
throw;
}
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual CostManagementAlertResource GetCostManagementAlertResource(ResourceIdentifier id)
+ {
+ CostManagementAlertResource.ValidateResourceId(id);
+ return new CostManagementAlertResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual BudgetResource GetBudgetResource(ResourceIdentifier id)
+ {
+ BudgetResource.ValidateResourceId(id);
+ return new BudgetResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual ScheduledActionResource GetScheduledActionResource(ResourceIdentifier id)
+ {
+ ScheduledActionResource.ValidateResourceId(id);
+ return new ScheduledActionResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual TenantScheduledActionResource GetTenantScheduledActionResource(ResourceIdentifier id)
+ {
+ TenantScheduledActionResource.ValidateResourceId(id);
+ return new TenantScheduledActionResource(Client, id);
+ }
+
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// You can use to create a from its components.
@@ -736,15 +926,15 @@ public virtual CostManagementExportResource GetCostManagementExportResource(Reso
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
///
/// The resource ID of the resource to get.
- /// Returns a object.
- public virtual TenantsCostManagementViewsResource GetTenantsCostManagementViewsResource(ResourceIdentifier id)
+ /// Returns a object.
+ public virtual SettingResource GetSettingResource(ResourceIdentifier id)
{
- TenantsCostManagementViewsResource.ValidateResourceId(id);
- return new TenantsCostManagementViewsResource(Client, id);
+ SettingResource.ValidateResourceId(id);
+ return new SettingResource(Client, id);
}
///
@@ -760,39 +950,27 @@ public virtual CostManagementViewsResource GetCostManagementViewsResource(Resour
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The resource ID of the resource to get.
- /// Returns a object.
- public virtual CostManagementAlertResource GetCostManagementAlertResource(ResourceIdentifier id)
- {
- CostManagementAlertResource.ValidateResourceId(id);
- return new CostManagementAlertResource(Client, id);
- }
-
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
///
/// The resource ID of the resource to get.
- /// Returns a object.
- public virtual TenantScheduledActionResource GetTenantScheduledActionResource(ResourceIdentifier id)
+ /// Returns a object.
+ public virtual TenantsCostManagementViewsResource GetTenantsCostManagementViewsResource(ResourceIdentifier id)
{
- TenantScheduledActionResource.ValidateResourceId(id);
- return new TenantScheduledActionResource(Client, id);
+ TenantsCostManagementViewsResource.ValidateResourceId(id);
+ return new TenantsCostManagementViewsResource(Client, id);
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
///
/// The resource ID of the resource to get.
- /// Returns a object.
- public virtual ScheduledActionResource GetScheduledActionResource(ResourceIdentifier id)
+ /// Returns a object.
+ public virtual CostAllocationRuleDefinitionResource GetCostAllocationRuleDefinitionResource(ResourceIdentifier id)
{
- ScheduledActionResource.ValidateResourceId(id);
- return new ScheduledActionResource(Client, id);
+ CostAllocationRuleDefinitionResource.ValidateResourceId(id);
+ return new CostAllocationRuleDefinitionResource(Client, id);
}
}
}
diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementTenantResource.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementTenantResource.cs
index 6122ee1cd6ff..ecd85cd69d85 100644
--- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementTenantResource.cs
+++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/Extensions/MockableCostManagementTenantResource.cs
@@ -18,34 +18,26 @@ namespace Azure.ResourceManager.CostManagement.Mocking
/// A class to add extension methods to TenantResource.
public partial class MockableCostManagementTenantResource : ArmResource
{
- private ClientDiagnostics _benefitUtilizationSummariesClientDiagnostics;
- private BenefitUtilizationSummariesRestOperations _benefitUtilizationSummariesRestClient;
- private ClientDiagnostics _billingAccountScopeClientDiagnostics;
- private BillingAccountScopeRestOperations _billingAccountScopeRestClient;
- private ClientDiagnostics _billingProfileScopeClientDiagnostics;
- private BillingProfileScopeRestOperations _billingProfileScopeRestClient;
- private ClientDiagnostics _reservationOrderScopeClientDiagnostics;
- private ReservationOrderScopeRestOperations _reservationOrderScopeRestClient;
- private ClientDiagnostics _reservationScopeClientDiagnostics;
- private ReservationScopeRestOperations _reservationScopeRestClient;
- private ClientDiagnostics _savingsPlanOrderScopeClientDiagnostics;
- private SavingsPlanOrderScopeRestOperations _savingsPlanOrderScopeRestClient;
- private ClientDiagnostics _savingsPlanScopeClientDiagnostics;
- private SavingsPlanScopeRestOperations _savingsPlanScopeRestClient;
private ClientDiagnostics _costManagementAlertAlertsClientDiagnostics;
private AlertsRestOperations _costManagementAlertAlertsRestClient;
- private ClientDiagnostics _forecastClientDiagnostics;
- private ForecastRestOperations _forecastRestClient;
+ private ClientDiagnostics _scheduledActionsClientDiagnostics;
+ private ScheduledActionsRestOperations _scheduledActionsRestClient;
private ClientDiagnostics _dimensionsClientDiagnostics;
private DimensionsRestOperations _dimensionsRestClient;
+ private ClientDiagnostics _forecastClientDiagnostics;
+ private ForecastRestOperations _forecastRestClient;
private ClientDiagnostics _queryClientDiagnostics;
private QueryRestOperations _queryRestClient;
- private ClientDiagnostics _generateReservationDetailsReportClientDiagnostics;
- private GenerateReservationDetailsReportRestOperations _generateReservationDetailsReportRestClient;
private ClientDiagnostics _priceSheetClientDiagnostics;
private PriceSheetRestOperations _priceSheetRestClient;
- private ClientDiagnostics _scheduledActionsClientDiagnostics;
- private ScheduledActionsRestOperations _scheduledActionsRestClient;
+ private ClientDiagnostics _benefitUtilizationSummariesClientDiagnostics;
+ private BenefitUtilizationSummariesRestOperations _benefitUtilizationSummariesRestClient;
+ private ClientDiagnostics _generateBenefitUtilizationSummariesReportClientDiagnostics;
+ private GenerateBenefitUtilizationSummariesReportRestOperations _generateBenefitUtilizationSummariesReportRestClient;
+ private ClientDiagnostics _generateReservationDetailsReportClientDiagnostics;
+ private GenerateReservationDetailsReportRestOperations _generateReservationDetailsReportRestClient;
+ private ClientDiagnostics _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics;
+ private CostAllocationRulesRestOperations _costAllocationRuleDefinitionCostAllocationRulesRestClient;
/// Initializes a new instance of the class for mocking.
protected MockableCostManagementTenantResource()
@@ -59,34 +51,26 @@ internal MockableCostManagementTenantResource(ArmClient client, ResourceIdentifi
{
}
- private ClientDiagnostics BenefitUtilizationSummariesClientDiagnostics => _benefitUtilizationSummariesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private BenefitUtilizationSummariesRestOperations BenefitUtilizationSummariesRestClient => _benefitUtilizationSummariesRestClient ??= new BenefitUtilizationSummariesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics BillingAccountScopeClientDiagnostics => _billingAccountScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private BillingAccountScopeRestOperations BillingAccountScopeRestClient => _billingAccountScopeRestClient ??= new BillingAccountScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics BillingProfileScopeClientDiagnostics => _billingProfileScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private BillingProfileScopeRestOperations BillingProfileScopeRestClient => _billingProfileScopeRestClient ??= new BillingProfileScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics ReservationOrderScopeClientDiagnostics => _reservationOrderScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private ReservationOrderScopeRestOperations ReservationOrderScopeRestClient => _reservationOrderScopeRestClient ??= new ReservationOrderScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics ReservationScopeClientDiagnostics => _reservationScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private ReservationScopeRestOperations ReservationScopeRestClient => _reservationScopeRestClient ??= new ReservationScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics SavingsPlanOrderScopeClientDiagnostics => _savingsPlanOrderScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private SavingsPlanOrderScopeRestOperations SavingsPlanOrderScopeRestClient => _savingsPlanOrderScopeRestClient ??= new SavingsPlanOrderScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics SavingsPlanScopeClientDiagnostics => _savingsPlanScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private SavingsPlanScopeRestOperations SavingsPlanScopeRestClient => _savingsPlanScopeRestClient ??= new SavingsPlanScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics CostManagementAlertAlertsClientDiagnostics => _costManagementAlertAlertsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", CostManagementAlertResource.ResourceType.Namespace, Diagnostics);
private AlertsRestOperations CostManagementAlertAlertsRestClient => _costManagementAlertAlertsRestClient ??= new AlertsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CostManagementAlertResource.ResourceType));
- private ClientDiagnostics ForecastClientDiagnostics => _forecastClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private ForecastRestOperations ForecastRestClient => _forecastRestClient ??= new ForecastRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics ScheduledActionsClientDiagnostics => _scheduledActionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private ScheduledActionsRestOperations ScheduledActionsRestClient => _scheduledActionsRestClient ??= new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics DimensionsClientDiagnostics => _dimensionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private DimensionsRestOperations DimensionsRestClient => _dimensionsRestClient ??= new DimensionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics ForecastClientDiagnostics => _forecastClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private ForecastRestOperations ForecastRestClient => _forecastRestClient ??= new ForecastRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics QueryClientDiagnostics => _queryClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private QueryRestOperations QueryRestClient => _queryRestClient ??= new QueryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics GenerateReservationDetailsReportClientDiagnostics => _generateReservationDetailsReportClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private GenerateReservationDetailsReportRestOperations GenerateReservationDetailsReportRestClient => _generateReservationDetailsReportRestClient ??= new GenerateReservationDetailsReportRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics PriceSheetClientDiagnostics => _priceSheetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private PriceSheetRestOperations PriceSheetRestClient => _priceSheetRestClient ??= new PriceSheetRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
- private ClientDiagnostics ScheduledActionsClientDiagnostics => _scheduledActionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private ScheduledActionsRestOperations ScheduledActionsRestClient => _scheduledActionsRestClient ??= new ScheduledActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics BenefitUtilizationSummariesClientDiagnostics => _benefitUtilizationSummariesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private BenefitUtilizationSummariesRestOperations BenefitUtilizationSummariesRestClient => _benefitUtilizationSummariesRestClient ??= new BenefitUtilizationSummariesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics GenerateBenefitUtilizationSummariesReportClientDiagnostics => _generateBenefitUtilizationSummariesReportClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private GenerateBenefitUtilizationSummariesReportRestOperations GenerateBenefitUtilizationSummariesReportRestClient => _generateBenefitUtilizationSummariesReportRestClient ??= new GenerateBenefitUtilizationSummariesReportRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics GenerateReservationDetailsReportClientDiagnostics => _generateReservationDetailsReportClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private GenerateReservationDetailsReportRestOperations GenerateReservationDetailsReportRestClient => _generateReservationDetailsReportRestClient ??= new GenerateReservationDetailsReportRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ private ClientDiagnostics CostAllocationRuleDefinitionCostAllocationRulesClientDiagnostics => _costAllocationRuleDefinitionCostAllocationRulesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.CostManagement", CostAllocationRuleDefinitionResource.ResourceType.Namespace, Diagnostics);
+ private CostAllocationRulesRestOperations CostAllocationRuleDefinitionCostAllocationRulesRestClient => _costAllocationRuleDefinitionCostAllocationRulesRestClient ??= new CostAllocationRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CostAllocationRuleDefinitionResource.ResourceType));
private string GetApiVersionOrNull(ResourceType resourceType)
{
@@ -94,6 +78,75 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}
+ /// Gets a collection of TenantScheduledActionResources in the TenantResource.
+ /// An object representing collection of TenantScheduledActionResources and their operations over a TenantScheduledActionResource.
+ public virtual TenantScheduledActionCollection GetTenantScheduledActions()
+ {
+ return GetCachedClient(client => new TenantScheduledActionCollection(client, Id));
+ }
+
+ ///
+ /// Get the private scheduled action by name.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ ///
+ /// -
+ /// Operation Id
+ /// ScheduledActions_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Scheduled action name.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetTenantScheduledActionAsync(string name, CancellationToken cancellationToken = default)
+ {
+ return await GetTenantScheduledActions().GetAsync(name, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get the private scheduled action by name.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ ///
+ /// -
+ /// Operation Id
+ /// ScheduledActions_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Scheduled action name.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetTenantScheduledAction(string name, CancellationToken cancellationToken = default)
+ {
+ return GetTenantScheduledActions().Get(name, cancellationToken);
+ }
+
/// Gets a collection of TenantsCostManagementViewsResources in the TenantResource.
/// An object representing collection of TenantsCostManagementViewsResources and their operations over a TenantsCostManagementViewsResource.
public virtual TenantsCostManagementViewsCollection GetAllTenantsCostManagementViews()
@@ -114,7 +167,7 @@ public virtual TenantsCostManagementViewsCollection GetAllTenantsCostManagementV
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -145,7 +198,7 @@ public virtual async Task> GetTenan
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
@@ -163,384 +216,406 @@ public virtual Response GetTenantsCostManage
return GetAllTenantsCostManagementViews().Get(viewName, cancellationToken);
}
- /// Gets a collection of TenantScheduledActionResources in the TenantResource.
- /// An object representing collection of TenantScheduledActionResources and their operations over a TenantScheduledActionResource.
- public virtual TenantScheduledActionCollection GetTenantScheduledActions()
+ /// Gets a collection of CostAllocationRuleDefinitionResources in the TenantResource.
+ /// BillingAccount ID.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// An object representing collection of CostAllocationRuleDefinitionResources and their operations over a CostAllocationRuleDefinitionResource.
+ public virtual CostAllocationRuleDefinitionCollection GetCostAllocationRuleDefinitions(string billingAccountId)
{
- return GetCachedClient(client => new TenantScheduledActionCollection(client, Id));
+ return new CostAllocationRuleDefinitionCollection(Client, Id, billingAccountId);
}
///
- /// Get the private scheduled action by name.
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
///
/// -
/// Operation Id
- /// ScheduledActions_Get
+ /// CostAllocationRules_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
- /// Scheduled action name.
+ /// BillingAccount ID.
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual async Task> GetTenantScheduledActionAsync(string name, CancellationToken cancellationToken = default)
+ public virtual async Task> GetCostAllocationRuleDefinitionAsync(string billingAccountId, string ruleName, CancellationToken cancellationToken = default)
{
- return await GetTenantScheduledActions().GetAsync(name, cancellationToken).ConfigureAwait(false);
+ return await GetCostAllocationRuleDefinitions(billingAccountId).GetAsync(ruleName, cancellationToken).ConfigureAwait(false);
}
///
- /// Get the private scheduled action by name.
+ /// Get a cost allocation rule by rule name and billing account or enterprise enrollment.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/scheduledActions/{name}
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName}
///
/// -
/// Operation Id
- /// ScheduledActions_Get
+ /// CostAllocationRules_Get
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
- /// Scheduled action name.
+ /// BillingAccount ID.
+ /// Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual Response GetTenantScheduledAction(string name, CancellationToken cancellationToken = default)
+ public virtual Response GetCostAllocationRuleDefinition(string billingAccountId, string ruleName, CancellationToken cancellationToken = default)
{
- return GetTenantScheduledActions().Get(name, cancellationToken);
+ return GetCostAllocationRuleDefinitions(billingAccountId).Get(ruleName, cancellationToken);
}
///
- /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Lists the Alerts for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingAccountId
+ /// Alerts_ListExternal
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
///
- /// Billing account ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetBenefitUtilizationSummariesByBillingAccountIdAsync(string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetCostManagementAlertsAsync(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdRequest(billingAccountId, grainParameter, filter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdNextPageRequest(nextLink, billingAccountId, grainParameter, filter);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingAccountId", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CostManagementAlertAlertsRestClient.CreateListExternalRequest(externalCloudProviderType, externalCloudProviderId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new CostManagementAlertResource(Client, CostManagementAlertData.DeserializeCostManagementAlertData(e)), CostManagementAlertAlertsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetCostManagementAlerts", "value", null, cancellationToken);
}
///
- /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Lists the Alerts for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingAccountId
+ /// Alerts_ListExternal
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ /// -
+ /// Resource
+ ///
///
///
///
- /// Billing account ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetBenefitUtilizationSummariesByBillingAccountId(string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetCostManagementAlerts(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdRequest(billingAccountId, grainParameter, filter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdNextPageRequest(nextLink, billingAccountId, grainParameter, filter);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingAccountId", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CostManagementAlertAlertsRestClient.CreateListExternalRequest(externalCloudProviderType, externalCloudProviderId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new CostManagementAlertResource(Client, CostManagementAlertData.DeserializeCostManagementAlertData(e)), CostManagementAlertAlertsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetCostManagementAlerts", "value", null, cancellationToken);
}
///
- /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Checks availability and correctness of the name for a scheduled action.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/checkNameAvailability
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingProfileId
+ /// ScheduledActions_CheckNameAvailability
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// Billing account ID.
- /// Billing profile ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The request body.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetBenefitUtilizationSummariesByBillingProfileIdAsync(string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual async Task> CheckCostManagementNameAvailabilityByScheduledActionAsync(CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
- Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
+ Argument.AssertNotNull(content, nameof(content));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdRequest(billingAccountId, billingProfileId, grainParameter, filter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdNextPageRequest(nextLink, billingAccountId, billingProfileId, grainParameter, filter);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingProfileId", "value", "nextLink", cancellationToken);
+ using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableCostManagementTenantResource.CheckCostManagementNameAvailabilityByScheduledAction");
+ scope.Start();
+ try
+ {
+ var response = await ScheduledActionsRestClient.CheckNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
+ /// Checks availability and correctness of the name for a scheduled action.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/checkNameAvailability
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListByBillingProfileId
+ /// ScheduledActions_CheckNameAvailability
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// Billing account ID.
- /// Billing profile ID.
- /// Grain.
- /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The request body.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetBenefitUtilizationSummariesByBillingProfileId(string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual Response CheckCostManagementNameAvailabilityByScheduledAction(CostManagementNameAvailabilityContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
- Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
+ Argument.AssertNotNull(content, nameof(content));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdRequest(billingAccountId, billingProfileId, grainParameter, filter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdNextPageRequest(nextLink, billingAccountId, billingProfileId, grainParameter, filter);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingProfileId", "value", "nextLink", cancellationToken);
+ using var scope = ScheduledActionsClientDiagnostics.CreateScope("MockableCostManagementTenantResource.CheckCostManagementNameAvailabilityByScheduledAction");
+ scope.Start();
+ try
+ {
+ var response = ScheduledActionsRestClient.CheckNameAvailability(content, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ /// Lists the dimensions by the external cloud provider type.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
+ /// Dimensions_ByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// Savings plan order ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanOrderAsync(string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
- {
- Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable ByExternalCloudProviderTypeDimensionsAsync(TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(options, nameof(options));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderRequest(savingsPlanOrderId, filter, grainParameter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderNextPageRequest(nextLink, savingsPlanOrderId, filter, grainParameter);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanOrder", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => DimensionsRestClient.CreateByExternalCloudProviderTypeRequest(options.ExternalCloudProviderType, options.ExternalCloudProviderId, options.Filter, options.Expand, options.Skiptoken, options.Top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DimensionsRestClient.CreateByExternalCloudProviderTypeNextPageRequest(nextLink, options.ExternalCloudProviderType, options.ExternalCloudProviderId, options.Filter, options.Expand, options.Skiptoken, options.Top);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.ByExternalCloudProviderTypeDimensions", "value", "nextLink", cancellationToken);
}
///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ /// Lists the dimensions by the external cloud provider type.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
+ /// Dimensions_ByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// Savings plan order ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetBenefitUtilizationSummariesBySavingsPlanOrder(string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable ByExternalCloudProviderTypeDimensions(TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
+ Argument.AssertNotNull(options, nameof(options));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderRequest(savingsPlanOrderId, filter, grainParameter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderNextPageRequest(nextLink, savingsPlanOrderId, filter, grainParameter);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanOrder", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => DimensionsRestClient.CreateByExternalCloudProviderTypeRequest(options.ExternalCloudProviderType, options.ExternalCloudProviderId, options.Filter, options.Expand, options.Skiptoken, options.Top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DimensionsRestClient.CreateByExternalCloudProviderTypeNextPageRequest(nextLink, options.ExternalCloudProviderType, options.ExternalCloudProviderId, options.Filter, options.Expand, options.Skiptoken, options.Top);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.ByExternalCloudProviderTypeDimensions", "value", "nextLink", cancellationToken);
}
///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ /// Lists the forecast charges for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanId
+ /// Forecast_ExternalCloudProviderUsage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// Savings plan order ID.
- /// Savings plan ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanIdAsync(string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> ExternalCloudProviderUsageForecastAsync(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
- Argument.AssertNotNullOrEmpty(savingsPlanId, nameof(savingsPlanId));
+ Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
+ Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdRequest(savingsPlanOrderId, savingsPlanId, filter, grainParameter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdNextPageRequest(nextLink, savingsPlanOrderId, savingsPlanId, filter, grainParameter);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanId", "value", "nextLink", cancellationToken);
+ using var scope = ForecastClientDiagnostics.CreateScope("MockableCostManagementTenantResource.ExternalCloudProviderUsageForecast");
+ scope.Start();
+ try
+ {
+ var response = await ForecastRestClient.ExternalCloudProviderUsageAsync(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Lists the savings plan utilization summaries for daily or monthly grain.
+ /// Lists the forecast charges for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
///
/// -
/// Operation Id
- /// BenefitUtilizationSummaries_ListBySavingsPlanId
+ /// Forecast_ExternalCloudProviderUsage
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// Savings plan order ID.
- /// Savings plan ID.
- /// Supports filtering by properties/usageDate.
- /// Grain.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
+ /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// or is null.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetBenefitUtilizationSummariesBySavingsPlanId(string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual Response ExternalCloudProviderUsageForecast(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
- Argument.AssertNotNullOrEmpty(savingsPlanId, nameof(savingsPlanId));
+ Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
+ Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
- HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdRequest(savingsPlanOrderId, savingsPlanId, filter, grainParameter);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdNextPageRequest(nextLink, savingsPlanOrderId, savingsPlanId, filter, grainParameter);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanId", "value", "nextLink", cancellationToken);
+ using var scope = ForecastClientDiagnostics.CreateScope("MockableCostManagementTenantResource.ExternalCloudProviderUsageForecast");
+ scope.Start();
+ try
+ {
+ var response = ForecastRestClient.ExternalCloudProviderUsage(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
+ /// Query the usage data for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query
///
/// -
/// Operation Id
- /// BillingAccountScope_GenerateBenefitUtilizationSummariesReport
+ /// Query_UsageByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual async Task> GenerateBenefitUtilizationSummariesReportBillingAccountScopeAsync(WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> UsageByExternalCloudProviderTypeQueryAsync(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
+ Argument.AssertNotNull(queryDefinition, nameof(queryDefinition));
- using var scope = BillingAccountScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingAccountScope");
+ using var scope = QueryClientDiagnostics.CreateScope("MockableCostManagementTenantResource.UsageByExternalCloudProviderTypeQuery");
scope.Start();
try
{
- var response = await BillingAccountScopeRestClient.GenerateBenefitUtilizationSummariesReportAsync(billingAccountId, content, cancellationToken).ConfigureAwait(false);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), BillingAccountScopeClientDiagnostics, Pipeline, BillingAccountScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(billingAccountId, content).Request, response, OperationFinalStateVia.Location);
- if (waitUntil == WaitUntil.Completed)
- await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
- return operation;
+ var response = await QueryRestClient.UsageByExternalCloudProviderTypeAsync(externalCloudProviderType, externalCloudProviderId, queryDefinition, cancellationToken).ConfigureAwait(false);
+ return response;
}
catch (Exception e)
{
@@ -550,42 +625,39 @@ public virtual async Task
- /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
+ /// Query the usage data for external cloud provider type defined.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query
///
/// -
/// Operation Id
- /// BillingAccountScope_GenerateBenefitUtilizationSummariesReport
+ /// Query_UsageByExternalCloudProviderType
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
+ /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// The request body.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual ArmOperation GenerateBenefitUtilizationSummariesReportBillingAccountScope(WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual Response UsageByExternalCloudProviderTypeQuery(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, QueryDefinition queryDefinition, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
+ Argument.AssertNotNull(queryDefinition, nameof(queryDefinition));
- using var scope = BillingAccountScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingAccountScope");
+ using var scope = QueryClientDiagnostics.CreateScope("MockableCostManagementTenantResource.UsageByExternalCloudProviderTypeQuery");
scope.Start();
try
{
- var response = BillingAccountScopeRestClient.GenerateBenefitUtilizationSummariesReport(billingAccountId, content, cancellationToken);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), BillingAccountScopeClientDiagnostics, Pipeline, BillingAccountScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(billingAccountId, content).Request, response, OperationFinalStateVia.Location);
- if (waitUntil == WaitUntil.Completed)
- operation.WaitForCompletion(cancellationToken);
- return operation;
+ var response = QueryRestClient.UsageByExternalCloudProviderType(externalCloudProviderType, externalCloudProviderId, queryDefinition, cancellationToken);
+ return response;
}
catch (Exception e)
{
@@ -595,41 +667,53 @@ public virtual ArmOperation Generate
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
+ /// Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for Enterprise Agreement customers.
+ ///
+ /// **Migrate to version 2025-03-01**
+ ///
+ /// You can use the 2025-03-01 API version with the new URI:
+ ///
+ /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ ///
+ /// With a new schema detailed below, the new version of the price sheet provides additional information and includes prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing.
+ ///
+ /// The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a billing period older than 13 months, please contact support.
+ ///
+ /// The Azure price sheet download experience has been updated from a single .csv file to a zip file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST method; details can be found below.
+ ///
+ /// All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no longer be supported after this date.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BillingProfileScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Billing profile ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Period Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public virtual async Task> GenerateBenefitUtilizationSummariesReportBillingProfileScopeAsync(WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> DownloadByBillingAccountPriceSheetAsync(WaitUntil waitUntil, string billingAccountId, string billingPeriodName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
- Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(billingPeriodName, nameof(billingPeriodName));
- using var scope = BillingProfileScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingProfileScope");
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadByBillingAccountPriceSheet");
scope.Start();
try
{
- var response = await BillingProfileScopeRestClient.GenerateBenefitUtilizationSummariesReportAsync(billingAccountId, billingProfileId, content, cancellationToken).ConfigureAwait(false);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), BillingProfileScopeClientDiagnostics, Pipeline, BillingProfileScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(billingAccountId, billingProfileId, content).Request, response, OperationFinalStateVia.Location);
+ var response = await PriceSheetRestClient.DownloadByBillingAccountAsync(billingAccountId, billingPeriodName, cancellationToken).ConfigureAwait(false);
+ var operation = new CostManagementArmOperation(new OperationStatusOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByBillingAccountRequest(billingAccountId, billingPeriodName).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -642,41 +726,53 @@ public virtual async Task
- /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
+ /// Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for Enterprise Agreement customers.
+ ///
+ /// **Migrate to version 2025-03-01**
+ ///
+ /// You can use the 2025-03-01 API version with the new URI:
+ ///
+ /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ ///
+ /// With a new schema detailed below, the new version of the price sheet provides additional information and includes prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing.
+ ///
+ /// The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a billing period older than 13 months, please contact support.
+ ///
+ /// The Azure price sheet download experience has been updated from a single .csv file to a zip file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST method; details can be found below.
+ ///
+ /// All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no longer be supported after this date.
///
/// -
/// Request Path
- /// /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// BillingProfileScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Billing account ID.
- /// Billing profile ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Period Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public virtual ArmOperation GenerateBenefitUtilizationSummariesReportBillingProfileScope(WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation DownloadByBillingAccountPriceSheet(WaitUntil waitUntil, string billingAccountId, string billingPeriodName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
- Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(billingPeriodName, nameof(billingPeriodName));
- using var scope = BillingProfileScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingProfileScope");
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadByBillingAccountPriceSheet");
scope.Start();
try
{
- var response = BillingProfileScopeRestClient.GenerateBenefitUtilizationSummariesReport(billingAccountId, billingProfileId, content, cancellationToken);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), BillingProfileScopeClientDiagnostics, Pipeline, BillingProfileScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(billingAccountId, billingProfileId, content).Request, response, OperationFinalStateVia.Location);
+ var response = PriceSheetRestClient.DownloadByBillingAccount(billingAccountId, billingPeriodName, cancellationToken);
+ var operation = new CostManagementArmOperation(new OperationStatusOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByBillingAccountRequest(billingAccountId, billingPeriodName).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -689,39 +785,41 @@ public virtual ArmOperation Generate
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ /// Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// ReservationOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByInvoice
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
+ /// The ID that uniquely identifies an invoice.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual async Task> GenerateBenefitUtilizationSummariesReportReservationOrderScopeAsync(WaitUntil waitUntil, string reservationOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// , or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public virtual async Task> DownloadPriceSheetAsync(WaitUntil waitUntil, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(reservationOrderId, nameof(reservationOrderId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(billingAccountName, nameof(billingAccountName));
+ Argument.AssertNotNullOrEmpty(billingProfileName, nameof(billingProfileName));
+ Argument.AssertNotNullOrEmpty(invoiceName, nameof(invoiceName));
- using var scope = ReservationOrderScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportReservationOrderScope");
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadPriceSheet");
scope.Start();
try
{
- var response = await ReservationOrderScopeRestClient.GenerateBenefitUtilizationSummariesReportAsync(reservationOrderId, content, cancellationToken).ConfigureAwait(false);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), ReservationOrderScopeClientDiagnostics, Pipeline, ReservationOrderScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(reservationOrderId, content).Request, response, OperationFinalStateVia.Location);
+ var response = await PriceSheetRestClient.DownloadByInvoiceAsync(billingAccountName, billingProfileName, invoiceName, cancellationToken).ConfigureAwait(false);
+ var operation = new CostManagementArmOperation(new DownloadURLOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByInvoiceRequest(billingAccountName, billingProfileName, invoiceName).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -734,39 +832,41 @@ public virtual async Task
- /// Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ /// Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// ReservationOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByInvoice
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
+ /// The ID that uniquely identifies an invoice.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual ArmOperation GenerateBenefitUtilizationSummariesReportReservationOrderScope(WaitUntil waitUntil, string reservationOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// , or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public virtual ArmOperation DownloadPriceSheet(WaitUntil waitUntil, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(reservationOrderId, nameof(reservationOrderId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(billingAccountName, nameof(billingAccountName));
+ Argument.AssertNotNullOrEmpty(billingProfileName, nameof(billingProfileName));
+ Argument.AssertNotNullOrEmpty(invoiceName, nameof(invoiceName));
- using var scope = ReservationOrderScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportReservationOrderScope");
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadPriceSheet");
scope.Start();
try
{
- var response = ReservationOrderScopeRestClient.GenerateBenefitUtilizationSummariesReport(reservationOrderId, content, cancellationToken);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), ReservationOrderScopeClientDiagnostics, Pipeline, ReservationOrderScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(reservationOrderId, content).Request, response, OperationFinalStateVia.Location);
+ var response = PriceSheetRestClient.DownloadByInvoice(billingAccountName, billingProfileName, invoiceName, cancellationToken);
+ var operation = new CostManagementArmOperation(new DownloadURLOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByInvoiceRequest(billingAccountName, billingProfileName, invoiceName).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -779,41 +879,43 @@ public virtual ArmOperation Generate
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided reservation.
+ /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ ///
+ /// You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI) pricing is only available through the new version of the API.
+ ///
+ /// Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// ReservationScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Reservation ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public virtual async Task> GenerateBenefitUtilizationSummariesReportReservationScopeAsync(WaitUntil waitUntil, string reservationOrderId, string reservationId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> DownloadPriceSheetByBillingProfileAsync(WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(reservationOrderId, nameof(reservationOrderId));
- Argument.AssertNotNullOrEmpty(reservationId, nameof(reservationId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(billingAccountName, nameof(billingAccountName));
+ Argument.AssertNotNullOrEmpty(billingProfileName, nameof(billingProfileName));
- using var scope = ReservationScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportReservationScope");
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadPriceSheetByBillingProfile");
scope.Start();
try
{
- var response = await ReservationScopeRestClient.GenerateBenefitUtilizationSummariesReportAsync(reservationOrderId, reservationId, content, cancellationToken).ConfigureAwait(false);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), ReservationScopeClientDiagnostics, Pipeline, ReservationScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(reservationOrderId, reservationId, content).Request, response, OperationFinalStateVia.Location);
+ var response = await PriceSheetRestClient.DownloadByBillingProfileAsync(billingAccountName, billingProfileName, cancellationToken).ConfigureAwait(false);
+ var operation = new CostManagementArmOperation(new PricesheetDownloadPropertiesOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByBillingProfileRequest(billingAccountName, billingProfileName).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -826,41 +928,43 @@ public virtual async Task
- /// Triggers generation of a benefit utilization summaries report for the provided reservation.
+ /// Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ ///
+ /// You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI) pricing is only available through the new version of the API.
+ ///
+ /// Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
///
/// -
/// Request Path
- /// /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download
///
/// -
/// Operation Id
- /// ReservationScope_GenerateBenefitUtilizationSummariesReport
+ /// PriceSheet_DownloadByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Reservation Order ID.
- /// Reservation ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile Name.
/// The cancellation token to use.
- /// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public virtual ArmOperation GenerateBenefitUtilizationSummariesReportReservationScope(WaitUntil waitUntil, string reservationOrderId, string reservationId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation DownloadPriceSheetByBillingProfile(WaitUntil waitUntil, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(reservationOrderId, nameof(reservationOrderId));
- Argument.AssertNotNullOrEmpty(reservationId, nameof(reservationId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(billingAccountName, nameof(billingAccountName));
+ Argument.AssertNotNullOrEmpty(billingProfileName, nameof(billingProfileName));
- using var scope = ReservationScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportReservationScope");
+ using var scope = PriceSheetClientDiagnostics.CreateScope("MockableCostManagementTenantResource.DownloadPriceSheetByBillingProfile");
scope.Start();
try
{
- var response = ReservationScopeRestClient.GenerateBenefitUtilizationSummariesReport(reservationOrderId, reservationId, content, cancellationToken);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), ReservationScopeClientDiagnostics, Pipeline, ReservationScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(reservationOrderId, reservationId, content).Request, response, OperationFinalStateVia.Location);
+ var response = PriceSheetRestClient.DownloadByBillingProfile(billingAccountName, billingProfileName, cancellationToken);
+ var operation = new CostManagementArmOperation(new PricesheetDownloadPropertiesOperationSource(), PriceSheetClientDiagnostics, Pipeline, PriceSheetRestClient.CreateDownloadByBillingProfileRequest(billingAccountName, billingProfileName).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -873,294 +977,408 @@ public virtual ArmOperation Generate
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListByBillingProfileId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Savings plan order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual async Task> GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScopeAsync(WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetBenefitUtilizationSummariesByBillingProfileIdAsync(string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
- using var scope = SavingsPlanOrderScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope");
- scope.Start();
- try
- {
- var response = await SavingsPlanOrderScopeRestClient.GenerateBenefitUtilizationSummariesReportAsync(savingsPlanOrderId, content, cancellationToken).ConfigureAwait(false);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), SavingsPlanOrderScopeClientDiagnostics, Pipeline, SavingsPlanOrderScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(savingsPlanOrderId, content).Request, response, OperationFinalStateVia.Location);
- if (waitUntil == WaitUntil.Completed)
- await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdRequest(billingAccountId, billingProfileId, grainParameter, filter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdNextPageRequest(nextLink, billingAccountId, billingProfileId, grainParameter, filter);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingProfileId", "value", "nextLink", cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ /// Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanOrderScope_GenerateBenefitUtilizationSummariesReport
+ /// BenefitUtilizationSummaries_ListByBillingProfileId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ ///
+ ///
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The cancellation token to use.
+ /// or is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetBenefitUtilizationSummariesByBillingProfileId(string billingAccountId, string billingProfileId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdRequest(billingAccountId, billingProfileId, grainParameter, filter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingProfileIdNextPageRequest(nextLink, billingAccountId, billingProfileId, grainParameter, filter);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingProfileId", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ ///
+ /// -
+ /// Operation Id
+ /// BenefitUtilizationSummaries_ListByBillingAccountId
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
+ ///
+ /// BillingAccount ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetBenefitUtilizationSummariesByBillingAccountIdAsync(string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdRequest(billingAccountId, grainParameter, filter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdNextPageRequest(nextLink, billingAccountId, grainParameter, filter);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingAccountId", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ ///
+ /// -
+ /// Operation Id
+ /// BenefitUtilizationSummaries_ListByBillingAccountId
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
+ ///
+ ///
+ ///
+ /// BillingAccount ID.
+ /// Grain.
+ /// Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetBenefitUtilizationSummariesByBillingAccountId(string billingAccountId, GrainContent? grainParameter = null, string filter = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdRequest(billingAccountId, grainParameter, filter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListByBillingAccountIdNextPageRequest(nextLink, billingAccountId, grainParameter, filter);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesByBillingAccountId", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ ///
+ /// -
+ /// Operation Id
+ /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
///
///
///
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Savings plan order ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual ArmOperation GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope(WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanOrderAsync(string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
- Argument.AssertNotNull(content, nameof(content));
- using var scope = SavingsPlanOrderScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope");
- scope.Start();
- try
- {
- var response = SavingsPlanOrderScopeRestClient.GenerateBenefitUtilizationSummariesReport(savingsPlanOrderId, content, cancellationToken);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), SavingsPlanOrderScopeClientDiagnostics, Pipeline, SavingsPlanOrderScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportRequest(savingsPlanOrderId, content).Request, response, OperationFinalStateVia.Location);
- if (waitUntil == WaitUntil.Completed)
- operation.WaitForCompletion(cancellationToken);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderRequest(savingsPlanOrderId, filter, grainParameter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderNextPageRequest(nextLink, savingsPlanOrderId, filter, grainParameter);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanOrder", "value", "nextLink", cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanScope_GenerateBenefitUtilizationSummariesReportAsync
+ /// BenefitUtilizationSummaries_ListBySavingsPlanOrder
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
+ ///
+ ///
+ ///
+ /// Savings plan order ID.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetBenefitUtilizationSummariesBySavingsPlanOrder(string savingsPlanOrderId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderRequest(savingsPlanOrderId, filter, grainParameter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanOrderNextPageRequest(nextLink, savingsPlanOrderId, filter, grainParameter);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanOrder", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
+ ///
+ /// -
+ /// Operation Id
+ /// BenefitUtilizationSummaries_ListBySavingsPlanId
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01
///
///
///
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Savings plan order ID.
/// Savings plan ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
/// The cancellation token to use.
/// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public virtual async Task> GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScopeAsync(WaitUntil waitUntil, string savingsPlanOrderId, string savingsPlanId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetBenefitUtilizationSummariesBySavingsPlanIdAsync(string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
Argument.AssertNotNullOrEmpty(savingsPlanId, nameof(savingsPlanId));
- Argument.AssertNotNull(content, nameof(content));
- using var scope = SavingsPlanScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScope");
- scope.Start();
- try
- {
- var response = await SavingsPlanScopeRestClient.GenerateBenefitUtilizationSummariesReportAsyncAsync(savingsPlanOrderId, savingsPlanId, content, cancellationToken).ConfigureAwait(false);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), SavingsPlanScopeClientDiagnostics, Pipeline, SavingsPlanScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportAsyncRequest(savingsPlanOrderId, savingsPlanId, content).Request, response, OperationFinalStateVia.Location);
- if (waitUntil == WaitUntil.Completed)
- await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdRequest(savingsPlanOrderId, savingsPlanId, filter, grainParameter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdNextPageRequest(nextLink, savingsPlanOrderId, savingsPlanId, filter, grainParameter);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanId", "value", "nextLink", cancellationToken);
}
///
- /// Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ /// Lists the savings plan utilization summaries for daily or monthly grain.
///
/// -
/// Request Path
- /// /providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries
///
/// -
/// Operation Id
- /// SavingsPlanScope_GenerateBenefitUtilizationSummariesReportAsync
+ /// BenefitUtilizationSummaries_ListBySavingsPlanId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Savings plan order ID.
/// Savings plan ID.
- /// Async Benefit Utilization Summary report to be created.
+ /// Supports filtering by properties/usageDate.
+ /// Grain.
/// The cancellation token to use.
/// or is an empty string, and was expected to be non-empty.
- /// , or is null.
- public virtual ArmOperation GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScope(WaitUntil waitUntil, string savingsPlanOrderId, string savingsPlanId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
+ /// or is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetBenefitUtilizationSummariesBySavingsPlanId(string savingsPlanOrderId, string savingsPlanId, string filter = null, GrainContent? grainParameter = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
Argument.AssertNotNullOrEmpty(savingsPlanId, nameof(savingsPlanId));
- Argument.AssertNotNull(content, nameof(content));
- using var scope = SavingsPlanScopeClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportAsyncSavingsPlanScope");
- scope.Start();
- try
- {
- var response = SavingsPlanScopeRestClient.GenerateBenefitUtilizationSummariesReportAsync(savingsPlanOrderId, savingsPlanId, content, cancellationToken);
- var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), SavingsPlanScopeClientDiagnostics, Pipeline, SavingsPlanScopeRestClient.CreateGenerateBenefitUtilizationSummariesReportAsyncRequest(savingsPlanOrderId, savingsPlanId, content).Request, response, OperationFinalStateVia.Location);
- if (waitUntil == WaitUntil.Completed)
- operation.WaitForCompletion(cancellationToken);
- return operation;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ HttpMessage FirstPageRequest(int? pageSizeHint) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdRequest(savingsPlanOrderId, savingsPlanId, filter, grainParameter);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BenefitUtilizationSummariesRestClient.CreateListBySavingsPlanIdNextPageRequest(nextLink, savingsPlanOrderId, savingsPlanId, filter, grainParameter);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BenefitUtilizationSummary.DeserializeBenefitUtilizationSummary(e), BenefitUtilizationSummariesClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetBenefitUtilizationSummariesBySavingsPlanId", "value", "nextLink", cancellationToken);
}
///
- /// Lists the Alerts for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Alerts_ListExternal
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
- ///
- /// -
- /// Resource
- ///
+ /// 2025-03-01
///
///
///
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetCostManagementAlertsAsync(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public virtual async Task> GenerateBenefitUtilizationSummariesReportBillingProfileScopeAsync(WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
+ Argument.AssertNotNull(content, nameof(content));
- HttpMessage FirstPageRequest(int? pageSizeHint) => CostManagementAlertAlertsRestClient.CreateListExternalRequest(externalCloudProviderType, externalCloudProviderId);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new CostManagementAlertResource(Client, CostManagementAlertData.DeserializeCostManagementAlertData(e)), CostManagementAlertAlertsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetCostManagementAlerts", "value", null, cancellationToken);
+ using var scope = GenerateBenefitUtilizationSummariesReportClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingProfileScope");
+ scope.Start();
+ try
+ {
+ var response = await GenerateBenefitUtilizationSummariesReportRestClient.GenerateByBillingProfileAsync(billingAccountId, billingProfileId, content, cancellationToken).ConfigureAwait(false);
+ var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), GenerateBenefitUtilizationSummariesReportClientDiagnostics, Pipeline, GenerateBenefitUtilizationSummariesReportRestClient.CreateGenerateByBillingProfileRequest(billingAccountId, billingProfileId, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Lists the Alerts for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account and billing profile.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Alerts_ListExternal
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingProfile
///
/// -
/// Default Api Version
- /// 2023-03-01
- ///
- /// -
- /// Resource
- ///
+ /// 2025-03-01
///
///
///
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Billing Profile ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetCostManagementAlerts(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, CancellationToken cancellationToken = default)
+ /// or is an empty string, and was expected to be non-empty.
+ /// , or is null.
+ public virtual ArmOperation GenerateBenefitUtilizationSummariesReportBillingProfileScope(WaitUntil waitUntil, string billingAccountId, string billingProfileId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNullOrEmpty(billingProfileId, nameof(billingProfileId));
+ Argument.AssertNotNull(content, nameof(content));
- HttpMessage FirstPageRequest(int? pageSizeHint) => CostManagementAlertAlertsRestClient.CreateListExternalRequest(externalCloudProviderType, externalCloudProviderId);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new CostManagementAlertResource(Client, CostManagementAlertData.DeserializeCostManagementAlertData(e)), CostManagementAlertAlertsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.GetCostManagementAlerts", "value", null, cancellationToken);
+ using var scope = GenerateBenefitUtilizationSummariesReportClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingProfileScope");
+ scope.Start();
+ try
+ {
+ var response = GenerateBenefitUtilizationSummariesReportRestClient.GenerateByBillingProfile(billingAccountId, billingProfileId, content, cancellationToken);
+ var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), GenerateBenefitUtilizationSummariesReportClientDiagnostics, Pipeline, GenerateBenefitUtilizationSummariesReportRestClient.CreateGenerateByBillingProfileRequest(billingAccountId, billingProfileId, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Lists the forecast charges for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Forecast_ExternalCloudProviderUsage
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual async Task> ExternalCloudProviderUsageForecastAsync(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> GenerateBenefitUtilizationSummariesReportBillingAccountScopeAsync(WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
- Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNull(content, nameof(content));
- using var scope = ForecastClientDiagnostics.CreateScope("MockableCostManagementTenantResource.ExternalCloudProviderUsageForecast");
+ using var scope = GenerateBenefitUtilizationSummariesReportClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingAccountScope");
scope.Start();
try
{
- var response = await ForecastRestClient.ExternalCloudProviderUsageAsync(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken).ConfigureAwait(false);
- return response;
+ var response = await GenerateBenefitUtilizationSummariesReportRestClient.GenerateByBillingAccountAsync(billingAccountId, content, cancellationToken).ConfigureAwait(false);
+ var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), GenerateBenefitUtilizationSummariesReportClientDiagnostics, Pipeline, GenerateBenefitUtilizationSummariesReportRestClient.CreateGenerateByBillingAccountRequest(billingAccountId, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
}
catch (Exception e)
{
@@ -1170,40 +1388,42 @@ public virtual async Task> ExternalCloudProviderUsageFo
}
///
- /// Lists the forecast charges for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports only enrollment accounts.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/forecast
+ /// /providers/microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Forecast_ExternalCloudProviderUsage
+ /// GenerateBenefitUtilizationSummariesReport_GenerateByBillingAccount
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- /// This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- /// Parameters supplied to the CreateOrUpdate Forecast Config operation.
- /// May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// BillingAccount ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// or is null.
- public virtual Response ExternalCloudProviderUsageForecast(ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, ForecastDefinition forecastDefinition, string filter = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation GenerateBenefitUtilizationSummariesReportBillingAccountScope(WaitUntil waitUntil, string billingAccountId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(externalCloudProviderId, nameof(externalCloudProviderId));
- Argument.AssertNotNull(forecastDefinition, nameof(forecastDefinition));
+ Argument.AssertNotNullOrEmpty(billingAccountId, nameof(billingAccountId));
+ Argument.AssertNotNull(content, nameof(content));
- using var scope = ForecastClientDiagnostics.CreateScope("MockableCostManagementTenantResource.ExternalCloudProviderUsageForecast");
+ using var scope = GenerateBenefitUtilizationSummariesReportClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportBillingAccountScope");
scope.Start();
try
{
- var response = ForecastRestClient.ExternalCloudProviderUsage(externalCloudProviderType, externalCloudProviderId, forecastDefinition, filter, cancellationToken);
- return response;
+ var response = GenerateBenefitUtilizationSummariesReportRestClient.GenerateByBillingAccount(billingAccountId, content, cancellationToken);
+ var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), GenerateBenefitUtilizationSummariesReportClientDiagnostics, Pipeline, GenerateBenefitUtilizationSummariesReportRestClient.CreateGenerateByBillingAccountRequest(billingAccountId, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
}
catch (Exception e)
{
@@ -1213,97 +1433,134 @@ public virtual Response ExternalCloudProviderUsageForecast(Exter
}
///
- /// Lists the dimensions by the external cloud provider type.
+ /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Dimensions_ByExternalCloudProviderType
+ /// GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanOrderId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Savings plan order ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is null.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable ByExternalCloudProviderTypeDimensionsAsync(TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScopeAsync(WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(options, nameof(options));
+ Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
+ Argument.AssertNotNull(content, nameof(content));
- HttpMessage FirstPageRequest(int? pageSizeHint) => DimensionsRestClient.CreateByExternalCloudProviderTypeRequest(options.ExternalCloudProviderType, options.ExternalCloudProviderId, options.Filter, options.Expand, options.Skiptoken, options.Top);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.ByExternalCloudProviderTypeDimensions", "value", null, cancellationToken);
+ using var scope = GenerateBenefitUtilizationSummariesReportClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope");
+ scope.Start();
+ try
+ {
+ var response = await GenerateBenefitUtilizationSummariesReportRestClient.GenerateBySavingsPlanOrderIdAsync(savingsPlanOrderId, content, cancellationToken).ConfigureAwait(false);
+ var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), GenerateBenefitUtilizationSummariesReportClientDiagnostics, Pipeline, GenerateBenefitUtilizationSummariesReportRestClient.CreateGenerateBySavingsPlanOrderIdRequest(savingsPlanOrderId, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Lists the dimensions by the external cloud provider type.
+ /// Triggers generation of a benefit utilization summaries report for the provided savings plan order.
///
/// -
/// Request Path
- /// /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/dimensions
+ /// /providers/microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport
///
/// -
/// Operation Id
- /// Dimensions_ByExternalCloudProviderType
+ /// GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanOrderId
///
/// -
/// Default Api Version
- /// 2023-03-01
+ /// 2025-03-01
///
///
///
- /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Savings plan order ID.
+ /// Async Benefit Utilization Summary report to be created.
/// The cancellation token to use.
- /// is null.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable ByExternalCloudProviderTypeDimensions(TenantResourceByExternalCloudProviderTypeDimensionsOptions options, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope(WaitUntil waitUntil, string savingsPlanOrderId, BenefitUtilizationSummariesContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(options, nameof(options));
+ Argument.AssertNotNullOrEmpty(savingsPlanOrderId, nameof(savingsPlanOrderId));
+ Argument.AssertNotNull(content, nameof(content));
- HttpMessage FirstPageRequest(int? pageSizeHint) => DimensionsRestClient.CreateByExternalCloudProviderTypeRequest(options.ExternalCloudProviderType, options.ExternalCloudProviderId, options.Filter, options.Expand, options.Skiptoken, options.Top);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => CostManagementDimension.DeserializeCostManagementDimension(e), DimensionsClientDiagnostics, Pipeline, "MockableCostManagementTenantResource.ByExternalCloudProviderTypeDimensions", "value", null, cancellationToken);
+ using var scope = GenerateBenefitUtilizationSummariesReportClientDiagnostics.CreateScope("MockableCostManagementTenantResource.GenerateBenefitUtilizationSummariesReportSavingsPlanOrderScope");
+ scope.Start();
+ try
+ {
+ var response = GenerateBenefitUtilizationSummariesReportRestClient.GenerateBySavingsPlanOrderId(savingsPlanOrderId, content, cancellationToken);
+ var operation = new CostManagementArmOperation(new BenefitUtilizationSummariesOperationStatusOperationSource(), GenerateBenefitUtilizationSummariesReportClientDiagnostics, Pipeline, GenerateBenefitUtilizationSummariesReportRestClient.CreateGenerateBySavingsPlanOrderIdRequest(savingsPlanOrderId, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
}
///
- /// Query the usage data for external cloud provider type defined.
+ /// Triggers generation of a benefit utilization summaries report for the provided savings plan.
///
///