-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add test cases and examples of CostManagement. #12325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test cases and examples of CostManagement. #12325
Conversation
|
Can one of the admins verify this patch? |
…ucas/CostManagement
| ### Example 4: Get a cost management export by pipeline | ||
| ```powershell | ||
| PS C:\> @{Id = 'subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport' } | Get-AzCostManagementExport | ||
|
|
||
| Name Type | ||
| ---- ---- | ||
| TestExport Microsoft.CostManagement/exports | ||
| ``` | ||
|
|
||
| This command gets a cost management export by pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I think this example is not necessary for this cmdlet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| ### Example 2: Get execution history of cost management export by object | ||
| ```powershell | ||
| PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName "ps-customcolum-t" | ||
| PS C:\> Get-AzCostManagementExportExecutionHistory -InputObject $export | ||
|
|
||
| Name Type | ||
| ---- ---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better that change this example as by Piping:
PS C:\> Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName "ps-customcolum-t" | Get-AzCostManagementExportExecutionHistoryor
PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName "ps-customcolum-t"
PS C:\> $export | Get-AzCostManagementExportExecutionHistoryAnd please update this exmaple result after pulling the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| ### -Scope | ||
| The scope associated with query and export operations. | ||
| This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not accurate. Scope is not start with /. We need to change the description of all Scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be generated automatically. I shouldn't be able to change. isn't it ?
* Init for CostManagement * save * Fix the issues of url * Fix format table of QueryRusult * Fix the issue of new resource * Fix the issue of format table of Get-AzCostmanagementExportExecuteHistory * Add test cases and examples of CostManagement. (#12325) * Add test cases and example of CostManagement. * Modified test cases and example of CostManagement. * Fix the issue of format table of Get-AzCostmanagementExportExecuteHistory * update readme * Update api-version * Update api-version * Add generate code and tests for costmanagement * update some json files * Improve code quality * Add Examples for cmdlets * Update the commit id * Update Invoke-AzCostManagementQuery.ps1 Co-authored-by: wyunchi-ms <[email protected]> Co-authored-by: wyunchi-ms <[email protected]> Co-authored-by: LucasYao93 <[email protected]> Co-authored-by: Yunchi Wang <[email protected]>
Description
Add test cases and examples of CostManagement.