MockableCostManagementArmClient.CreateOperationAsync Method

Definition

Overloads

Name Description
CreateOperationAsync(WaitUntil, ResourceIdentifier, GenerateDetailedCostReportContent, CancellationToken)

Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored.

  • Request Path. : /{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport.
  • Operation Id. : GenerateDetailedCostReportOperationGroup_CreateOperation.
  • Default Api Version. : 2025-03-01.
CreateOperationAsync(WaitUntil, ResourceIdentifier, GenerateCostDetailsReportContent, CancellationToken)

This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the endpoint to poll to get the result of the report generation. The 'Retry-After' provides the duration to wait before polling for the generated report. A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields

  • Request Path. : /{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport.
  • Operation Id. : GenerateCostDetailsReportOperationGroup_CreateOperation.
  • Default Api Version. : 2025-03-01.

CreateOperationAsync(WaitUntil, ResourceIdentifier, GenerateDetailedCostReportContent, CancellationToken)

Source:
MockableCostManagementArmClient.cs

Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored.

  • Request Path. : /{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport.
  • Operation Id. : GenerateDetailedCostReportOperationGroup_CreateOperation.
  • Default Api Version. : 2025-03-01.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CostManagement.GenerateDetailedCostReportOperationResultResource>> CreateOperationAsync(Azure.WaitUntil waitUntil, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.CostManagement.Models.GenerateDetailedCostReportContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOperationAsync : Azure.WaitUntil * Azure.Core.ResourceIdentifier * Azure.ResourceManager.CostManagement.Models.GenerateDetailedCostReportContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CostManagement.GenerateDetailedCostReportOperationResultResource>>
override this.CreateOperationAsync : Azure.WaitUntil * Azure.Core.ResourceIdentifier * Azure.ResourceManager.CostManagement.Models.GenerateDetailedCostReportContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CostManagement.GenerateDetailedCostReportOperationResultResource>>
Public Overridable Function CreateOperationAsync (waitUntil As WaitUntil, scope As ResourceIdentifier, content As GenerateDetailedCostReportContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of GenerateDetailedCostReportOperationResultResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

scope
ResourceIdentifier

The scope that the resource will apply against.

content
GenerateDetailedCostReportContent

Parameters supplied to the Create detailed cost report operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

scope or content is null.

Applies to

CreateOperationAsync(WaitUntil, ResourceIdentifier, GenerateCostDetailsReportContent, CancellationToken)

Source:
MockableCostManagementArmClient.cs

This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the endpoint to poll to get the result of the report generation. The 'Retry-After' provides the duration to wait before polling for the generated report. A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields

  • Request Path. : /{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport.
  • Operation Id. : GenerateCostDetailsReportOperationGroup_CreateOperation.
  • Default Api Version. : 2025-03-01.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CostManagement.Models.CostDetailsOperationResults>> CreateOperationAsync(Azure.WaitUntil waitUntil, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.CostManagement.Models.GenerateCostDetailsReportContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOperationAsync : Azure.WaitUntil * Azure.Core.ResourceIdentifier * Azure.ResourceManager.CostManagement.Models.GenerateCostDetailsReportContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CostManagement.Models.CostDetailsOperationResults>>
override this.CreateOperationAsync : Azure.WaitUntil * Azure.Core.ResourceIdentifier * Azure.ResourceManager.CostManagement.Models.GenerateCostDetailsReportContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CostManagement.Models.CostDetailsOperationResults>>
Public Overridable Function CreateOperationAsync (waitUntil As WaitUntil, scope As ResourceIdentifier, content As GenerateCostDetailsReportContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CostDetailsOperationResults))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

scope
ResourceIdentifier

The scope that the resource will apply against.

content
GenerateCostDetailsReportContent

Parameters supplied to the Create cost details operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

scope or content is null.

Applies to