From 9ba235544e8ea5ab8bc63cfbdd4de88f986da403 Mon Sep 17 00:00:00 2001 From: LucasYao93 <53558334+LucasYao93@users.noreply.github.com> Date: Sun, 5 Jul 2020 18:01:12 +0800 Subject: [PATCH 1/2] Add test cases and example of CostManagement. --- src/CostManagement/docs/Az.Cost.md | 49 ++ .../docs/Get-AzCostManagementExport.md | 175 +++++++ ...-AzCostManagementExportExecutionHistory.md | 147 ++++++ .../Invoke-AzCostManagementExecuteExport.md | 189 +++++++ .../docs/Invoke-AzCostManagementUsageQuery.md | 354 +++++++++++++ .../docs/New-AzCostManagementExport.md | 449 +++++++++++++++++ .../New-AzCostManagementQueryColumnObject.md | 81 +++ ...nagementQueryComparisonExpressionObject.md | 97 ++++ .../New-AzCostManagementQueryFilterObject.md | 183 +++++++ .../docs/Remove-AzCostManagementExport.md | 189 +++++++ .../docs/Update-AzCostManagementExport.md | 470 ++++++++++++++++++ src/CostManagement/docs/readme.md | 11 + .../examples/Get-AzCostManagementExport.md | 45 ++ ...-AzCostManagementExportExecutionHistory.md | 21 + .../Invoke-AzCostManagementExecuteExport.md | 17 + .../Invoke-AzCostManagementUsageQuery.md | 12 + .../examples/New-AzCostManagementExport.md | 37 ++ .../New-AzCostManagementQueryColumnObject.md | 12 + ...nagementQueryComparisonExpressionObject.md | 11 + .../New-AzCostManagementQueryFilterObject.md | 15 + .../examples/Remove-AzCostManagementExport.md | 17 + .../examples/Update-AzCostManagementExport.md | 18 + .../test/Az.Cost-TestResults.xml | 110 ++++ .../Get-AzCostManagementExport.Recording.json | 166 +++++++ .../test/Get-AzCostManagementExport.Tests.ps1 | 30 ++ ...ementExportExecutionHistory.Recording.json | 43 ++ ...ManagementExportExecutionHistory.Tests.ps1 | 25 + ...CostManagementExecuteExport.Recording.json | 123 +++++ ...ke-AzCostManagementExecuteExport.Tests.ps1 | 25 + ...nvoke-AzCostManagementUsageQuery.Tests.ps1 | 19 + .../New-AzCostManagementExport.Recording.json | 150 ++++++ .../test/New-AzCostManagementExport.Tests.ps1 | 100 ++++ ...zCostManagementQueryColumnObject.Tests.ps1 | 18 + ...tQueryComparisonExpressionObject.Tests.ps1 | 20 + ...zCostManagementQueryFilterObject.Tests.ps1 | 26 + ...move-AzCostManagementExport.Recording.json | 205 ++++++++ .../Remove-AzCostManagementExport.Tests.ps1 | 27 + .../Update-AzCostManagementExport.Tests.ps1 | 29 ++ .../storage-account/parameters.json | 7 + .../storage-account/template.json | 96 ++++ src/CostManagement/test/env.json | 14 + src/CostManagement/test/loadEnv.ps1 | 28 ++ src/CostManagement/test/readme.md | 17 + src/CostManagement/test/test-script.ps1 | 91 ++++ src/CostManagement/test/utils.ps1 | 84 ++++ 45 files changed, 4052 insertions(+) create mode 100644 src/CostManagement/docs/Az.Cost.md create mode 100644 src/CostManagement/docs/Get-AzCostManagementExport.md create mode 100644 src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md create mode 100644 src/CostManagement/docs/Invoke-AzCostManagementExecuteExport.md create mode 100644 src/CostManagement/docs/Invoke-AzCostManagementUsageQuery.md create mode 100644 src/CostManagement/docs/New-AzCostManagementExport.md create mode 100644 src/CostManagement/docs/New-AzCostManagementQueryColumnObject.md create mode 100644 src/CostManagement/docs/New-AzCostManagementQueryComparisonExpressionObject.md create mode 100644 src/CostManagement/docs/New-AzCostManagementQueryFilterObject.md create mode 100644 src/CostManagement/docs/Remove-AzCostManagementExport.md create mode 100644 src/CostManagement/docs/Update-AzCostManagementExport.md create mode 100644 src/CostManagement/docs/readme.md create mode 100644 src/CostManagement/examples/Get-AzCostManagementExport.md create mode 100644 src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md create mode 100644 src/CostManagement/examples/Invoke-AzCostManagementExecuteExport.md create mode 100644 src/CostManagement/examples/Invoke-AzCostManagementUsageQuery.md create mode 100644 src/CostManagement/examples/New-AzCostManagementExport.md create mode 100644 src/CostManagement/examples/New-AzCostManagementQueryColumnObject.md create mode 100644 src/CostManagement/examples/New-AzCostManagementQueryComparisonExpressionObject.md create mode 100644 src/CostManagement/examples/New-AzCostManagementQueryFilterObject.md create mode 100644 src/CostManagement/examples/Remove-AzCostManagementExport.md create mode 100644 src/CostManagement/examples/Update-AzCostManagementExport.md create mode 100644 src/CostManagement/test/Az.Cost-TestResults.xml create mode 100644 src/CostManagement/test/Get-AzCostManagementExport.Recording.json create mode 100644 src/CostManagement/test/Get-AzCostManagementExport.Tests.ps1 create mode 100644 src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json create mode 100644 src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 create mode 100644 src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json create mode 100644 src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 create mode 100644 src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 create mode 100644 src/CostManagement/test/New-AzCostManagementExport.Recording.json create mode 100644 src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 create mode 100644 src/CostManagement/test/New-AzCostManagementQueryColumnObject.Tests.ps1 create mode 100644 src/CostManagement/test/New-AzCostManagementQueryComparisonExpressionObject.Tests.ps1 create mode 100644 src/CostManagement/test/New-AzCostManagementQueryFilterObject.Tests.ps1 create mode 100644 src/CostManagement/test/Remove-AzCostManagementExport.Recording.json create mode 100644 src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 create mode 100644 src/CostManagement/test/Update-AzCostManagementExport.Tests.ps1 create mode 100644 src/CostManagement/test/deployment-templates/storage-account/parameters.json create mode 100644 src/CostManagement/test/deployment-templates/storage-account/template.json create mode 100644 src/CostManagement/test/env.json create mode 100644 src/CostManagement/test/loadEnv.ps1 create mode 100644 src/CostManagement/test/readme.md create mode 100644 src/CostManagement/test/test-script.ps1 create mode 100644 src/CostManagement/test/utils.ps1 diff --git a/src/CostManagement/docs/Az.Cost.md b/src/CostManagement/docs/Az.Cost.md new file mode 100644 index 000000000000..5b86051ab1b9 --- /dev/null +++ b/src/CostManagement/docs/Az.Cost.md @@ -0,0 +1,49 @@ +--- +Module Name: Az.Cost +Module Guid: e68ffeab-c2c5-4869-9306-c48c496e0cfd +Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.cost +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.Cost Module +## Description +Microsoft Azure PowerShell: Cost cmdlets + +## Az.Cost Cmdlets +### [Get-AzCostManagementExport](Get-AzCostManagementExport.md) +The operation to get the export for the defined scope by export name. + +### [Get-AzCostManagementExportExecutionHistory](Get-AzCostManagementExportExecutionHistory.md) +The operation to get the execution history of an export for the defined scope by export name. + +### [Invoke-AzCostManagementExecuteExport](Invoke-AzCostManagementExecuteExport.md) +The operation to execute a export. + +### [Invoke-AzCostManagementUsageQuery](Invoke-AzCostManagementUsageQuery.md) +Query the usage data for scope defined. + +### [New-AzCostManagementExport](New-AzCostManagementExport.md) +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +### [New-AzCostManagementQueryColumnObject](New-AzCostManagementQueryColumnObject.md) +Create a in-memory object for QueryColumn + +### [New-AzCostManagementQueryComparisonExpressionObject](New-AzCostManagementQueryComparisonExpressionObject.md) +Create a in-memory object for QueryComparisonExpression + +### [New-AzCostManagementQueryFilterObject](New-AzCostManagementQueryFilterObject.md) +Create a in-memory object for QueryFilter + +### [Remove-AzCostManagementExport](Remove-AzCostManagementExport.md) +The operation to delete a export. + +### [Update-AzCostManagementExport](Update-AzCostManagementExport.md) +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + diff --git a/src/CostManagement/docs/Get-AzCostManagementExport.md b/src/CostManagement/docs/Get-AzCostManagementExport.md new file mode 100644 index 000000000000..19f373500df9 --- /dev/null +++ b/src/CostManagement/docs/Get-AzCostManagementExport.md @@ -0,0 +1,175 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.cost/get-azcostmanagementexport +schema: 2.0.0 +--- + +# Get-AzCostManagementExport + +## SYNOPSIS +The operation to get the export for the defined scope by export name. + +## SYNTAX + +### List (Default) +``` +Get-AzCostManagementExport -Scope [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzCostManagementExport -Name -Scope [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzCostManagementExport -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +The operation to get the export for the defined scope by export name. + +## EXAMPLES + +### Example 1: Get all cost management exports under a subscription +```powershell +PS C:\> Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" + +Name Type +---- ---- +TestExport Microsoft.CostManagement/exports +TestExport1 Microsoft.CostManagement/exports +``` + +this command gets all cost management exports under a subscription. + +### Example 2: Get a cost management export by name +```powershell +PS C:\> Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name 'TestExport' + +Name Type +---- ---- +TestExport Microsoft.CostManagement/exports +``` + +This command gets a cost management export by name. + +### Example 3: Get a cost management export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name 'TestExport' +PS C:\> Get-AzCostManagementExport -InputObject $export + +Name Type +---- ---- +TestExport Microsoft.CostManagement/exports +``` + +This command gets a cost management export by object. + +### 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. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IExport + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AlertId ]`: Alert ID + - `[ExportName ]`: Export Name. + - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. + - `[Id ]`: Resource identity path + - `[Scope ]`: The scope associated with view operations. 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 External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. + - `[ViewName ]`: View name + +## RELATED LINKS + diff --git a/src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md b/src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md new file mode 100644 index 000000000000..1cbf2291c989 --- /dev/null +++ b/src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md @@ -0,0 +1,147 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.cost/get-azcostmanagementexportexecutionhistory +schema: 2.0.0 +--- + +# Get-AzCostManagementExportExecutionHistory + +## SYNOPSIS +The operation to get the execution history of an export for the defined scope by export name. + +## SYNTAX + +### Get (Default) +``` +Get-AzCostManagementExportExecutionHistory -ExportName -Scope [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzCostManagementExportExecutionHistory -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +The operation to get the execution history of an export for the defined scope by export name. + +## EXAMPLES + +### Example 1: Get execution history of cost management export +```powershell +PS C:\> Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName "ps-customcolum-t" + +Name Type +---- ---- +``` + +This command gets execution history of cost management export. + +### 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 +---- ---- +``` + +This command gets execution history of cost management export by object. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExportName +Export Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IExportExecution + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AlertId ]`: Alert ID + - `[ExportName ]`: Export Name. + - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. + - `[Id ]`: Resource identity path + - `[Scope ]`: The scope associated with view operations. 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 External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. + - `[ViewName ]`: View name + +## RELATED LINKS + diff --git a/src/CostManagement/docs/Invoke-AzCostManagementExecuteExport.md b/src/CostManagement/docs/Invoke-AzCostManagementExecuteExport.md new file mode 100644 index 000000000000..4292ec7cd0af --- /dev/null +++ b/src/CostManagement/docs/Invoke-AzCostManagementExecuteExport.md @@ -0,0 +1,189 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.cost/invoke-azcostmanagementexecuteexport +schema: 2.0.0 +--- + +# Invoke-AzCostManagementExecuteExport + +## SYNOPSIS +The operation to execute a export. + +## SYNTAX + +### Execute (Default) +``` +Invoke-AzCostManagementExecuteExport -ExportName -Scope [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### ExecuteViaIdentity +``` +Invoke-AzCostManagementExecuteExport -InputObject [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to execute a export. + +## EXAMPLES + +### Example 1: Invoke a cost mangement export by name +```powershell +PS C:\> Invoke-AzCostManagementExecuteExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName 'TestExport' + +``` + +This command invokes a cost mangement export by name. + +### Example 2: Invoke a cost mangement export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName 'TestExport' +PS C:\> Invoke-AzCostManagementExecuteExport -InputObject $export + +``` + +This command invokes a cost mangement export by object. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExportName +Export Name. + +```yaml +Type: System.String +Parameter Sets: Execute +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity +Parameter Sets: ExecuteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.String +Parameter Sets: Execute +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AlertId ]`: Alert ID + - `[ExportName ]`: Export Name. + - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. + - `[Id ]`: Resource identity path + - `[Scope ]`: The scope associated with view operations. 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 External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. + - `[ViewName ]`: View name + +## RELATED LINKS + diff --git a/src/CostManagement/docs/Invoke-AzCostManagementUsageQuery.md b/src/CostManagement/docs/Invoke-AzCostManagementUsageQuery.md new file mode 100644 index 000000000000..5d5d41a614d2 --- /dev/null +++ b/src/CostManagement/docs/Invoke-AzCostManagementUsageQuery.md @@ -0,0 +1,354 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.cost/invoke-azcostmanagementusagequery +schema: 2.0.0 +--- + +# Invoke-AzCostManagementUsageQuery + +## SYNOPSIS +Query the usage data for scope defined. + +## SYNTAX + +### UsageExpanded (Default) +``` +Invoke-AzCostManagementUsageQuery -Scope -Timeframe -Type + [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] + [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UsageExpanded1 +``` +Invoke-AzCostManagementUsageQuery -ExternalCloudProviderId + -ExternalCloudProviderType -Timeframe -Type + [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] + [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UsageViaIdentityExpanded +``` +Invoke-AzCostManagementUsageQuery -InputObject -Timeframe -Type + [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] + [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UsageViaIdentityExpanded1 +``` +Invoke-AzCostManagementUsageQuery -InputObject -Timeframe -Type + [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] + [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Query the usage data for scope defined. + +## EXAMPLES + +### Example 1: Invoke query usage of the cost management export +```powershell +PS C:\> Invoke-AzCostManagementUsageQuery -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Timeframe MonthToDate -Type Usage -DatasetGranularity 'daily' + +NextLink Column Row +-------- ------ --- + {UsageDate, Currency} {20200701 USD, 20200702 USD, 20200703 USD, 20200704 USD…} +``` + +this command invokes query usage of the cost management export. + +## PARAMETERS + +### -ConfigurationColumn +Array of column names to be included in the query. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetAggregation +Dictionary of aggregation expression to use in the query. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetFilter +Has filter expression to use in the query. +To construct, see NOTES section for DATASETFILTER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryFilter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGranularity +The granularity of rows in the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.GranularityType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGrouping +Array of group by expression to use in the query. +To construct, see NOTES section for DATASETGROUPING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryGrouping[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExternalCloudProviderId +This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + +```yaml +Type: System.String +Parameter Sets: UsageExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExternalCloudProviderType +The external cloud provider type associated with dimension/query operations. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.ExternalCloudProviderType +Parameter Sets: UsageExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity +Parameter Sets: UsageViaIdentityExpanded, UsageViaIdentityExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Scope +The scope associated with query and export operations. + +```yaml +Type: System.String +Parameter Sets: UsageExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Timeframe +The time frame for pulling data for the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.TimeframeType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodFrom +The start date to pull data from. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodTo +The end date to pull data to. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The type of the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.ExportType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryResult + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +DATASETFILTER : Has filter expression to use in the query. + - `[And ]`: The logical "AND" expression. Must have at least 2 items. + - `[Dimension ]`: Has comparison expression for a dimension + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + - `[Not ]`: The logical "NOT" expression. + - `[Or ]`: The logical "OR" expression. Must have at least 2 items. + - `[Tag ]`: Has comparison expression for a tag + +DATASETGROUPING : Array of group by expression to use in the query. + - `Name `: The name of the column to group. + - `Type `: Has type of the column to group. + +INPUTOBJECT : Identity Parameter + - `[AlertId ]`: Alert ID + - `[ExportName ]`: Export Name. + - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. + - `[Id ]`: Resource identity path + - `[Scope ]`: The scope associated with view operations. 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 External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. + - `[ViewName ]`: View name + +## RELATED LINKS + diff --git a/src/CostManagement/docs/New-AzCostManagementExport.md b/src/CostManagement/docs/New-AzCostManagementExport.md new file mode 100644 index 000000000000..bd0157d8f473 --- /dev/null +++ b/src/CostManagement/docs/New-AzCostManagementExport.md @@ -0,0 +1,449 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.cost/new-azcostmanagementexport +schema: 2.0.0 +--- + +# New-AzCostManagementExport + +## SYNOPSIS +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## SYNTAX + +``` +New-AzCostManagementExport -Name -Scope [-ConfigurationColumn ] + [-DatasetAggregation ] [-DatasetFilter ] [-DatasetGranularity ] + [-DatasetGrouping ] [-DefinitionTimeframe ] [-DefinitionType ] + [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] + [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] + [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## EXAMPLES + +### Example 1: Create a cost management export for a subscription +```powershell +PS C:\> $storageAccount = Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" +PS C:\> New-AzCostManagementExport -Scope "subscriptions/9e223dbe-3388-4e19-88eb-0975f02ac87f" -Name costexport-test -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom (Get-Date).ToString() -RecurrencePeriodTo (Get-Date).AddDays(20).ToString() -Format "Csv" -DestinationResourceId $storageAccount.Id -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" + +Name Type +---- ---- +costexport-test Microsoft.CostManagement/exports +``` + +This command creates a cost management export for the resource group for a subscription. + +### Example 2: Create a cost management export with custom column for the resource group +```powershell +PS C:\> $storageAccount = Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" +PS C:\> New-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azps-rg-t" -Name "ps-customcolum-t" -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" -RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" -DestinationResourceId $storageAccount.Id -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" -ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') + +Name Type +---- ---- +ps-customcolum-t Microsoft.CostManagement/exports +``` + +This command creates a cost management export with custom column for the resource group. + +### Example 3: Create a cost management export with custom column for the resource group +```powershell +PS C:\> $storageAccount = Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" +PS C:\> New-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azps-rg-t" -Name "ps-customcolum-t" -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" -RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" -DestinationResourceId $storageAccount.Id -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" -ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') + +Name Type +---- ---- +ps-customcolum-t Microsoft.CostManagement/exports +``` + +This command creates a cost management export with custom column for the resource group. + +## PARAMETERS + +### -ConfigurationColumn +Array of column names to be included in the query. +Any valid query column name is allowed. +If not provided, then query includes all columns. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetAggregation +Dictionary of aggregation expression to use in the query. +The key of each item in the dictionary is the alias for the aggregated column. +Query can have up to 2 aggregation clauses. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetFilter +Has filter expression to use in the query. +To construct, see NOTES section for DATASETFILTER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryFilter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGranularity +The granularity of rows in the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.GranularityType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGrouping +Array of group by expression to use in the query. +Query can have up to 2 group by clauses. +To construct, see NOTES section for DATASETGROUPING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryGrouping[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionTimeframe +The time frame for pulling data for the query. +If custom, then a specific time period must be provided. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.TimeframeType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionType +The type of the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.ExportType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationContainer +The name of the container where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationResourceId +The resource id of the storage account where exports will be delivered. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationRootFolderPath +The name of the directory where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Format +The format of the export being delivered. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.FormatType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodFrom +The start date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodTo +The end date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleRecurrence +The schedule recurrence. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.RecurrenceType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleStatus +The status of the schedule. +Whether active or not. +If inactive, the export's scheduled execution is paused. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.StatusType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodFrom +The start date to pull data from. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodTo +The end date to pull data to. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IExport + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +DATASETFILTER : Has filter expression to use in the query. + - `[And ]`: The logical "AND" expression. Must have at least 2 items. + - `[Dimension ]`: Has comparison expression for a dimension + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + - `[Not ]`: The logical "NOT" expression. + - `[Or ]`: The logical "OR" expression. Must have at least 2 items. + - `[Tag ]`: Has comparison expression for a tag + +DATASETGROUPING : Array of group by expression to use in the query. Query can have up to 2 group by clauses. + - `Name `: The name of the column to group. + - `Type `: Has type of the column to group. + +## RELATED LINKS + diff --git a/src/CostManagement/docs/New-AzCostManagementQueryColumnObject.md b/src/CostManagement/docs/New-AzCostManagementQueryColumnObject.md new file mode 100644 index 000000000000..8e945d1febd0 --- /dev/null +++ b/src/CostManagement/docs/New-AzCostManagementQueryColumnObject.md @@ -0,0 +1,81 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.CostManagement/new-AzCostManagementQueryColumnObject +schema: 2.0.0 +--- + +# New-AzCostManagementQueryColumnObject + +## SYNOPSIS +Create a in-memory object for QueryColumn + +## SYNTAX + +``` +New-AzCostManagementQueryColumnObject [-Name ] [-Type ] [] +``` + +## DESCRIPTION +Create a in-memory object for QueryColumn + +## EXAMPLES + +### Example 1: Create a column object of query for cost management export +```powershell +PS C:\> New-AzCostManagementQueryColumnObject -Name 'SubscriptionGuid' -Type 'string' + +Name Type +---- ---- +SubscriptionGuid string +``` + +This command creates a column object of query for cost management export. + +## PARAMETERS + +### -Name +The name of column. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The type of column. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryColumn + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/CostManagement/docs/New-AzCostManagementQueryComparisonExpressionObject.md b/src/CostManagement/docs/New-AzCostManagementQueryComparisonExpressionObject.md new file mode 100644 index 000000000000..8c5fdaa4dcaf --- /dev/null +++ b/src/CostManagement/docs/New-AzCostManagementQueryComparisonExpressionObject.md @@ -0,0 +1,97 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.CostManagement/new-AzCostManagementQueryComparisonExpressionObject +schema: 2.0.0 +--- + +# New-AzCostManagementQueryComparisonExpressionObject + +## SYNOPSIS +Create a in-memory object for QueryComparisonExpression + +## SYNTAX + +``` +New-AzCostManagementQueryComparisonExpressionObject -Name -Operator -Value + [] +``` + +## DESCRIPTION +Create a in-memory object for QueryComparisonExpression + +## EXAMPLES + +### Example 1: Create a comparison expression object of query for cost management export +```powershell +PS C:\> New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') + +Name Operator Value +---- -------- ----- +ResourceLocation In {East US, West Europe} +``` + +This command creates a comparison expression object of query for cost management export. + +## PARAMETERS + +### -Name +The name of the column to use in comparison. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Operator +The operator to use for comparison. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.OperatorType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Value +Array of values to use for comparison. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryComparisonExpression + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/CostManagement/docs/New-AzCostManagementQueryFilterObject.md b/src/CostManagement/docs/New-AzCostManagementQueryFilterObject.md new file mode 100644 index 000000000000..155f6a51c902 --- /dev/null +++ b/src/CostManagement/docs/New-AzCostManagementQueryFilterObject.md @@ -0,0 +1,183 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.CostManagement/new-AzCostManagementQueryFilterObject +schema: 2.0.0 +--- + +# New-AzCostManagementQueryFilterObject + +## SYNOPSIS +Create a in-memory object for QueryFilter + +## SYNTAX + +``` +New-AzCostManagementQueryFilterObject [-And ] [-Dimension ] + [-Not ] [-Or ] [-Tag ] [] +``` + +## DESCRIPTION +Create a in-memory object for QueryFilter + +## EXAMPLES + +### Example 1: Create a filter object of query for cost management export +```powershell +PS C:\> $orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') +PS C:\> $orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Operator In -Value @('UAT', 'Prod') +PS C:\> New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimension $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag)) + +And : +Dimension : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryComparisonExpression +Not : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryFilter +Or : {Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryFilter, Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryFilter} +Tag : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryComparisonExpression +``` + +this command creates a filter object of query for cost management export. + +## PARAMETERS + +### -And +The logical "AND" expression. +Must have at least 2 items. +To construct, see NOTES section for AND properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryFilter[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Dimension +Has comparison expression for a dimension. +To construct, see NOTES section for DIMENSION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryComparisonExpression +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Not +The logical "NOT" expression. +To construct, see NOTES section for NOT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryFilter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Or +The logical "OR" expression. +Must have at least 2 items. +To construct, see NOTES section for OR properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryFilter[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Has comparison expression for a tag. +To construct, see NOTES section for TAG properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryComparisonExpression +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryFilter + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +AND : The logical "AND" expression. Must have at least 2 items. + - `[And ]`: The logical "AND" expression. Must have at least 2 items. + - `[Dimension ]`: Has comparison expression for a dimension + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + - `[Not ]`: The logical "NOT" expression. + - `[Or ]`: The logical "OR" expression. Must have at least 2 items. + - `[Tag ]`: Has comparison expression for a tag + +DIMENSION : Has comparison expression for a dimension. + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + +NOT : The logical "NOT" expression. + - `[And ]`: The logical "AND" expression. Must have at least 2 items. + - `[Dimension ]`: Has comparison expression for a dimension + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + - `[Not ]`: The logical "NOT" expression. + - `[Or ]`: The logical "OR" expression. Must have at least 2 items. + - `[Tag ]`: Has comparison expression for a tag + +OR : The logical "OR" expression. Must have at least 2 items. + - `[And ]`: The logical "AND" expression. Must have at least 2 items. + - `[Dimension ]`: Has comparison expression for a dimension + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + - `[Not ]`: The logical "NOT" expression. + - `[Or ]`: The logical "OR" expression. Must have at least 2 items. + - `[Tag ]`: Has comparison expression for a tag + +TAG : Has comparison expression for a tag. + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + +## RELATED LINKS + diff --git a/src/CostManagement/docs/Remove-AzCostManagementExport.md b/src/CostManagement/docs/Remove-AzCostManagementExport.md new file mode 100644 index 000000000000..4fa7d6859e00 --- /dev/null +++ b/src/CostManagement/docs/Remove-AzCostManagementExport.md @@ -0,0 +1,189 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.cost/remove-azcostmanagementexport +schema: 2.0.0 +--- + +# Remove-AzCostManagementExport + +## SYNOPSIS +The operation to delete a export. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzCostManagementExport -Name -Scope [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzCostManagementExport -InputObject [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +The operation to delete a export. + +## EXAMPLES + +### Example 1: Remove a cost management export by name +```powershell +PS C:\> Remove-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name AzureExport-T01 + +``` + +This command removes a cost management export by name + +### Example 2: Remove a cost management export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name AzureExport-T02 +PS C:\> Remove-AzCostManagementExport -InputObject $export + +``` + +This command removes a cost management export by object + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +INPUTOBJECT : Identity Parameter + - `[AlertId ]`: Alert ID + - `[ExportName ]`: Export Name. + - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. + - `[Id ]`: Resource identity path + - `[Scope ]`: The scope associated with view operations. 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 External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. + - `[ViewName ]`: View name + +## RELATED LINKS + diff --git a/src/CostManagement/docs/Update-AzCostManagementExport.md b/src/CostManagement/docs/Update-AzCostManagementExport.md new file mode 100644 index 000000000000..a070d66d45c3 --- /dev/null +++ b/src/CostManagement/docs/Update-AzCostManagementExport.md @@ -0,0 +1,470 @@ +--- +external help file: +Module Name: Az.Cost +online version: https://docs.microsoft.com/en-us/powershell/module/az.cost/update-azcostmanagementexport +schema: 2.0.0 +--- + +# Update-AzCostManagementExport + +## SYNOPSIS +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzCostManagementExport -Name -Scope [-ConfigurationColumn ] + [-DatasetAggregation ] [-DatasetFilter ] [-DatasetGranularity ] + [-DatasetGrouping ] [-DefinitionTimeframe ] [-DefinitionType ] + [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] + [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] + [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzCostManagementExport -InputObject [-ConfigurationColumn ] + [-DatasetAggregation ] [-DatasetFilter ] [-DatasetGranularity ] + [-DatasetGrouping ] [-DefinitionTimeframe ] [-DefinitionType ] + [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] + [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] + [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## EXAMPLES + +### Example 1: Update a cost management export by name +```powershell +PS C:\> Update-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name exportinfo-ps-t -RecurrencePeriodFrom (Get-Date).ToString() + +``` + +This command updates a cost management export by name. + +### Example 2: Update a cost management export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name exportinfo-ps-t +PS C:\> Update-AzCostManagementExport -InputObject $export -RecurrencePeriodFrom (Get-Date).ToString() + +{{ Add output here }} +``` + +This command updates a cost management export by object. + +## PARAMETERS + +### -ConfigurationColumn +Array of column names to be included in the query. +Any valid query column name is allowed. +If not provided, then query includes all columns. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetAggregation +Dictionary of aggregation expression to use in the query. +The key of each item in the dictionary is the alias for the aggregated column. +Query can have up to 2 aggregation clauses. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetFilter +Has filter expression to use in the query. +To construct, see NOTES section for DATASETFILTER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryFilter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGranularity +The granularity of rows in the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.GranularityType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGrouping +Array of group by expression to use in the query. +Query can have up to 2 group by clauses. +To construct, see NOTES section for DATASETGROUPING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IQueryGrouping[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionTimeframe +The time frame for pulling data for the query. +If custom, then a specific time period must be provided. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.TimeframeType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionType +The type of the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.ExportType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationContainer +The name of the container where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationResourceId +The resource id of the storage account where exports will be delivered. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationRootFolderPath +The name of the directory where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Format +The format of the export being delivered. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.FormatType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodFrom +The start date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodTo +The end date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleRecurrence +The schedule recurrence. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.RecurrenceType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleStatus +The status of the schedule. +Whether active or not. +If inactive, the export's scheduled execution is paused. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cost.Support.StatusType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodFrom +The start date to pull data from. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodTo +The end date to pull data to. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.ICostIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.IExport + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +DATASETFILTER : Has filter expression to use in the query. + - `[And ]`: The logical "AND" expression. Must have at least 2 items. + - `[Dimension ]`: Has comparison expression for a dimension + - `Name `: The name of the column to use in comparison. + - `Operator `: The operator to use for comparison. + - `Value `: Array of values to use for comparison + - `[Not ]`: The logical "NOT" expression. + - `[Or ]`: The logical "OR" expression. Must have at least 2 items. + - `[Tag ]`: Has comparison expression for a tag + +DATASETGROUPING : Array of group by expression to use in the query. Query can have up to 2 group by clauses. + - `Name `: The name of the column to group. + - `Type `: Has type of the column to group. + +INPUTOBJECT : Identity Parameter + - `[AlertId ]`: Alert ID + - `[ExportName ]`: Export Name. + - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. + - `[Id ]`: Resource identity path + - `[Scope ]`: The scope associated with view operations. 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 External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. + - `[ViewName ]`: View name + +## RELATED LINKS + diff --git a/src/CostManagement/docs/readme.md b/src/CostManagement/docs/readme.md new file mode 100644 index 000000000000..f4b0a6692c57 --- /dev/null +++ b/src/CostManagement/docs/readme.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.Cost` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overriden on regeneration*. To update documentation examples, please use the `../examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.Cost` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `../exports` folder. Additionally, when writing custom cmdlets in the `../custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `../examples` folder. \ No newline at end of file diff --git a/src/CostManagement/examples/Get-AzCostManagementExport.md b/src/CostManagement/examples/Get-AzCostManagementExport.md new file mode 100644 index 000000000000..b699e1fb4574 --- /dev/null +++ b/src/CostManagement/examples/Get-AzCostManagementExport.md @@ -0,0 +1,45 @@ +### Example 1: Get all cost management exports under a subscription +```powershell +PS C:\> Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" + +Name Type +---- ---- +TestExport Microsoft.CostManagement/exports +TestExport1 Microsoft.CostManagement/exports +``` + +this command gets all cost management exports under a subscription. + +### Example 2: Get a cost management export by name +```powershell +PS C:\> Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name 'TestExport' + +Name Type +---- ---- +TestExport Microsoft.CostManagement/exports +``` + +This command gets a cost management export by name. + +### Example 3: Get a cost management export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name 'TestExport' +PS C:\> Get-AzCostManagementExport -InputObject $export + +Name Type +---- ---- +TestExport Microsoft.CostManagement/exports +``` + +This command gets a cost management export by object. + +### 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. diff --git a/src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md b/src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md new file mode 100644 index 000000000000..0d28ecbb08a7 --- /dev/null +++ b/src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md @@ -0,0 +1,21 @@ +### Example 1: Get execution history of cost management export +```powershell +PS C:\> Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName "ps-customcolum-t" + +Name Type +---- ---- +``` + +This command gets execution history of cost management export. + +### 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 +---- ---- +``` + +This command gets execution history of cost management export by object. + diff --git a/src/CostManagement/examples/Invoke-AzCostManagementExecuteExport.md b/src/CostManagement/examples/Invoke-AzCostManagementExecuteExport.md new file mode 100644 index 000000000000..098474f3093f --- /dev/null +++ b/src/CostManagement/examples/Invoke-AzCostManagementExecuteExport.md @@ -0,0 +1,17 @@ +### Example 1: Invoke a cost mangement export by name +```powershell +PS C:\> Invoke-AzCostManagementExecuteExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName 'TestExport' + +``` + +This command invokes a cost mangement export by name. + +### Example 2: Invoke a cost mangement export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName 'TestExport' +PS C:\> Invoke-AzCostManagementExecuteExport -InputObject $export + +``` + +This command invokes a cost mangement export by object. + diff --git a/src/CostManagement/examples/Invoke-AzCostManagementUsageQuery.md b/src/CostManagement/examples/Invoke-AzCostManagementUsageQuery.md new file mode 100644 index 000000000000..5ec9865f3c8c --- /dev/null +++ b/src/CostManagement/examples/Invoke-AzCostManagementUsageQuery.md @@ -0,0 +1,12 @@ +### Example 1: Invoke query usage of the cost management export +```powershell +PS C:\> Invoke-AzCostManagementUsageQuery -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Timeframe MonthToDate -Type Usage -DatasetGranularity 'daily' + +NextLink Column Row +-------- ------ --- + {UsageDate, Currency} {20200701 USD, 20200702 USD, 20200703 USD, 20200704 USD…} +``` + +this command invokes query usage of the cost management export. + + diff --git a/src/CostManagement/examples/New-AzCostManagementExport.md b/src/CostManagement/examples/New-AzCostManagementExport.md new file mode 100644 index 000000000000..17fbb44a71e2 --- /dev/null +++ b/src/CostManagement/examples/New-AzCostManagementExport.md @@ -0,0 +1,37 @@ +### Example 1: Create a cost management export for a subscription +```powershell +PS C:\> $storageAccount = Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" +PS C:\> New-AzCostManagementExport -Scope "subscriptions/9e223dbe-3388-4e19-88eb-0975f02ac87f" -Name costexport-test -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom (Get-Date).ToString() -RecurrencePeriodTo (Get-Date).AddDays(20).ToString() -Format "Csv" -DestinationResourceId $storageAccount.Id -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" + +Name Type +---- ---- +costexport-test Microsoft.CostManagement/exports +``` + +This command creates a cost management export for the resource group for a subscription. + +### Example 2: Create a cost management export with custom column for the resource group +```powershell +PS C:\> $storageAccount = Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" +PS C:\> New-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azps-rg-t" -Name "ps-customcolum-t" -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" -RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" -DestinationResourceId $storageAccount.Id -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" -ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') + +Name Type +---- ---- +ps-customcolum-t Microsoft.CostManagement/exports +``` + +This command creates a cost management export with custom column for the resource group. + +### Example 3: Create a cost management export with custom column for the resource group +```powershell +PS C:\> $storageAccount = Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" +PS C:\> New-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azps-rg-t" -Name "ps-customcolum-t" -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" -RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" -DestinationResourceId $storageAccount.Id -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" -ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') + +Name Type +---- ---- +ps-customcolum-t Microsoft.CostManagement/exports +``` + +This command creates a cost management export with custom column for the resource group. + + diff --git a/src/CostManagement/examples/New-AzCostManagementQueryColumnObject.md b/src/CostManagement/examples/New-AzCostManagementQueryColumnObject.md new file mode 100644 index 000000000000..a043890b74ba --- /dev/null +++ b/src/CostManagement/examples/New-AzCostManagementQueryColumnObject.md @@ -0,0 +1,12 @@ +### Example 1: Create a column object of query for cost management export +```powershell +PS C:\> New-AzCostManagementQueryColumnObject -Name 'SubscriptionGuid' -Type 'string' + +Name Type +---- ---- +SubscriptionGuid string +``` + +This command creates a column object of query for cost management export. + + diff --git a/src/CostManagement/examples/New-AzCostManagementQueryComparisonExpressionObject.md b/src/CostManagement/examples/New-AzCostManagementQueryComparisonExpressionObject.md new file mode 100644 index 000000000000..89f150db32d7 --- /dev/null +++ b/src/CostManagement/examples/New-AzCostManagementQueryComparisonExpressionObject.md @@ -0,0 +1,11 @@ +### Example 1: Create a comparison expression object of query for cost management export +```powershell +PS C:\> New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') + +Name Operator Value +---- -------- ----- +ResourceLocation In {East US, West Europe} +``` + +This command creates a comparison expression object of query for cost management export. + diff --git a/src/CostManagement/examples/New-AzCostManagementQueryFilterObject.md b/src/CostManagement/examples/New-AzCostManagementQueryFilterObject.md new file mode 100644 index 000000000000..7529b75a1502 --- /dev/null +++ b/src/CostManagement/examples/New-AzCostManagementQueryFilterObject.md @@ -0,0 +1,15 @@ +### Example 1: Create a filter object of query for cost management export +```powershell +PS C:\> $orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') +PS C:\> $orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Operator In -Value @('UAT', 'Prod') +PS C:\> New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimension $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag)) + +And : +Dimension : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryComparisonExpression +Not : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryFilter +Or : {Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryFilter, Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryFilter} +Tag : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20191101.QueryComparisonExpression +``` + +this command creates a filter object of query for cost management export. + diff --git a/src/CostManagement/examples/Remove-AzCostManagementExport.md b/src/CostManagement/examples/Remove-AzCostManagementExport.md new file mode 100644 index 000000000000..659951472332 --- /dev/null +++ b/src/CostManagement/examples/Remove-AzCostManagementExport.md @@ -0,0 +1,17 @@ +### Example 1: Remove a cost management export by name +```powershell +PS C:\> Remove-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name AzureExport-T01 + +``` + +This command removes a cost management export by name + +### Example 2: Remove a cost management export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name AzureExport-T02 +PS C:\> Remove-AzCostManagementExport -InputObject $export + +``` + +This command removes a cost management export by object + diff --git a/src/CostManagement/examples/Update-AzCostManagementExport.md b/src/CostManagement/examples/Update-AzCostManagementExport.md new file mode 100644 index 000000000000..c9c388d50cb2 --- /dev/null +++ b/src/CostManagement/examples/Update-AzCostManagementExport.md @@ -0,0 +1,18 @@ +### Example 1: Update a cost management export by name +```powershell +PS C:\> Update-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name exportinfo-ps-t -RecurrencePeriodFrom (Get-Date).ToString() + +``` + +This command updates a cost management export by name. + +### Example 2: Update a cost management export by object +```powershell +PS C:\> $export = Get-AzCostManagementExport -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name exportinfo-ps-t +PS C:\> Update-AzCostManagementExport -InputObject $export -RecurrencePeriodFrom (Get-Date).ToString() + +{{ Add output here }} +``` + +This command updates a cost management export by object. + diff --git a/src/CostManagement/test/Az.Cost-TestResults.xml b/src/CostManagement/test/Az.Cost-TestResults.xml new file mode 100644 index 000000000000..308af38be1f3 --- /dev/null +++ b/src/CostManagement/test/Az.Cost-TestResults.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/CostManagement/test/Get-AzCostManagementExport.Recording.json b/src/CostManagement/test/Get-AzCostManagementExport.Recording.json new file mode 100644 index 000000000000..3ac4bf124863 --- /dev/null +++ b/src/CostManagement/test/Get-AzCostManagementExport.Recording.json @@ -0,0 +1,166 @@ +{ + "Get-AzCostManagementExport+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "97f0da57-48f6-467b-adb6-5fd16d723914" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "d3ced201-c031-4168-8707-c383d2859480" ], + "x-ms-request-id": [ "e3a71680-5d99-40f2-82ec-7b8da1654c2f" ], + "x-ms-correlation-request-id": [ "5aba7bf9-9794-400f-ba71-3bbf82254a01" ], + "x-ms-client-request-id": [ "97f0da57-48f6-467b-adb6-5fd16d723914" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072820Z:5aba7bf9-9794-400f-ba71-3bbf82254a01" ], + "Date": [ "Sun, 05 Jul 2020 07:28:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "21810" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}]}" + } + }, + "Get-AzCostManagementExport+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "315286b0-abf8-4d06-ac07-288ea6032a97" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "75479e09-5170-48fe-b6df-38dafd10e8e2" ], + "x-ms-request-id": [ "11dc620f-a7c3-4258-a515-c241aff751bf" ], + "x-ms-correlation-request-id": [ "bedeec0e-b42a-4628-a566-c7edd33b9e24" ], + "x-ms-client-request-id": [ "315286b0-abf8-4d06-ac07-288ea6032a97" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072821Z:bedeec0e-b42a-4628-a566-c7edd33b9e24" ], + "Date": [ "Sun, 05 Jul 2020 07:28:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "863" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + } + }, + "Get-AzCostManagementExport+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "05f0782e-1f92-43d0-badf-73e026395e53" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "02eec517-25d8-4029-88d5-00e2bf348809" ], + "x-ms-request-id": [ "ddd69d9c-b830-41f4-88e0-cf1a52c15158" ], + "x-ms-correlation-request-id": [ "ce01842c-f8df-4432-b195-2f111c1b17e5" ], + "x-ms-client-request-id": [ "05f0782e-1f92-43d0-badf-73e026395e53" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072822Z:ce01842c-f8df-4432-b195-2f111c1b17e5" ], + "Date": [ "Sun, 05 Jul 2020 07:28:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "863" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + } + }, + "Get-AzCostManagementExport+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "f1b7d4cd-87f2-4a39-9d1e-5d39486fbbb3" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "95172e67-c0b2-4e17-90f7-102305a2e30e" ], + "x-ms-request-id": [ "63c4dda6-cd07-4daa-98c3-2f81c23bb8cf" ], + "x-ms-correlation-request-id": [ "8a5e54c9-4e82-46cd-8fbb-98470b3d573c" ], + "x-ms-client-request-id": [ "f1b7d4cd-87f2-4a39-9d1e-5d39486fbbb3" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072823Z:8a5e54c9-4e82-46cd-8fbb-98470b3d573c" ], + "Date": [ "Sun, 05 Jul 2020 07:28:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "863" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + } + } +} \ No newline at end of file diff --git a/src/CostManagement/test/Get-AzCostManagementExport.Tests.ps1 b/src/CostManagement/test/Get-AzCostManagementExport.Tests.ps1 new file mode 100644 index 000000000000..2940b9cb4076 --- /dev/null +++ b/src/CostManagement/test/Get-AzCostManagementExport.Tests.ps1 @@ -0,0 +1,30 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCostManagementExport.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Get-AzCostManagementExport' { + It 'List' { + $exportList = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" + $exportList.Count | Should -BeGreaterOrEqual 1 + } + + It 'Get' { + $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 + $export.Name | Should -Be $env.exportName01 + } + + It 'GetViaIdentity' { + $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 + $export = Get-AzCostManagementExport -InputObject $export + $export.Name | Should -Be $env.exportName01 + } +} diff --git a/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json new file mode 100644 index 000000000000..ffc41b71a784 --- /dev/null +++ b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json @@ -0,0 +1,43 @@ +{ + "Get-AzCostManagementExportExecutionHistory+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/runHistory?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/runHistory?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "01ae81a0-0ec4-4553-bdcf-db1d52c0ab6b" ], + "CommandName": [ "Get-AzCostManagementExportExecutionHistory" ], + "FullCommandName": [ "Get-AzCostManagementExportExecutionHistory_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "6402746e-153b-4d7a-8c12-eae907ab014c" ], + "x-ms-request-id": [ "0845b9a7-88dd-4bf6-9b58-f7fc66473a05" ], + "x-ms-correlation-request-id": [ "f4b904f4-db8a-46ba-a758-854bf7b669a1" ], + "x-ms-client-request-id": [ "01ae81a0-0ec4-4553-bdcf-db1d52c0ab6b" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073717Z:f4b904f4-db8a-46ba-a758-854bf7b669a1" ], + "Date": [ "Sun, 05 Jul 2020 07:37:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4255" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/9872b773-44de-475c-8d2b-fcd96aba976a\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-01T12:03:15.4047733Z\",\"processingStartTime\":\"2020-07-01T12:03:15.4047733Z\",\"processingEndTime\":\"2020-07-01T12:03:26.6235717Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_9872b773-44de-475c-8d2b-fcd96aba976a.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/a4d1dd0e-a642-4cd7-8b3f-f2c8a1fd69e1\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-02T12:05:33.1096023Z\",\"processingStartTime\":\"2020-07-02T12:05:33.1096023Z\",\"processingEndTime\":\"2020-07-02T12:05:44.3974901Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_a4d1dd0e-a642-4cd7-8b3f-f2c8a1fd69e1.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/c3db74b5-a5d0-4a8f-a0e9-afb344df6a26\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-03T12:08:32.5381073Z\",\"processingStartTime\":\"2020-07-03T12:08:32.5381073Z\",\"processingEndTime\":\"2020-07-03T12:08:43.9167209Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_c3db74b5-a5d0-4a8f-a0e9-afb344df6a26.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/34d3c3a6-4565-4aa0-9aa9-6dbd7b780f4d\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-04T12:07:49.5569837Z\",\"processingStartTime\":\"2020-07-04T12:07:49.5569837Z\",\"processingEndTime\":\"2020-07-04T12:08:01.4788868Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_34d3c3a6-4565-4aa0-9aa9-6dbd7b780f4d.csv\"}}]}" + } + } +} \ No newline at end of file diff --git a/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 new file mode 100644 index 000000000000..bec242c0f09a --- /dev/null +++ b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 @@ -0,0 +1,25 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCostManagementExportExecutionHistory.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Get-AzCostManagementExportExecutionHistory' { + It 'Get' { + { Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + # An exception "Invalid identity for URI '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory'" was thrown + # TODO: The issue fix + $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 + { Get-AzCostManagementExportExecutionHistory -InputObject $export} | Should -Not -Throw + } +} diff --git a/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json new file mode 100644 index 000000000000..7058cd2dd8a1 --- /dev/null +++ b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json @@ -0,0 +1,123 @@ +{ + "Invoke-AzCostManagementExecuteExport+[NoContext]+Execute+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "7b05e3e9-7f9f-4464-95f6-6ef2f614b7ba" ], + "CommandName": [ "Invoke-AzCostManagementExecuteExport" ], + "FullCommandName": [ "Invoke-AzCostManagementExecuteExport_Execute" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "746447ca-a453-4376-9538-9deaeda88c74" ], + "x-ms-request-id": [ "2541fabb-c7d4-4fd4-a614-ac4c7185a7a0" ], + "x-ms-correlation-request-id": [ "0859307f-50fa-4b13-845c-547f1239ea1f" ], + "x-ms-client-request-id": [ "7b05e3e9-7f9f-4464-95f6-6ef2f614b7ba" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073747Z:0859307f-50fa-4b13-845c-547f1239ea1f" ], + "Date": [ "Sun, 05 Jul 2020 07:37:47 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Invoke-AzCostManagementExecuteExport+[NoContext]+ExecuteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "bf5e49b5-83b3-412e-b85d-eb872e6b98a9" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "d7e52031-e951-4915-8ed4-07ccb5ef47d7" ], + "x-ms-request-id": [ "f5c911ae-9fe9-4b7b-8578-92ab775cd1cd" ], + "x-ms-correlation-request-id": [ "981b08c2-b0cf-4730-916f-9b1c5faaf373" ], + "x-ms-client-request-id": [ "bf5e49b5-83b3-412e-b85d-eb872e6b98a9" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073748Z:981b08c2-b0cf-4730-916f-9b1c5faaf373" ], + "Date": [ "Sun, 05 Jul 2020 07:37:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "863" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + } + }, + "Invoke-AzCostManagementExecuteExport+[NoContext]+ExecuteViaIdentity+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "73cf2e09-d437-4e91-98a5-d3f62e73b4d4" ], + "CommandName": [ "Invoke-AzCostManagementExecuteExport" ], + "FullCommandName": [ "Invoke-AzCostManagementExecuteExport_ExecuteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "750ebfe9-a251-4d22-a4d6-f707729ef31f" ], + "x-ms-request-id": [ "5dd11efd-0e8c-4c0f-abf6-6303ccaadb31" ], + "x-ms-correlation-request-id": [ "89fd801f-3aa1-4bdc-b4bf-e7a11ba7489e" ], + "x-ms-client-request-id": [ "73cf2e09-d437-4e91-98a5-d3f62e73b4d4" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073750Z:89fd801f-3aa1-4bdc-b4bf-e7a11ba7489e" ], + "Date": [ "Sun, 05 Jul 2020 07:37:49 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + } +} \ No newline at end of file diff --git a/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 new file mode 100644 index 000000000000..65506c7758fe --- /dev/null +++ b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 @@ -0,0 +1,25 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzCostManagementExecuteExport.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Invoke-AzCostManagementExecuteExport' { + It 'Execute' { + { Invoke-AzCostManagementExecuteExport -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 } | Should -Not -Throw + } + + It 'ExecuteViaIdentity' { + { + $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 + Invoke-AzCostManagementExecuteExport -InputObject $export + } | Should -Not -Throw + } +} diff --git a/src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 b/src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 new file mode 100644 index 000000000000..2b76c44cdf15 --- /dev/null +++ b/src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 @@ -0,0 +1,19 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzCostManagementUsageQuery.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Invoke-AzCostManagementUsageQuery' { + It 'UsageExpanded' { + #Import-Module -Name D:\azure-service\_AzurePowershellTest\azure-powershell\src\CostManagement\generated\modules\Az.Accounts\1.9.0 -Verbose + { Invoke-AzCostManagementUsageQuery -Scope "subscriptions/$($env.SubscriptionId)" -Timeframe MonthToDate -Type Usage -DatasetGranularity 'daily' } | Should -Not -Throw + } +} diff --git a/src/CostManagement/test/New-AzCostManagementExport.Recording.json b/src/CostManagement/test/New-AzCostManagementExport.Recording.json new file mode 100644 index 000000000000..1a625747fa01 --- /dev/null +++ b/src/CostManagement/test/New-AzCostManagementExport.Recording.json @@ -0,0 +1,150 @@ +{ + "New-AzCostManagementExport+[NoContext]+CreateExpandedBySubscription+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan?api-version=2019-11-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "692" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan?api-version=2019-11-01" ], + "session-id": [ "cfb63150-2aaf-4a17-944a-cd57dfa17017" ], + "x-ms-request-id": [ "77a3fa40-a932-40be-8c4f-bdc835ee6192" ], + "x-ms-correlation-request-id": [ "3bfd7cc7-659d-408c-9780-54669ef881cd" ], + "x-ms-client-request-id": [ "fd0d08a0-69f9-47e2-b6a7-0c109574e526" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094815Z:3bfd7cc7-659d-408c-9780-54669ef881cd" ], + "Date": [ "Sun, 05 Jul 2020 09:48:15 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "701" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan\",\"name\":\"export-u9yfan\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b1674994fd\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" + } + }, + "New-AzCostManagementExport+[NoContext]+CreateExpandedByResourceGroup+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "692" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01" ], + "session-id": [ "5205b9b5-d0c8-408d-b962-cd022955456a" ], + "x-ms-request-id": [ "96e99633-1517-4945-b4e1-b85f33551742" ], + "x-ms-correlation-request-id": [ "02576bb9-e429-4ada-8505-2d67cbf27535" ], + "x-ms-client-request-id": [ "5e708a6f-774e-4f10-b506-3b50cf0d9b6e" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094817Z:02576bb9-e429-4ada-8505-2d67cbf27535" ], + "Date": [ "Sun, 05 Jul 2020 09:48:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "734" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb\",\"name\":\"export-casdkb\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16873a723\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" + } + }, + "New-AzCostManagementExport+[NoContext]+CreateExpandedByColumn+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"configuration\": {\n \"columns\": [ \"SubscriptionGuid\", \"MeterId\", \"InstanceId\", \"ResourceGroup\", \"PreTaxCost\" ]\n },\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "830" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01" ], + "session-id": [ "a9849fa7-1a74-4ed4-bfb9-d122ed9e7805" ], + "x-ms-request-id": [ "93613507-770b-402e-a7fb-6a9b2ff414c9" ], + "x-ms-correlation-request-id": [ "38f97bcd-2b08-49db-bd81-6f576c5ce892" ], + "x-ms-client-request-id": [ "041c4b07-8cdf-4bde-915a-aa58d6212e78" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094818Z:38f97bcd-2b08-49db-bd81-6f576c5ce892" ], + "Date": [ "Sun, 05 Jul 2020 09:48:18 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "802" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn\",\"name\":\"export-u9sfcn\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16952d046\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}}" + } + }, + "New-AzCostManagementExport+[NoContext]+CreateExpandedByGroup+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg?api-version=2019-11-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\",\n \"grouping\": [\n {\n \"name\": \"ResourceGroup\",\n \"type\": \"Dimension\"\n }\n ]\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "818" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg?api-version=2019-11-01" ], + "session-id": [ "acf95922-6105-4457-97d4-5a7df43183a4" ], + "x-ms-request-id": [ "7df81394-8084-461f-b968-8f2e46502df6" ], + "x-ms-correlation-request-id": [ "8e7cabcc-e5db-4a53-a21e-f94d35b43e4c" ], + "x-ms-client-request-id": [ "8103296c-201d-47cb-be53-61fd0e28a22c" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094819Z:8e7cabcc-e5db-4a53-a21e-f94d35b43e4c" ], + "Date": [ "Sun, 05 Jul 2020 09:48:19 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "758" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16a169690\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + } + } +} \ No newline at end of file diff --git a/src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 b/src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 new file mode 100644 index 000000000000..dd29c26da390 --- /dev/null +++ b/src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 @@ -0,0 +1,100 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCostManagementExport.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzCostManagementExport' { + It 'CreateExpandedBySubscription' { + # Create export cost management by subscription + $export = New-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName02 ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom $env.fromDate ` + -RecurrencePeriodTo $env.toDate -Format "Csv" ` + -DestinationResourceId $env.storageAccountId ` + -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` + -DatasetGranularity "Daily" + $export.ScheduleStatus | Should -Be 'Active' + } + It 'CreateExpandedByResourceGroup' { + # Create export cost management by resource group + $export = New-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)/resourceGroups/$($env.resourceGroup)" -Name $env.exportName03 ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom $env.fromDate ` + -RecurrencePeriodTo $env.toDate -Format "Csv" ` + -DestinationResourceId $env.storageAccountId ` + -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` + -DatasetGranularity "Daily" + $export.ScheduleStatus | Should -Be 'Active' + } + It 'CreateExpandedByColumn' { + $export = New-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName04 ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom $env.fromDate ` + -RecurrencePeriodTo $env.toDate -Format "Csv" ` + -DestinationResourceId $env.storageAccountId ` + -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` + -DatasetGranularity "Daily" ` + -ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') + $export.ScheduleStatus | Should -Be 'Active' + } + + It 'CreateExpandedByGroup' { + $export = New-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName05 ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom $env.fromDate ` + -RecurrencePeriodTo $env.toDate -Format "Csv" ` + -DestinationResourceId $env.storageAccountId ` + -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` + -DatasetGranularity "Daily" ` + -DatasetGrouping @(@{type='Dimension'; name='ResourceGroup'}) + $export.ScheduleStatus | Should -Be 'Active' + } + It 'CreateExpandedByGroupAggregation' -skip { + #Group Aggregation: Created successfully, No data generated in the storage account + #TODO: The issue fix + <# + $Aggregation1 = @{ name = 'PreTaxCost'; function='sum'} + $Aggregation2 = @{ name = 'Cost'; function='sum'} + $AggregationDict = @{costsum=$aggregation1; cost=$aggregation2} + + New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-groupaggregation-t" ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" ` + -RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` + -DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` + -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` + -DatasetGranularity "Daily" ` + -DatasetGrouping @(@{type='Dimension'; name='ResourceGroup'}) ` + -DatasetAggregation $AggregationDict + #> + } + + It 'CreateExpandedByFilter' -skip { + #Filter: Create failed, Invalid dataset filter; on a QueryFilter one and only one of and/or/not/dimension/tag can be set. Invalid dataset + # filter; on a QueryFilter one and only one of and/or/not/dimension/tag can be set. + #TODO: The issue fix. + <# + $orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') + $queryOrDimension = New-AzCostManagementQueryFilterObject -Dimension $orDimension + $orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Operator In -Value @('UAT', 'Prod') + $queryOrTag = New-AzCostManagementQueryFilterObject -Tag $orTag + $andOr = New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimension $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag)) + + $dimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceGroup' -Operator In -Value 'API' + $andDimension = New-AzCostManagementQueryFilterObject -Dimension $dimension + $fileter = New-AzCostManagementQueryFilterObject -And @($andOr, $andDimension) + + New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-filter-t01" ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" ` + -RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` + -DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` + -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` + -DatasetGranularity "Daily" ` + -DatasetFilter $fileter + #> + } + +} diff --git a/src/CostManagement/test/New-AzCostManagementQueryColumnObject.Tests.ps1 b/src/CostManagement/test/New-AzCostManagementQueryColumnObject.Tests.ps1 new file mode 100644 index 000000000000..35a70dd55a82 --- /dev/null +++ b/src/CostManagement/test/New-AzCostManagementQueryColumnObject.Tests.ps1 @@ -0,0 +1,18 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCostManagementQueryColumnObject.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzCostManagementQueryColumnObject' { + It '__AllParameterSets' { + { New-AzCostManagementQueryColumnObject -Name 'SubscriptionGuid' -Type 'string' } | Should -Not -Throw + } +} diff --git a/src/CostManagement/test/New-AzCostManagementQueryComparisonExpressionObject.Tests.ps1 b/src/CostManagement/test/New-AzCostManagementQueryComparisonExpressionObject.Tests.ps1 new file mode 100644 index 000000000000..7cf80493cdc4 --- /dev/null +++ b/src/CostManagement/test/New-AzCostManagementQueryComparisonExpressionObject.Tests.ps1 @@ -0,0 +1,20 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCostManagementQueryComparisonExpressionObject.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzCostManagementQueryComparisonExpressionObject' { + It '__AllParameterSets' { + { + $orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') + } | Should -Not -Throw + } +} diff --git a/src/CostManagement/test/New-AzCostManagementQueryFilterObject.Tests.ps1 b/src/CostManagement/test/New-AzCostManagementQueryFilterObject.Tests.ps1 new file mode 100644 index 000000000000..2e490b60f25b --- /dev/null +++ b/src/CostManagement/test/New-AzCostManagementQueryFilterObject.Tests.ps1 @@ -0,0 +1,26 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCostManagementQueryFilterObject.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzCostManagementQueryFilterObject' { + It '__AllParameterSets' { + { + $orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') + $orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Operator In -Value @('UAT', 'Prod') + $andOr = New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimension $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag)) + + $dimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceGroup' -Operator In -Value 'API' + $andDimension = New-AzCostManagementQueryFilterObject -Dimension $dimension + $fileter = New-AzCostManagementQueryFilterObject -And @($andOr, $andDimension) + } | Should -Not -Throw + } +} diff --git a/src/CostManagement/test/Remove-AzCostManagementExport.Recording.json b/src/CostManagement/test/Remove-AzCostManagementExport.Recording.json new file mode 100644 index 000000000000..4938acb85d61 --- /dev/null +++ b/src/CostManagement/test/Remove-AzCostManagementExport.Recording.json @@ -0,0 +1,205 @@ +{ + "Remove-AzCostManagementExport+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "70c3dc81-00cc-4354-9ddc-eb528e8eb69e" ], + "CommandName": [ "Remove-AzCostManagementExport" ], + "FullCommandName": [ "Remove-AzCostManagementExport_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "bf157bf3-ef8d-4f79-96a7-0e11d61bc2db" ], + "x-ms-request-id": [ "488aa216-519e-4b76-a448-ac5c50998601" ], + "x-ms-correlation-request-id": [ "9488ab48-167a-4fed-a057-cb7b7d2189ff" ], + "x-ms-client-request-id": [ "70c3dc81-00cc-4354-9ddc-eb528e8eb69e" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092951Z:9488ab48-167a-4fed-a057-cb7b7d2189ff" ], + "Date": [ "Sun, 05 Jul 2020 09:29:50 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzCostManagementExport+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports?api-version=2019-11-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "d4176122-55c7-47e2-ab56-bcde6f977cf0" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "50761477-8ad9-4a9a-a519-c69d1d58b66f" ], + "x-ms-request-id": [ "e5a52a24-4659-4f2d-a600-19e08a06270c" ], + "x-ms-correlation-request-id": [ "fe07a81d-0cd1-4b8a-b0db-7d50eabcde95" ], + "x-ms-client-request-id": [ "d4176122-55c7-47e2-ab56-bcde6f977cf0" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092952Z:fe07a81d-0cd1-4b8a-b0db-7d50eabcde95" ], + "Date": [ "Sun, 05 Jul 2020 09:29:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "22569" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652ae782924c5\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}]}" + } + }, + "Remove-AzCostManagementExport+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "db630e7b-73f7-4fa0-ae36-7f0896f87e9e" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "10e25170-56b0-4647-8e6f-2da9dd45c1f9" ], + "x-ms-request-id": [ "4a50676c-d47e-4a77-9e4a-048e865da055" ], + "x-ms-correlation-request-id": [ "2739f789-5a4b-4319-9696-47bb8d141b2f" ], + "x-ms-client-request-id": [ "db630e7b-73f7-4fa0-ae36-7f0896f87e9e" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092952Z:2739f789-5a4b-4319-9696-47bb8d141b2f" ], + "Date": [ "Sun, 05 Jul 2020 09:29:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "734" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb\",\"name\":\"export-casdkb\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652ae768ba951\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" + } + }, + "Remove-AzCostManagementExport+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "9a198a91-bc46-4369-a685-1274a6d2b3e8" ], + "CommandName": [ "Remove-AzCostManagementExport" ], + "FullCommandName": [ "Remove-AzCostManagementExport_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "92e3deff-c3bd-438c-a36a-4dac026b8410" ], + "x-ms-request-id": [ "5bda0f3d-5195-42db-b0e5-ba430de97717" ], + "x-ms-correlation-request-id": [ "8142bde1-0afe-4141-a839-9837faeed195" ], + "x-ms-client-request-id": [ "9a198a91-bc46-4369-a685-1274a6d2b3e8" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092953Z:8142bde1-0afe-4141-a839-9837faeed195" ], + "Date": [ "Sun, 05 Jul 2020 09:29:52 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzCostManagementExport+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports?api-version=2019-11-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "a75bc91a-c175-4df7-b856-78bcd47d61eb" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "51721512-f98c-43b1-bf13-3ff31bd57ed3" ], + "x-ms-request-id": [ "e09d5a92-3c51-4e04-bc05-353bdb73d242" ], + "x-ms-correlation-request-id": [ "950d0086-7b09-4729-a109-d9cac9297898" ], + "x-ms-client-request-id": [ "a75bc91a-c175-4df7-b856-78bcd47d61eb" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092954Z:950d0086-7b09-4729-a109-d9cac9297898" ], + "Date": [ "Sun, 05 Jul 2020 09:29:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "22569" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652ae782924c5\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}]}" + } + } +} \ No newline at end of file diff --git a/src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 b/src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 new file mode 100644 index 000000000000..c406b76ae100 --- /dev/null +++ b/src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 @@ -0,0 +1,27 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzCostManagementExport.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Remove-AzCostManagementExport' { + It 'Delete' { + Remove-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName04 + $exportList = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" + $exportList.Name| Should -Not -Contain $env.exportName02 + } + + It 'DeleteViaIdentity' { + $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)/resourceGroups/$($env.resourceGroup)" -Name $env.exportName03 + Remove-AzCostManagementExport -InputObject $export + $exportList = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" + $exportList.Name| Should -Not -Contain $env.exportName03 + } +} diff --git a/src/CostManagement/test/Update-AzCostManagementExport.Tests.ps1 b/src/CostManagement/test/Update-AzCostManagementExport.Tests.ps1 new file mode 100644 index 000000000000..7014d42d40d4 --- /dev/null +++ b/src/CostManagement/test/Update-AzCostManagementExport.Tests.ps1 @@ -0,0 +1,29 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzCostManagementExport.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Update-AzCostManagementExport' { + It 'UpdateExpanded' -skip { + # Has issue on server, Parameter ResourceID is not null + # TODO: When fix issue on server + $export = Update-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 -RecurrencePeriodFrom $env.toDate + $export.RecurrencePeriodFrom | Should -Be $env.toDate + } + + It 'UpdateViaIdentityExpanded' -skip { + # Has issue on server, Parameter ResourceID is not null + # TODO: When fix issue on server + $oldExport = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 + $export = Update-AzCostManagementExport -InputObject $oldExport -RecurrencePeriodFrom $env.fromDate + $export.RecurrencePeriodFrom | Should -Be $env.fromDate + } +} diff --git a/src/CostManagement/test/deployment-templates/storage-account/parameters.json b/src/CostManagement/test/deployment-templates/storage-account/parameters.json new file mode 100644 index 000000000000..005b17d22f35 --- /dev/null +++ b/src/CostManagement/test/deployment-templates/storage-account/parameters.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "storageAccounts_name": null + } +} diff --git a/src/CostManagement/test/deployment-templates/storage-account/template.json b/src/CostManagement/test/deployment-templates/storage-account/template.json new file mode 100644 index 000000000000..fccd796d68bf --- /dev/null +++ b/src/CostManagement/test/deployment-templates/storage-account/template.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "storageAccounts_name": { + "defaultValue": "staaccountmhot0q", + "type": "String" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2019-06-01", + "name": "[parameters('storageAccounts_name')]", + "location": "eastus", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "keyType": "Account", + "enabled": true + }, + "blob": { + "keyType": "Account", + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_name'), '/default')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_name'))]" + ], + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "properties": { + "cors": { + "corsRules": [] + }, + "deleteRetentionPolicy": { + "enabled": false + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts/fileServices", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_name'), '/default')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_name'))]" + ], + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "properties": { + "cors": { + "corsRules": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_name'), '/default/exports')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_name'))]" + ], + "properties": { + "publicAccess": "None" + } + } + ] +} \ No newline at end of file diff --git a/src/CostManagement/test/env.json b/src/CostManagement/test/env.json new file mode 100644 index 000000000000..24aeaf3fdf15 --- /dev/null +++ b/src/CostManagement/test/env.json @@ -0,0 +1,14 @@ +{ + "exportName04": "export-u9sfcn", + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", + "resourceGroup": "lucas-manual-test", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "location": "eastus", + "exportName02": "export-u9yfan", + "toDate": "7/21/2020 7:41:32 AM", + "exportName03": "export-casdkb", + "exportName05": "export-cf6scg", + "fromDate": "7/5/2020 7:41:32 AM", + "storageAccountId": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q", + "exportName01": "export-xjsoqu" +} diff --git a/src/CostManagement/test/loadEnv.ps1 b/src/CostManagement/test/loadEnv.ps1 new file mode 100644 index 000000000000..c4ebf2e8310c --- /dev/null +++ b/src/CostManagement/test/loadEnv.ps1 @@ -0,0 +1,28 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/CostManagement/test/readme.md b/src/CostManagement/test/readme.md new file mode 100644 index 000000000000..1969200c6a09 --- /dev/null +++ b/src/CostManagement/test/readme.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `../custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/CostManagement/test/test-script.ps1 b/src/CostManagement/test/test-script.ps1 new file mode 100644 index 000000000000..21a919b92419 --- /dev/null +++ b/src/CostManagement/test/test-script.ps1 @@ -0,0 +1,91 @@ +<# +New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "LucasTestExport" ` +-ScheduleStatus "Active" -ScheduleRecurrence "Daily" ` +-RecurrencePeriodFrom "2020-06-20T20:00:00Z" ` +-RecurrencePeriodTo "2020-06-24T00:00:00Z" ` +-Format "Csv" ` +-DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount" ` +-DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" ` +-DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" ` +#-ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') +-DatasetAggregation $AggregationDict ` +-DatasetGrouping @(@{type='Dimension'; name='SubscriptionName'}; @{type='Tag'; name='Environment'}) ` +#-DatasetFilter $fileter +#> + +<# export all info pass +New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-exportall-t" ` +-ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" ` +-RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` +-DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` +-DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` +-DatasetGranularity "Daily" +#> + +<# custom colum pass +New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-customcolum-t" ` +-ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" ` +-RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` +-DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` +-DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` +-DatasetGranularity "Daily" ` +-ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') +#> + +<# Aggregation: The data not generate in the storage account +$Aggregation1 = @{ name = 'PreTaxCost'; function='sum'} +$Aggregation2 = @{ name = 'Cost'; function='sum'} +$AggregationDict = @{costsum=$aggregation1; cost=$aggregation2} + +New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-aggregation-t" ` +-ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" ` +-RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` +-DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` +-DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` +-DatasetGranularity "Daily" ` +-DatasetAggregation $AggregationDict +#> + +<#Group pass +New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-group-t" ` +-ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T15:00:00Z" ` +-RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` +-DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` +-DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` +-DatasetGranularity "Daily" ` +-DatasetGrouping @(@{type='Dimension'; name='ResourceGroup'}) + #> + +<#Group Aggregation: No data generated in the storage account +$Aggregation1 = @{ name = 'PreTaxCost'; function='sum'} +$Aggregation2 = @{ name = 'Cost'; function='sum'} +$AggregationDict = @{costsum=$aggregation1; cost=$aggregation2} + +New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-groupaggregation-t" ` +-ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" ` +-RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` +-DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` +-DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` +-DatasetGranularity "Daily" ` +-DatasetGrouping @(@{type='Dimension'; name='ResourceGroup'}) ` +-DatasetAggregation $AggregationDict +#> +<# +$orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Operator In -Value @('East US', 'West Europe') +$queryOrDimension = New-AzCostManagementQueryFilterObject -Dimension $orDimension +$orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Operator In -Value @('UAT', 'Prod') +$queryOrTag = New-AzCostManagementQueryFilterObject -Tag $orTag +$andOr = New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimension $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag)) + +$dimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceGroup' -Operator In -Value 'API' +$andDimension = New-AzCostManagementQueryFilterObject -Dimension $dimension +$fileter = New-AzCostManagementQueryFilterObject -And @($andOr, $andDimension) +#> +New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-filter-t01" ` +-ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-07-05T00:00:00Z" ` +-RecurrencePeriodTo "2020-07-30T00:00:00Z" -Format "Csv" ` +-DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` +-DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` +-DatasetGranularity "Daily" ` +-DatasetFilter $fileter + diff --git a/src/CostManagement/test/utils.ps1 b/src/CostManagement/test/utils.ps1 new file mode 100644 index 000000000000..36eb6ccfe754 --- /dev/null +++ b/src/CostManagement/test/utils.ps1 @@ -0,0 +1,84 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +function getUseModules() { + $usedModule = & 'gmo' + foreach($module in $usedModule) + { + $name = $module.Name + $version = $module.Version + Write-Host -ForegroundColor Green "Using module name: $name $version" + } +} +$env = @{} +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + $env.location = 'eastus' + # For any resources you created for test, you should add it to $env here. + $exportName01 = 'export-' + (RandomString -allChars $false -len 6) + $exportName02 = 'export-' + (RandomString -allChars $false -len 6) + $exportName03 = 'export-' + (RandomString -allChars $false -len 6) + $exportName04 = 'export-' + (RandomString -allChars $false -len 6) + $exportName05 = 'export-' + (RandomString -allChars $false -len 6) + + $null = $env.Add('exportName01', $exportName01) + $null = $env.Add('exportName02', $exportName02) + $null = $env.Add('exportName03', $exportName03) + $null = $env.Add('exportName04', $exportName04) + $null = $env.Add('exportName05', $exportName05) + + Write-Host -ForegroundColor Green "Create test group..." + $resourceGroup = 'costmanagement-rg-' + (RandomString -allChars $false -len 6) + New-AzResourceGroup -Name $resourceGroup -Location $env.location + $null = $env.Add('resourceGroup', $resourceGroup) + Write-Host -ForegroundColor Green 'The test group create completed.' + + # Deploy storage account for test. + Write-Host -ForegroundColor Green "Deploying storage account..." + <# Cause error: The request content was invalid and could not be deserialized: 'Error converting value "staaccountuigcan" to type + 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Data.Definitions.DeploymentParameterDefinition'. Path + 'properties.parameters.storageAccounts_wyunchistorageaccount_name', line 5, position 70.'. + + $staaccountName = 'staaccount' + (RandomString -allChars $false -len 6) + $staaccountParam = Get-Content .\test\deployment-templates\storage-account\parameters.json | ConvertFrom-Json + $staaccountParam.parameters.storageAccounts_name = $staaccountName + set-content -Path .\test\deployment-templates\storage-account\parameters.json -Value (ConvertTo-Json $staaccountParam) + #> + New-AzDeployment -Mode Incremental -TemplateFile .\test\deployment-templates\storage-account\template.json -TemplateParameterFile .\test\deployment-templates\storage-account\parameters.json -ResourceGroupName $env.resourceGroup + $staaccountName = 'staaccountmhot0q' # Value in template.json + $env.storageAccountId = "/subscriptions/$($env.SubscriptionId)/resourceGroups/$($env.resourceGroup)/providers/Microsoft.Storage/storageAccounts/$($staaccountName)" + Start-Sleep -s 60 # Waiting storage account create complete. + Write-Host -ForegroundColor Green "The storage account deployed successfully." + + Write-Host -ForegroundColor Green "Create cost management export for test..." + $env.fromDate = (Get-Date).ToString() + $env.toDate = (Get-Date).AddDays(20).ToString() + New-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" ` + -RecurrencePeriodFrom $env.fromDate -RecurrencePeriodTo $env.toDate ` + -Format "Csv" ` + -DestinationResourceId $env.storageAccountId ` + -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" ` + -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" + + Write-Host -ForegroundColor Green "The cost management export created successfully." + + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) + +} +function cleanupEnv() { + # Clean resources you create for testing + Remove-AzResourceGroup -Name $env.resourceGroup +} + From e5bf9c1dfef93fbb1ac5a465700fa3351353eb02 Mon Sep 17 00:00:00 2001 From: LucasYao93 <53558334+LucasYao93@users.noreply.github.com> Date: Mon, 6 Jul 2020 17:46:39 +0800 Subject: [PATCH 2/2] Modified test cases and example of CostManagement. --- .../docs/Get-AzCostManagementExport.md | 11 -- ...-AzCostManagementExportExecutionHistory.md | 14 +- .../examples/Get-AzCostManagementExport.md | 10 -- ...-AzCostManagementExportExecutionHistory.md | 14 +- src/CostManagement/readme.md | 2 +- .../test/Az.Cost-TestResults.xml | 82 +++++----- .../Get-AzCostManagementExport.Recording.json | 92 +++++------ ...ementExportExecutionHistory.Recording.json | 106 +++++++++++-- ...ManagementExportExecutionHistory.Tests.ps1 | 10 +- ...CostManagementExecuteExport.Recording.json | 148 +++++++++++++---- ...ke-AzCostManagementExecuteExport.Tests.ps1 | 12 +- ...nvoke-AzCostManagementUsageQuery.Tests.ps1 | 7 +- .../New-AzCostManagementExport.Recording.json | 149 +++++++++++------- .../test/New-AzCostManagementExport.Tests.ps1 | 19 ++- ...move-AzCostManagementExport.Recording.json | 104 ++++++------ .../Remove-AzCostManagementExport.Tests.ps1 | 2 +- .../storage-account/template.json | 2 +- src/CostManagement/test/env.json | 25 +-- src/CostManagement/test/utils.ps1 | 11 +- 19 files changed, 513 insertions(+), 307 deletions(-) diff --git a/src/CostManagement/docs/Get-AzCostManagementExport.md b/src/CostManagement/docs/Get-AzCostManagementExport.md index 19f373500df9..62d9443ac1da 100644 --- a/src/CostManagement/docs/Get-AzCostManagementExport.md +++ b/src/CostManagement/docs/Get-AzCostManagementExport.md @@ -67,17 +67,6 @@ TestExport Microsoft.CostManagement/exports This command gets a cost management export by object. -### 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. - ## PARAMETERS ### -DefaultProfile diff --git a/src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md b/src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md index 1cbf2291c989..bc7a61e0105a 100644 --- a/src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md +++ b/src/CostManagement/docs/Get-AzCostManagementExportExecutionHistory.md @@ -33,8 +33,10 @@ The operation to get the execution history of an export for the defined scope by ```powershell PS C:\> Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName "ps-customcolum-t" -Name Type ----- ---- +ExecutionType ProcessingStartTime ProcessingEndTime Status FileName +------------- ------------------- ----------------- ------ -------- +OnDemand 6/29/2020 6:03:26 AM 6/29/2020 6:04:28 AM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_041c4d56-f25e-4e37-99fb-ab201309e07f.csv +Scheduled 6/30/2020 12:02:53 PM 6/30/2020 12:03:34 PM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_cd5bd8b1-014f-4521-b20a-69168288263d.csv ``` This command gets execution history of cost management export. @@ -42,10 +44,12 @@ This command gets execution history of cost management export. ### 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 +PS C:\> $export | Get-AzCostManagementExportExecutionHistory -InputObject $export -Name Type ----- ---- +ExecutionType ProcessingStartTime ProcessingEndTime Status FileName +------------- ------------------- ----------------- ------ -------- +OnDemand 6/29/2020 6:03:26 AM 6/29/2020 6:04:28 AM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_041c4d56-f25e-4e37-99fb-ab201309e07f.csv +Scheduled 6/30/2020 12:02:53 PM 6/30/2020 12:03:34 PM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_cd5bd8b1-014f-4521-b20a-69168288263d.csv ``` This command gets execution history of cost management export by object. diff --git a/src/CostManagement/examples/Get-AzCostManagementExport.md b/src/CostManagement/examples/Get-AzCostManagementExport.md index b699e1fb4574..9284c2af98bc 100644 --- a/src/CostManagement/examples/Get-AzCostManagementExport.md +++ b/src/CostManagement/examples/Get-AzCostManagementExport.md @@ -33,13 +33,3 @@ TestExport Microsoft.CostManagement/exports This command gets a cost management export by object. -### 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. diff --git a/src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md b/src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md index 0d28ecbb08a7..ac37f614271f 100644 --- a/src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md +++ b/src/CostManagement/examples/Get-AzCostManagementExportExecutionHistory.md @@ -2,8 +2,10 @@ ```powershell PS C:\> Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -ExportName "ps-customcolum-t" -Name Type ----- ---- +ExecutionType ProcessingStartTime ProcessingEndTime Status FileName +------------- ------------------- ----------------- ------ -------- +OnDemand 6/29/2020 6:03:26 AM 6/29/2020 6:04:28 AM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_041c4d56-f25e-4e37-99fb-ab201309e07f.csv +Scheduled 6/30/2020 12:02:53 PM 6/30/2020 12:03:34 PM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_cd5bd8b1-014f-4521-b20a-69168288263d.csv ``` This command gets execution history of cost management export. @@ -11,10 +13,12 @@ This command gets execution history of cost management export. ### 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 +PS C:\> $export | Get-AzCostManagementExportExecutionHistory -InputObject $export -Name Type ----- ---- +ExecutionType ProcessingStartTime ProcessingEndTime Status FileName +------------- ------------------- ----------------- ------ -------- +OnDemand 6/29/2020 6:03:26 AM 6/29/2020 6:04:28 AM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_041c4d56-f25e-4e37-99fb-ab201309e07f.csv +Scheduled 6/30/2020 12:02:53 PM 6/30/2020 12:03:34 PM Completed ad-hoc/ps-customcolum-t/20200601-20200630/ps-customcolum-t_cd5bd8b1-014f-4521-b20a-69168288263d.csv ``` This command gets execution history of cost management export by object. diff --git a/src/CostManagement/readme.md b/src/CostManagement/readme.md index 3b2c2ae143ee..99b8c111a0ff 100644 --- a/src/CostManagement/readme.md +++ b/src/CostManagement/readme.md @@ -140,4 +140,4 @@ directive: - no-inline: - QueryFilter - ReportConfigFilter -``` +``` \ No newline at end of file diff --git a/src/CostManagement/test/Az.Cost-TestResults.xml b/src/CostManagement/test/Az.Cost-TestResults.xml index 308af38be1f3..f4779bc6f02e 100644 --- a/src/CostManagement/test/Az.Cost-TestResults.xml +++ b/src/CostManagement/test/Az.Cost-TestResults.xml @@ -1,103 +1,103 @@  - - + + - + - + - + - - - + + + - + - + - - + + - + - + - - + + - + - + - + - + - + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + diff --git a/src/CostManagement/test/Get-AzCostManagementExport.Recording.json b/src/CostManagement/test/Get-AzCostManagementExport.Recording.json index 3ac4bf124863..8c587b73557f 100644 --- a/src/CostManagement/test/Get-AzCostManagementExport.Recording.json +++ b/src/CostManagement/test/Get-AzCostManagementExport.Recording.json @@ -6,7 +6,7 @@ "Content": null, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "97f0da57-48f6-467b-adb6-5fd16d723914" ], + "x-ms-client-request-id": [ "a3d1a493-26a8-4a52-8208-0fbd285d32a1" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,33 +21,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "d3ced201-c031-4168-8707-c383d2859480" ], - "x-ms-request-id": [ "e3a71680-5d99-40f2-82ec-7b8da1654c2f" ], - "x-ms-correlation-request-id": [ "5aba7bf9-9794-400f-ba71-3bbf82254a01" ], - "x-ms-client-request-id": [ "97f0da57-48f6-467b-adb6-5fd16d723914" ], + "session-id": [ "7a79246a-3f52-44f2-b629-21dfcd3cac72" ], + "x-ms-request-id": [ "c1a1f8d5-2748-4024-89cf-e4736e709d25" ], + "x-ms-correlation-request-id": [ "a0cfd64c-b052-4ecf-b529-07ff98840e55" ], + "x-ms-client-request-id": [ "a3d1a493-26a8-4a52-8208-0fbd285d32a1" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072820Z:5aba7bf9-9794-400f-ba71-3bbf82254a01" ], - "Date": [ "Sun, 05 Jul 2020 07:28:20 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091501Z:a0cfd64c-b052-4ecf-b529-07ff98840e55" ], + "Date": [ "Mon, 06 Jul 2020 09:15:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "21810" ], + "Content-Length": [ "23920" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}]}" + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan\",\"name\":\"export-u9yfan\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b1674994fd\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn\",\"name\":\"export-u9sfcn\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16952d046\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16a169690\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}]}" } }, - "Get-AzCostManagementExport+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+1": { + "Get-AzCostManagementExport+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "315286b0-abf8-4d06-ac07-288ea6032a97" ], + "x-ms-client-request-id": [ "764cecf8-d98d-4ec0-97f6-26f2ed2bebb2" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -62,33 +62,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "75479e09-5170-48fe-b6df-38dafd10e8e2" ], - "x-ms-request-id": [ "11dc620f-a7c3-4258-a515-c241aff751bf" ], - "x-ms-correlation-request-id": [ "bedeec0e-b42a-4628-a566-c7edd33b9e24" ], - "x-ms-client-request-id": [ "315286b0-abf8-4d06-ac07-288ea6032a97" ], + "session-id": [ "0ed6173b-7d65-4e2d-a50b-c68b9d5c6b8a" ], + "x-ms-request-id": [ "6a46d3c5-3839-43e3-a42e-309883d8ea6b" ], + "x-ms-correlation-request-id": [ "b10cd0f3-c0b3-4d83-aed6-0af45e8b9961" ], + "x-ms-client-request-id": [ "764cecf8-d98d-4ec0-97f6-26f2ed2bebb2" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072821Z:bedeec0e-b42a-4628-a566-c7edd33b9e24" ], - "Date": [ "Sun, 05 Jul 2020 07:28:21 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091503Z:b10cd0f3-c0b3-4d83-aed6-0af45e8b9961" ], + "Date": [ "Mon, 06 Jul 2020 09:15:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "863" ], + "Content-Length": [ "709" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" } }, - "Get-AzCostManagementExport+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+1": { + "Get-AzCostManagementExport+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "05f0782e-1f92-43d0-badf-73e026395e53" ], + "x-ms-client-request-id": [ "84680f60-2b7d-411b-aae4-9259983e57a8" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -103,33 +103,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "02eec517-25d8-4029-88d5-00e2bf348809" ], - "x-ms-request-id": [ "ddd69d9c-b830-41f4-88e0-cf1a52c15158" ], - "x-ms-correlation-request-id": [ "ce01842c-f8df-4432-b195-2f111c1b17e5" ], - "x-ms-client-request-id": [ "05f0782e-1f92-43d0-badf-73e026395e53" ], + "session-id": [ "7ac3047f-40ca-4cd3-9cdc-6ffc61f15623" ], + "x-ms-request-id": [ "b3158243-14b4-4ad5-bd11-4f2f015e5859" ], + "x-ms-correlation-request-id": [ "c279ea92-0d72-4f55-af84-7ac1393d4c92" ], + "x-ms-client-request-id": [ "84680f60-2b7d-411b-aae4-9259983e57a8" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072822Z:ce01842c-f8df-4432-b195-2f111c1b17e5" ], - "Date": [ "Sun, 05 Jul 2020 07:28:21 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091504Z:c279ea92-0d72-4f55-af84-7ac1393d4c92" ], + "Date": [ "Mon, 06 Jul 2020 09:15:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "863" ], + "Content-Length": [ "709" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" } }, - "Get-AzCostManagementExport+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+2": { + "Get-AzCostManagementExport+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "f1b7d4cd-87f2-4a39-9d1e-5d39486fbbb3" ], + "x-ms-client-request-id": [ "c9dc70b6-2123-4d49-ad74-65c31c6cfd5d" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -144,23 +144,23 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "95172e67-c0b2-4e17-90f7-102305a2e30e" ], - "x-ms-request-id": [ "63c4dda6-cd07-4daa-98c3-2f81c23bb8cf" ], - "x-ms-correlation-request-id": [ "8a5e54c9-4e82-46cd-8fbb-98470b3d573c" ], - "x-ms-client-request-id": [ "f1b7d4cd-87f2-4a39-9d1e-5d39486fbbb3" ], + "session-id": [ "14e26877-5709-4eb2-a05e-96ae71a99999" ], + "x-ms-request-id": [ "dc595b73-e14b-453b-b549-6d9a27d3e103" ], + "x-ms-correlation-request-id": [ "f3b4f70c-c7c4-4fa2-b30d-63347d4aa542" ], + "x-ms-client-request-id": [ "c9dc70b6-2123-4d49-ad74-65c31c6cfd5d" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T072823Z:8a5e54c9-4e82-46cd-8fbb-98470b3d573c" ], - "Date": [ "Sun, 05 Jul 2020 07:28:22 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091505Z:f3b4f70c-c7c4-4fa2-b30d-63347d4aa542" ], + "Date": [ "Mon, 06 Jul 2020 09:15:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "863" ], + "Content-Length": [ "709" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" } } } \ No newline at end of file diff --git a/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json index ffc41b71a784..ce6954d8300c 100644 --- a/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json +++ b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Recording.json @@ -1,12 +1,12 @@ { - "Get-AzCostManagementExportExecutionHistory+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/runHistory?api-version=2019-11-01+1": { + "Get-AzCostManagementExportExecutionHistory+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/runHistory?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "01ae81a0-0ec4-4553-bdcf-db1d52c0ab6b" ], + "x-ms-client-request-id": [ "2a0a5bf2-9b76-420d-a8ea-9d9699448e89" ], "CommandName": [ "Get-AzCostManagementExportExecutionHistory" ], "FullCommandName": [ "Get-AzCostManagementExportExecutionHistory_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,23 +21,105 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "6402746e-153b-4d7a-8c12-eae907ab014c" ], - "x-ms-request-id": [ "0845b9a7-88dd-4bf6-9b58-f7fc66473a05" ], - "x-ms-correlation-request-id": [ "f4b904f4-db8a-46ba-a758-854bf7b669a1" ], - "x-ms-client-request-id": [ "01ae81a0-0ec4-4553-bdcf-db1d52c0ab6b" ], + "session-id": [ "f6325027-63a8-44da-bac4-eb3b1fc4edaa" ], + "x-ms-request-id": [ "e93206c3-a347-431f-baf8-a4322f8f77c4" ], + "x-ms-correlation-request-id": [ "b98e6547-5487-444d-9ffb-f603326e2313" ], + "x-ms-client-request-id": [ "2a0a5bf2-9b76-420d-a8ea-9d9699448e89" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073717Z:f4b904f4-db8a-46ba-a758-854bf7b669a1" ], - "Date": [ "Sun, 05 Jul 2020 07:37:16 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091524Z:b98e6547-5487-444d-9ffb-f603326e2313" ], + "Date": [ "Mon, 06 Jul 2020 09:15:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "4255" ], + "Content-Length": [ "934" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/9872b773-44de-475c-8d2b-fcd96aba976a\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-01T12:03:15.4047733Z\",\"processingStartTime\":\"2020-07-01T12:03:15.4047733Z\",\"processingEndTime\":\"2020-07-01T12:03:26.6235717Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_9872b773-44de-475c-8d2b-fcd96aba976a.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/a4d1dd0e-a642-4cd7-8b3f-f2c8a1fd69e1\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-02T12:05:33.1096023Z\",\"processingStartTime\":\"2020-07-02T12:05:33.1096023Z\",\"processingEndTime\":\"2020-07-02T12:05:44.3974901Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_a4d1dd0e-a642-4cd7-8b3f-f2c8a1fd69e1.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/c3db74b5-a5d0-4a8f-a0e9-afb344df6a26\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-03T12:08:32.5381073Z\",\"processingStartTime\":\"2020-07-03T12:08:32.5381073Z\",\"processingEndTime\":\"2020-07-03T12:08:43.9167209Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_c3db74b5-a5d0-4a8f-a0e9-afb344df6a26.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/Run/34d3c3a6-4565-4aa0-9aa9-6dbd7b780f4d\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}},\"executionType\":\"Scheduled\",\"status\":\"Failed\",\"submittedBy\":\"System\",\"submittedTime\":\"2020-07-04T12:07:49.5569837Z\",\"processingStartTime\":\"2020-07-04T12:07:49.5569837Z\",\"processingEndTime\":\"2020-07-04T12:08:01.4788868Z\",\"fileName\":\"ad-hoc/export-xjsoqu/20200701-20200731/export-xjsoqu_34d3c3a6-4565-4aa0-9aa9-6dbd7b780f4d.csv\"}}]}" + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/Run/359a6e8b-abcf-45e3-aecf-b9ff3d4fc760\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}},\"executionType\":\"OnDemand\",\"status\":\"Completed\",\"submittedBy\":\"v-diya@microsoft.com\",\"submittedTime\":\"2020-07-06T09:13:09.3467006Z\",\"processingStartTime\":\"2020-07-06T09:13:11.7355631Z\",\"processingEndTime\":\"2020-07-06T09:14:13.9746936Z\",\"fileName\":\"ad-hoc/export-38we0i/20200701-20200731/export-38we0i_359a6e8b-abcf-45e3-aecf-b9ff3d4fc760.csv\"}}]}" + } + }, + "Get-AzCostManagementExportExecutionHistory+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "d22920aa-bfa5-4531-b17e-7e6005a2fb7a" ], + "CommandName": [ "Get-AzCostManagementExport" ], + "FullCommandName": [ "Get-AzCostManagementExport_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "0709d528-7606-42af-b2d3-b17281e8b216" ], + "x-ms-request-id": [ "8c702ba6-09bc-4620-b7e0-1a602ef61a00" ], + "x-ms-correlation-request-id": [ "a37c5acd-2082-43e9-bd8c-e0dadb5dd53f" ], + "x-ms-client-request-id": [ "d22920aa-bfa5-4531-b17e-7e6005a2fb7a" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091526Z:a37c5acd-2082-43e9-bd8c-e0dadb5dd53f" ], + "Date": [ "Mon, 06 Jul 2020 09:15:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "709" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" + } + }, + "Get-AzCostManagementExportExecutionHistory+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "8e58532d-a286-4a8c-a0b1-b0d4c2f71b9b" ], + "CommandName": [ "Get-AzCostManagementExportExecutionHistory" ], + "FullCommandName": [ "Get-AzCostManagementExportExecutionHistory_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "cb1ec8fb-ecd1-413a-b855-dcb25d7e919c" ], + "x-ms-request-id": [ "2d05bda6-0934-4177-9254-6ea7b56d8b7d" ], + "x-ms-correlation-request-id": [ "47e339ab-943c-4c5a-ac20-f3c20e8cf4d0" ], + "x-ms-client-request-id": [ "8e58532d-a286-4a8c-a0b1-b0d4c2f71b9b" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091527Z:47e339ab-943c-4c5a-ac20-f3c20e8cf4d0" ], + "Date": [ "Mon, 06 Jul 2020 09:15:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "934" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/Run/359a6e8b-abcf-45e3-aecf-b9ff3d4fc760\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}},\"executionType\":\"OnDemand\",\"status\":\"Completed\",\"submittedBy\":\"v-diya@microsoft.com\",\"submittedTime\":\"2020-07-06T09:13:09.3467006Z\",\"processingStartTime\":\"2020-07-06T09:13:11.7355631Z\",\"processingEndTime\":\"2020-07-06T09:14:13.9746936Z\",\"fileName\":\"ad-hoc/export-38we0i/20200701-20200731/export-38we0i_359a6e8b-abcf-45e3-aecf-b9ff3d4fc760.csv\"}}]}" } } } \ No newline at end of file diff --git a/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 index bec242c0f09a..097cf9606605 100644 --- a/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 +++ b/src/CostManagement/test/Get-AzCostManagementExportExecutionHistory.Tests.ps1 @@ -13,13 +13,13 @@ while(-not $mockingPath) { Describe 'Get-AzCostManagementExportExecutionHistory' { It 'Get' { - { Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 } | Should -Not -Throw + $exportHist = Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 + $exportHist.Count | Should -Be 1 } - It 'GetViaIdentity' -skip { - # An exception "Invalid identity for URI '/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory'" was thrown - # TODO: The issue fix + It 'GetViaIdentity' { $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 - { Get-AzCostManagementExportExecutionHistory -InputObject $export} | Should -Not -Throw + $exportHist = Get-AzCostManagementExportExecutionHistory -InputObject $export + $exportHist.Count | Should -Be 1 } } diff --git a/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json index 7058cd2dd8a1..68ea94ef94e2 100644 --- a/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json +++ b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Recording.json @@ -1,12 +1,12 @@ { - "Invoke-AzCostManagementExecuteExport+[NoContext]+Execute+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01+1": { + "Invoke-AzCostManagementExecuteExport+[NoContext]+Execute+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/run?api-version=2019-11-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/run?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "7b05e3e9-7f9f-4464-95f6-6ef2f614b7ba" ], + "x-ms-client-request-id": [ "aa5de09b-ef0e-4ea4-b4ee-f3c17259b778" ], "CommandName": [ "Invoke-AzCostManagementExecuteExport" ], "FullCommandName": [ "Invoke-AzCostManagementExecuteExport_Execute" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,16 +21,16 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "746447ca-a453-4376-9538-9deaeda88c74" ], - "x-ms-request-id": [ "2541fabb-c7d4-4fd4-a614-ac4c7185a7a0" ], - "x-ms-correlation-request-id": [ "0859307f-50fa-4b13-845c-547f1239ea1f" ], - "x-ms-client-request-id": [ "7b05e3e9-7f9f-4464-95f6-6ef2f614b7ba" ], + "session-id": [ "c5cfdf23-b5cf-4d5e-a72d-be4d96d9d4c7" ], + "x-ms-request-id": [ "415a06e2-5e88-4a14-a1ea-d6e42a98ea53" ], + "x-ms-correlation-request-id": [ "3f12b48f-92bd-4e6b-9787-1115afe8a6a7" ], + "x-ms-client-request-id": [ "aa5de09b-ef0e-4ea4-b4ee-f3c17259b778" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073747Z:0859307f-50fa-4b13-845c-547f1239ea1f" ], - "Date": [ "Sun, 05 Jul 2020 07:37:47 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091735Z:3f12b48f-92bd-4e6b-9787-1115afe8a6a7" ], + "Date": [ "Mon, 06 Jul 2020 09:17:35 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -39,14 +39,55 @@ "Content": null } }, - "Invoke-AzCostManagementExecuteExport+[NoContext]+ExecuteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01+1": { + "Invoke-AzCostManagementExecuteExport+[NoContext]+Execute+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "bf5e49b5-83b3-412e-b85d-eb872e6b98a9" ], + "x-ms-client-request-id": [ "59339ec2-05bd-469f-b15c-252dc532c76a" ], + "CommandName": [ "Get-AzCostManagementExportExecutionHistory" ], + "FullCommandName": [ "Get-AzCostManagementExportExecutionHistory_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "91923384-1eb0-49df-a7ac-0eedc372ae04" ], + "x-ms-request-id": [ "a95ba8c3-de6c-4f2e-87cf-9daab33d7ebb" ], + "x-ms-correlation-request-id": [ "8a6cbf6e-b118-4c5f-8277-4814220a0163" ], + "x-ms-client-request-id": [ "59339ec2-05bd-469f-b15c-252dc532c76a" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091736Z:8a6cbf6e-b118-4c5f-8277-4814220a0163" ], + "Date": [ "Mon, 06 Jul 2020 09:17:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1715" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/Run/359a6e8b-abcf-45e3-aecf-b9ff3d4fc760\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}},\"executionType\":\"OnDemand\",\"status\":\"Completed\",\"submittedBy\":\"v-diya@microsoft.com\",\"submittedTime\":\"2020-07-06T09:13:09.3467006Z\",\"processingStartTime\":\"2020-07-06T09:13:11.7355631Z\",\"processingEndTime\":\"2020-07-06T09:14:13.9746936Z\",\"fileName\":\"ad-hoc/export-38we0i/20200701-20200731/export-38we0i_359a6e8b-abcf-45e3-aecf-b9ff3d4fc760.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/Run/05d2edf7-74a0-4bf4-a28a-992fd9c7655e\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}},\"executionType\":\"OnDemand\",\"status\":\"InProgress\",\"submittedBy\":\"v-diya@microsoft.com\",\"submittedTime\":\"2020-07-06T09:17:34.6964397Z\",\"processingStartTime\":null,\"processingEndTime\":null,\"fileName\":null}}]}" + } + }, + "Invoke-AzCostManagementExecuteExport+[NoContext]+ExecuteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "d16ab7f1-1909-405c-b707-370048ec9171" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -61,33 +102,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "d7e52031-e951-4915-8ed4-07ccb5ef47d7" ], - "x-ms-request-id": [ "f5c911ae-9fe9-4b7b-8578-92ab775cd1cd" ], - "x-ms-correlation-request-id": [ "981b08c2-b0cf-4730-916f-9b1c5faaf373" ], - "x-ms-client-request-id": [ "bf5e49b5-83b3-412e-b85d-eb872e6b98a9" ], + "session-id": [ "97c945bd-2cc2-4707-96a4-86f5060f106b" ], + "x-ms-request-id": [ "4d27ae1c-d61a-453a-973b-8563c9a1bb54" ], + "x-ms-correlation-request-id": [ "a8f035cc-80ea-4935-8fe0-dbe58b44c180" ], + "x-ms-client-request-id": [ "d16ab7f1-1909-405c-b707-370048ec9171" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073748Z:981b08c2-b0cf-4730-916f-9b1c5faaf373" ], - "Date": [ "Sun, 05 Jul 2020 07:37:48 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091737Z:a8f035cc-80ea-4935-8fe0-dbe58b44c180" ], + "Date": [ "Mon, 06 Jul 2020 09:17:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "863" ], + "Content-Length": [ "709" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" } }, - "Invoke-AzCostManagementExecuteExport+[NoContext]+ExecuteViaIdentity+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01+2": { + "Invoke-AzCostManagementExecuteExport+[NoContext]+ExecuteViaIdentity+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/run?api-version=2019-11-01+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu/run?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/run?api-version=2019-11-01", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "73cf2e09-d437-4e91-98a5-d3f62e73b4d4" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "b98b569c-e163-4298-9790-6356cde0b285" ], "CommandName": [ "Invoke-AzCostManagementExecuteExport" ], "FullCommandName": [ "Invoke-AzCostManagementExecuteExport_ExecuteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -102,16 +143,16 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "750ebfe9-a251-4d22-a4d6-f707729ef31f" ], - "x-ms-request-id": [ "5dd11efd-0e8c-4c0f-abf6-6303ccaadb31" ], - "x-ms-correlation-request-id": [ "89fd801f-3aa1-4bdc-b4bf-e7a11ba7489e" ], - "x-ms-client-request-id": [ "73cf2e09-d437-4e91-98a5-d3f62e73b4d4" ], + "session-id": [ "18205cc1-ff38-4a95-9aef-c16dbbfc4988" ], + "x-ms-request-id": [ "35db35b8-a307-4e71-9ffe-5bf8301d5b8f" ], + "x-ms-correlation-request-id": [ "95da9561-b928-474a-bfd2-02a4996862b3" ], + "x-ms-client-request-id": [ "b98b569c-e163-4298-9790-6356cde0b285" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T073750Z:89fd801f-3aa1-4bdc-b4bf-e7a11ba7489e" ], - "Date": [ "Sun, 05 Jul 2020 07:37:49 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091738Z:95da9561-b928-474a-bfd2-02a4996862b3" ], + "Date": [ "Mon, 06 Jul 2020 09:17:38 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -119,5 +160,46 @@ }, "Content": null } + }, + "Invoke-AzCostManagementExecuteExport+[NoContext]+ExecuteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/runHistory?api-version=2019-11-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "f221456a-8398-45e0-a566-0ef1543db998" ], + "CommandName": [ "Get-AzCostManagementExportExecutionHistory" ], + "FullCommandName": [ "Get-AzCostManagementExportExecutionHistory_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "session-id": [ "a547d712-70dd-4121-8ffa-d39c2a97b2c6" ], + "x-ms-request-id": [ "0c86b83d-3d5c-412b-a5e1-6c5f51052e32" ], + "x-ms-correlation-request-id": [ "7bd97d1f-b0fe-4fba-95bf-bd1adfa3c10e" ], + "x-ms-client-request-id": [ "f221456a-8398-45e0-a566-0ef1543db998" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T091739Z:7bd97d1f-b0fe-4fba-95bf-bd1adfa3c10e" ], + "Date": [ "Mon, 06 Jul 2020 09:17:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2495" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/Run/359a6e8b-abcf-45e3-aecf-b9ff3d4fc760\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}},\"executionType\":\"OnDemand\",\"status\":\"Completed\",\"submittedBy\":\"v-diya@microsoft.com\",\"submittedTime\":\"2020-07-06T09:13:09.3467006Z\",\"processingStartTime\":\"2020-07-06T09:13:11.7355631Z\",\"processingEndTime\":\"2020-07-06T09:14:13.9746936Z\",\"fileName\":\"ad-hoc/export-38we0i/20200701-20200731/export-38we0i_359a6e8b-abcf-45e3-aecf-b9ff3d4fc760.csv\"}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/Run/05d2edf7-74a0-4bf4-a28a-992fd9c7655e\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}},\"executionType\":\"OnDemand\",\"status\":\"InProgress\",\"submittedBy\":\"v-diya@microsoft.com\",\"submittedTime\":\"2020-07-06T09:17:34.6964397Z\",\"processingStartTime\":null,\"processingEndTime\":null,\"fileName\":null}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i/Run/93ffc801-3f72-4485-9dd7-a39dfa22d130\",\"name\":null,\"type\":null,\"eTag\":null,\"properties\":{\"runSettings\":{\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}},\"executionType\":\"OnDemand\",\"status\":\"InProgress\",\"submittedBy\":\"v-diya@microsoft.com\",\"submittedTime\":\"2020-07-06T09:17:38.009024Z\",\"processingStartTime\":null,\"processingEndTime\":null,\"fileName\":null}}]}" + } } } \ No newline at end of file diff --git a/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 index 65506c7758fe..8dac196657d4 100644 --- a/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 +++ b/src/CostManagement/test/Invoke-AzCostManagementExecuteExport.Tests.ps1 @@ -13,13 +13,15 @@ while(-not $mockingPath) { Describe 'Invoke-AzCostManagementExecuteExport' { It 'Execute' { - { Invoke-AzCostManagementExecuteExport -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 } | Should -Not -Throw + Invoke-AzCostManagementExecuteExport -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 + $exportHist = Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 + $exportHist.Count | Should -Be 2 } It 'ExecuteViaIdentity' { - { - $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 - Invoke-AzCostManagementExecuteExport -InputObject $export - } | Should -Not -Throw + $export = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName01 + Invoke-AzCostManagementExecuteExport -InputObject $export + $exportHist = Get-AzCostManagementExportExecutionHistory -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 + $exportHist.Count | Should -Be 3 } } diff --git a/src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 b/src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 index 2b76c44cdf15..ff8cb625bb70 100644 --- a/src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 +++ b/src/CostManagement/test/Invoke-AzCostManagementUsageQuery.Tests.ps1 @@ -12,8 +12,9 @@ while(-not $mockingPath) { . ($mockingPath | Select-Object -First 1).FullName Describe 'Invoke-AzCostManagementUsageQuery' { - It 'UsageExpanded' { - #Import-Module -Name D:\azure-service\_AzurePowershellTest\azure-powershell\src\CostManagement\generated\modules\Az.Accounts\1.9.0 -Verbose - { Invoke-AzCostManagementUsageQuery -Scope "subscriptions/$($env.SubscriptionId)" -Timeframe MonthToDate -Type Usage -DatasetGranularity 'daily' } | Should -Not -Throw + It 'UsageExpanded' -Skip { + # The record file not generated, Because using Invoke-AzRest when call Invoke-AzCostManagementUsageQuery. + # TODO: When Invoke-AzRest support record model. + { Invoke-AzCostManagementUsageQuery -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Timeframe MonthToDate -Type Usage -DatasetGranularity 'daily' } | Should -Not -Throw } } diff --git a/src/CostManagement/test/New-AzCostManagementExport.Recording.json b/src/CostManagement/test/New-AzCostManagementExport.Recording.json index 1a625747fa01..72dac9c415b5 100644 --- a/src/CostManagement/test/New-AzCostManagementExport.Recording.json +++ b/src/CostManagement/test/New-AzCostManagementExport.Recording.json @@ -1,14 +1,14 @@ { - "New-AzCostManagementExport+[NoContext]+CreateExpandedBySubscription+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan?api-version=2019-11-01+1": { + "New-AzCostManagementExport+[NoContext]+CreateExpandedBySubscription+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-r6xjol?api-version=2019-11-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan?api-version=2019-11-01", - "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-r6xjol?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-06T09:13:02.0000000\",\n \"to\": \"2020-07-26T09:13:02.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "692" ] + "Content-Length": [ "700" ] } }, "Response": { @@ -16,36 +16,36 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan?api-version=2019-11-01" ], - "session-id": [ "cfb63150-2aaf-4a17-944a-cd57dfa17017" ], - "x-ms-request-id": [ "77a3fa40-a932-40be-8c4f-bdc835ee6192" ], - "x-ms-correlation-request-id": [ "3bfd7cc7-659d-408c-9780-54669ef881cd" ], - "x-ms-client-request-id": [ "fd0d08a0-69f9-47e2-b6a7-0c109574e526" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-r6xjol?api-version=2019-11-01" ], + "session-id": [ "361a8dc7-600f-48f9-b480-814e2805b158" ], + "x-ms-request-id": [ "9b7c7f17-026c-4665-9b68-c7351118fabf" ], + "x-ms-correlation-request-id": [ "940aeece-adb9-45a5-b838-c40fbf9395fd" ], + "x-ms-client-request-id": [ "82d6e05b-9aeb-4b1e-a93d-dcad8420be2d" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094815Z:3bfd7cc7-659d-408c-9780-54669ef881cd" ], - "Date": [ "Sun, 05 Jul 2020 09:48:15 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092243Z:940aeece-adb9-45a5-b838-c40fbf9395fd" ], + "Date": [ "Mon, 06 Jul 2020 09:22:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "701" ], + "Content-Length": [ "709" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan\",\"name\":\"export-u9yfan\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b1674994fd\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-r6xjol\",\"name\":\"export-r6xjol\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377005b37c6\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" } }, - "New-AzCostManagementExport+[NoContext]+CreateExpandedByResourceGroup+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01+1": { + "New-AzCostManagementExport+[NoContext]+CreateExpandedByResourceGroup+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5?api-version=2019-11-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01", - "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-06T09:13:02.0000000\",\n \"to\": \"2020-07-26T09:13:02.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "692" ] + "Content-Length": [ "700" ] } }, "Response": { @@ -53,36 +53,36 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01" ], - "session-id": [ "5205b9b5-d0c8-408d-b962-cd022955456a" ], - "x-ms-request-id": [ "96e99633-1517-4945-b4e1-b85f33551742" ], - "x-ms-correlation-request-id": [ "02576bb9-e429-4ada-8505-2d67cbf27535" ], - "x-ms-client-request-id": [ "5e708a6f-774e-4f10-b506-3b50cf0d9b6e" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5?api-version=2019-11-01" ], + "session-id": [ "5b9bb6b5-cc5f-49fc-9af1-aef16afed5ec" ], + "x-ms-request-id": [ "91135221-6de8-4fbe-b4f0-7b0d6c122e40" ], + "x-ms-correlation-request-id": [ "4f2fc077-2b2f-4705-88a4-ee1329c3ea32" ], + "x-ms-client-request-id": [ "8e5a1cc5-b5af-426f-a6d6-d0bd1fd02884" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094817Z:02576bb9-e429-4ada-8505-2d67cbf27535" ], - "Date": [ "Sun, 05 Jul 2020 09:48:16 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092244Z:4f2fc077-2b2f-4705-88a4-ee1329c3ea32" ], + "Date": [ "Mon, 06 Jul 2020 09:22:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "734" ], + "Content-Length": [ "749" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb\",\"name\":\"export-casdkb\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16873a723\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5\",\"name\":\"export-rs3qh5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377017c569f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" } }, - "New-AzCostManagementExport+[NoContext]+CreateExpandedByColumn+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01+1": { + "New-AzCostManagementExport+[NoContext]+CreateExpandedByColumn+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-ni0ar2?api-version=2019-11-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01", - "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"configuration\": {\n \"columns\": [ \"SubscriptionGuid\", \"MeterId\", \"InstanceId\", \"ResourceGroup\", \"PreTaxCost\" ]\n },\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-ni0ar2?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"configuration\": {\n \"columns\": [ \"SubscriptionGuid\", \"MeterId\", \"InstanceId\", \"ResourceGroup\", \"PreTaxCost\" ]\n },\n \"granularity\": \"Daily\"\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-06T09:13:02.0000000\",\n \"to\": \"2020-07-26T09:13:02.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "830" ] + "Content-Length": [ "838" ] } }, "Response": { @@ -90,36 +90,36 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01" ], - "session-id": [ "a9849fa7-1a74-4ed4-bfb9-d122ed9e7805" ], - "x-ms-request-id": [ "93613507-770b-402e-a7fb-6a9b2ff414c9" ], - "x-ms-correlation-request-id": [ "38f97bcd-2b08-49db-bd81-6f576c5ce892" ], - "x-ms-client-request-id": [ "041c4b07-8cdf-4bde-915a-aa58d6212e78" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-ni0ar2?api-version=2019-11-01" ], + "session-id": [ "c0a0fcfb-517c-40b0-abfd-74a6fd6f5350" ], + "x-ms-request-id": [ "960a8d4b-ac23-4895-959a-b2c77f6fd30f" ], + "x-ms-correlation-request-id": [ "cdd904bf-1506-42f0-a6e7-f373594a55f9" ], + "x-ms-client-request-id": [ "95a913d0-9eb2-44b7-a4fc-bfb725432239" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094818Z:38f97bcd-2b08-49db-bd81-6f576c5ce892" ], - "Date": [ "Sun, 05 Jul 2020 09:48:18 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092246Z:cdd904bf-1506-42f0-a6e7-f373594a55f9" ], + "Date": [ "Mon, 06 Jul 2020 09:22:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "802" ], + "Content-Length": [ "810" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn\",\"name\":\"export-u9sfcn\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16952d046\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-ni0ar2\",\"name\":\"export-ni0ar2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d6537702554d6a\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}}" } }, - "New-AzCostManagementExport+[NoContext]+CreateExpandedByGroup+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg?api-version=2019-11-01+1": { + "New-AzCostManagementExport+[NoContext]+CreateExpandedByGroup+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-gq1kft?api-version=2019-11-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg?api-version=2019-11-01", - "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\",\n \"grouping\": [\n {\n \"name\": \"ResourceGroup\",\n \"type\": \"Dimension\"\n }\n ]\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-05T07:41:32.0000000\",\n \"to\": \"2020-07-21T07:41:32.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-gq1kft?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"granularity\": \"Daily\",\n \"grouping\": [\n {\n \"name\": \"ResourceGroup\",\n \"type\": \"Dimension\"\n }\n ]\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-06T09:13:02.0000000\",\n \"to\": \"2020-07-26T09:13:02.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "818" ] + "Content-Length": [ "826" ] } }, "Response": { @@ -127,24 +127,61 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg?api-version=2019-11-01" ], - "session-id": [ "acf95922-6105-4457-97d4-5a7df43183a4" ], - "x-ms-request-id": [ "7df81394-8084-461f-b968-8f2e46502df6" ], - "x-ms-correlation-request-id": [ "8e7cabcc-e5db-4a53-a21e-f94d35b43e4c" ], - "x-ms-client-request-id": [ "8103296c-201d-47cb-be53-61fd0e28a22c" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-gq1kft?api-version=2019-11-01" ], + "session-id": [ "bbebf88b-bfaf-4862-9452-ac4c1d301006" ], + "x-ms-request-id": [ "605da652-113d-459e-9b0a-844f85d8e68f" ], + "x-ms-correlation-request-id": [ "655498cc-40ac-4af0-b979-37f07a1d8009" ], + "x-ms-client-request-id": [ "609dabb6-22f5-432c-8116-44ceff4f8782" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T094819Z:8e7cabcc-e5db-4a53-a21e-f94d35b43e4c" ], - "Date": [ "Sun, 05 Jul 2020 09:48:19 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092248Z:655498cc-40ac-4af0-b979-37f07a1d8009" ], + "Date": [ "Mon, 06 Jul 2020 09:22:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "758" ], + "Content-Length": [ "766" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16a169690\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-gq1kft\",\"name\":\"export-gq1kft\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d6537703972b88\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" + } + }, + "New-AzCostManagementExport+[NoContext]+CreateExpandedByGroupAggregation+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-j8s5of?api-version=2019-11-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-j8s5of?api-version=2019-11-01", + "Content": "{\n \"properties\": {\n \"definition\": {\n \"dataset\": {\n \"aggregation\": {\n \"costsum\": {\n \"name\": \"PreTaxCost\",\n \"function\": \"sum\"\n },\n \"cost\": {\n \"name\": \"Cost\",\n \"function\": \"sum\"\n }\n },\n \"granularity\": \"Daily\",\n \"grouping\": [\n {\n \"name\": \"ResourceGroup\",\n \"type\": \"Dimension\"\n }\n ]\n },\n \"type\": \"Usage\",\n \"timeframe\": \"MonthToDate\"\n },\n \"deliveryInfo\": {\n \"destination\": {\n \"container\": \"exports\",\n \"resourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\n \"rootFolderPath\": \"ad-hoc\"\n }\n },\n \"format\": \"Csv\",\n \"schedule\": {\n \"recurrencePeriod\": {\n \"from\": \"2020-07-06T09:13:02.0000000\",\n \"to\": \"2020-07-26T09:13:02.0000000\"\n },\n \"recurrence\": \"Daily\",\n \"status\": \"Active\"\n }\n }\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "1052" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://consumption.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-j8s5of?api-version=2019-11-01" ], + "session-id": [ "f4257420-e658-4922-8a45-5070a7a873f9" ], + "x-ms-request-id": [ "bcbee889-01b3-4622-9367-79d39cc4209e" ], + "x-ms-correlation-request-id": [ "c33b1ea7-0200-4131-ba5e-ce80b54e9f22" ], + "x-ms-client-request-id": [ "61711854-579b-4158-ac78-77280128fe03" ], + "Access-Control-Allow-Origin": [ "*" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092249Z:c33b1ea7-0200-4131-ba5e-ce80b54e9f22" ], + "Date": [ "Mon, 06 Jul 2020 09:22:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "871" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-j8s5of\",\"name\":\"export-j8s5of\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377046dbf7c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}" } } } \ No newline at end of file diff --git a/src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 b/src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 index dd29c26da390..767e806850c8 100644 --- a/src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 +++ b/src/CostManagement/test/New-AzCostManagementExport.Tests.ps1 @@ -20,6 +20,7 @@ Describe 'New-AzCostManagementExport' { -DestinationResourceId $env.storageAccountId ` -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` -DatasetGranularity "Daily" + $export.ScheduleStatus | Should -Be 'Active' } It 'CreateExpandedByResourceGroup' { @@ -30,6 +31,7 @@ Describe 'New-AzCostManagementExport' { -DestinationResourceId $env.storageAccountId ` -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` -DatasetGranularity "Daily" + $export.ScheduleStatus | Should -Be 'Active' } It 'CreateExpandedByColumn' { @@ -40,6 +42,7 @@ Describe 'New-AzCostManagementExport' { -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` -DatasetGranularity "Daily" ` -ConfigurationColumn @('SubscriptionGuid', 'MeterId', 'InstanceId', 'ResourceGroup', 'PreTaxCost') + $export.ScheduleStatus | Should -Be 'Active' } @@ -51,25 +54,25 @@ Describe 'New-AzCostManagementExport' { -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` -DatasetGranularity "Daily" ` -DatasetGrouping @(@{type='Dimension'; name='ResourceGroup'}) + $export.ScheduleStatus | Should -Be 'Active' } - It 'CreateExpandedByGroupAggregation' -skip { + It 'CreateExpandedByGroupAggregation' { #Group Aggregation: Created successfully, No data generated in the storage account - #TODO: The issue fix - <# $Aggregation1 = @{ name = 'PreTaxCost'; function='sum'} $Aggregation2 = @{ name = 'Cost'; function='sum'} $AggregationDict = @{costsum=$aggregation1; cost=$aggregation2} - New-AzCostManagementExport -Debug -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Name "ps-groupaggregation-t" ` - -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-06-29T13:00:00Z" ` - -RecurrencePeriodTo "2020-07-01T00:00:00Z" -Format "Csv" ` - -DestinationResourceId "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount" ` + $export = New-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName06 ` + -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom $env.fromDate ` + -RecurrencePeriodTo $env.toDate -Format "Csv" ` + -DestinationResourceId $env.storageAccountId ` -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" ` -DatasetGranularity "Daily" ` -DatasetGrouping @(@{type='Dimension'; name='ResourceGroup'}) ` -DatasetAggregation $AggregationDict - #> + + $export.ScheduleStatus | Should -Be 'Active' } It 'CreateExpandedByFilter' -skip { diff --git a/src/CostManagement/test/Remove-AzCostManagementExport.Recording.json b/src/CostManagement/test/Remove-AzCostManagementExport.Recording.json index 4938acb85d61..76df2901aa3e 100644 --- a/src/CostManagement/test/Remove-AzCostManagementExport.Recording.json +++ b/src/CostManagement/test/Remove-AzCostManagementExport.Recording.json @@ -1,12 +1,12 @@ { - "Remove-AzCostManagementExport+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01+1": { + "Remove-AzCostManagementExport+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-ni0ar2?api-version=2019-11-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-ni0ar2?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "70c3dc81-00cc-4354-9ddc-eb528e8eb69e" ], + "x-ms-client-request-id": [ "535649f7-37d1-411b-9b2f-dcbf463cfdbb" ], "CommandName": [ "Remove-AzCostManagementExport" ], "FullCommandName": [ "Remove-AzCostManagementExport_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,16 +21,16 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "bf157bf3-ef8d-4f79-96a7-0e11d61bc2db" ], - "x-ms-request-id": [ "488aa216-519e-4b76-a448-ac5c50998601" ], - "x-ms-correlation-request-id": [ "9488ab48-167a-4fed-a057-cb7b7d2189ff" ], - "x-ms-client-request-id": [ "70c3dc81-00cc-4354-9ddc-eb528e8eb69e" ], + "session-id": [ "f9232219-c998-4ac6-bcf9-e01d0a7305cf" ], + "x-ms-request-id": [ "449a95a0-8a08-4a14-9f3f-22b448eac6d1" ], + "x-ms-correlation-request-id": [ "6013e0f6-10b6-4e53-8f27-7239a2a1e8ef" ], + "x-ms-client-request-id": [ "535649f7-37d1-411b-9b2f-dcbf463cfdbb" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092951Z:9488ab48-167a-4fed-a057-cb7b7d2189ff" ], - "Date": [ "Sun, 05 Jul 2020 09:29:50 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092523Z:6013e0f6-10b6-4e53-8f27-7239a2a1e8ef" ], + "Date": [ "Mon, 06 Jul 2020 09:25:22 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -46,7 +46,7 @@ "Content": null, "Headers": { "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "d4176122-55c7-47e2-ab56-bcde6f977cf0" ], + "x-ms-client-request-id": [ "739c6edc-d378-45e9-8acd-1b1ddac54c8e" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -61,33 +61,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "50761477-8ad9-4a9a-a519-c69d1d58b66f" ], - "x-ms-request-id": [ "e5a52a24-4659-4f2d-a600-19e08a06270c" ], - "x-ms-correlation-request-id": [ "fe07a81d-0cd1-4b8a-b0db-7d50eabcde95" ], - "x-ms-client-request-id": [ "d4176122-55c7-47e2-ab56-bcde6f977cf0" ], + "session-id": [ "c675f856-4636-483c-8aaa-768eea00264d" ], + "x-ms-request-id": [ "ce4d168e-38f6-4461-9cd6-edbe683ad303" ], + "x-ms-correlation-request-id": [ "fe419d55-604d-43b3-b298-c88e63feee47" ], + "x-ms-client-request-id": [ "739c6edc-d378-45e9-8acd-1b1ddac54c8e" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092952Z:fe07a81d-0cd1-4b8a-b0db-7d50eabcde95" ], - "Date": [ "Sun, 05 Jul 2020 09:29:51 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092524Z:fe419d55-604d-43b3-b298-c88e63feee47" ], + "Date": [ "Mon, 06 Jul 2020 09:25:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "22569" ], + "Content-Length": [ "26269" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652ae782924c5\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}]}" + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan\",\"name\":\"export-u9yfan\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b1674994fd\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn\",\"name\":\"export-u9sfcn\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16952d046\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16a169690\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-r6xjol\",\"name\":\"export-r6xjol\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377005b37c6\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-gq1kft\",\"name\":\"export-gq1kft\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d6537703972b88\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-j8s5of\",\"name\":\"export-j8s5of\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377046dbf7c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}]}" } }, - "Remove-AzCostManagementExport+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01+1": { + "Remove-AzCostManagementExport+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5?api-version=2019-11-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "db630e7b-73f7-4fa0-ae36-7f0896f87e9e" ], + "x-ms-client-request-id": [ "6684dacb-2030-4120-b7ad-a486167d3886" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -102,33 +102,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "10e25170-56b0-4647-8e6f-2da9dd45c1f9" ], - "x-ms-request-id": [ "4a50676c-d47e-4a77-9e4a-048e865da055" ], - "x-ms-correlation-request-id": [ "2739f789-5a4b-4319-9696-47bb8d141b2f" ], - "x-ms-client-request-id": [ "db630e7b-73f7-4fa0-ae36-7f0896f87e9e" ], + "session-id": [ "921183df-cf9f-4104-92ee-3700f5e8aaed" ], + "x-ms-request-id": [ "4a734a96-b3e1-4b92-92e1-578039584923" ], + "x-ms-correlation-request-id": [ "01e6de87-94af-4c75-a3b9-385c9e3cf165" ], + "x-ms-client-request-id": [ "6684dacb-2030-4120-b7ad-a486167d3886" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092952Z:2739f789-5a4b-4319-9696-47bb8d141b2f" ], - "Date": [ "Sun, 05 Jul 2020 09:29:51 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092524Z:01e6de87-94af-4c75-a3b9-385c9e3cf165" ], + "Date": [ "Mon, 06 Jul 2020 09:25:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "734" ], + "Content-Length": [ "749" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb\",\"name\":\"export-casdkb\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652ae768ba951\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" + "Content": "{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5\",\"name\":\"export-rs3qh5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377017c569f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}}" } }, - "Remove-AzCostManagementExport+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01+2": { + "Remove-AzCostManagementExport+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5?api-version=2019-11-01+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.CostManagement/exports/export-casdkb?api-version=2019-11-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.CostManagement/exports/export-rs3qh5?api-version=2019-11-01", "Content": null, "Headers": { "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "9a198a91-bc46-4369-a685-1274a6d2b3e8" ], + "x-ms-client-request-id": [ "8f26b1f2-b17c-4913-9c9f-b47b54502d30" ], "CommandName": [ "Remove-AzCostManagementExport" ], "FullCommandName": [ "Remove-AzCostManagementExport_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -143,16 +143,16 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "92e3deff-c3bd-438c-a36a-4dac026b8410" ], - "x-ms-request-id": [ "5bda0f3d-5195-42db-b0e5-ba430de97717" ], - "x-ms-correlation-request-id": [ "8142bde1-0afe-4141-a839-9837faeed195" ], - "x-ms-client-request-id": [ "9a198a91-bc46-4369-a685-1274a6d2b3e8" ], + "session-id": [ "a75be8a6-2f8d-4b2e-b75e-29756e8e9e85" ], + "x-ms-request-id": [ "007defc8-ccf3-448e-b9f3-e3bb81ee6669" ], + "x-ms-correlation-request-id": [ "58d53028-e64b-4974-8365-dafd4fb3e6a0" ], + "x-ms-client-request-id": [ "8f26b1f2-b17c-4913-9c9f-b47b54502d30" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092953Z:8142bde1-0afe-4141-a839-9837faeed195" ], - "Date": [ "Sun, 05 Jul 2020 09:29:52 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092525Z:58d53028-e64b-4974-8365-dafd4fb3e6a0" ], + "Date": [ "Mon, 06 Jul 2020 09:25:25 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -168,7 +168,7 @@ "Content": null, "Headers": { "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "a75bc91a-c175-4df7-b856-78bcd47d61eb" ], + "x-ms-client-request-id": [ "c3d09aa8-5731-4964-b862-f658e5146650" ], "CommandName": [ "Get-AzCostManagementExport" ], "FullCommandName": [ "Get-AzCostManagementExport_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -183,23 +183,23 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "session-id": [ "51721512-f98c-43b1-bf13-3ff31bd57ed3" ], - "x-ms-request-id": [ "e09d5a92-3c51-4e04-bc05-353bdb73d242" ], - "x-ms-correlation-request-id": [ "950d0086-7b09-4729-a109-d9cac9297898" ], - "x-ms-client-request-id": [ "a75bc91a-c175-4df7-b856-78bcd47d61eb" ], + "session-id": [ "dff4aa38-f47b-4de1-80db-0ead27b421e9" ], + "x-ms-request-id": [ "e4d4e2ab-31c3-4367-bef5-05faaf81dc4a" ], + "x-ms-correlation-request-id": [ "d964c677-9edf-44a7-a2fd-e1857cd728f7" ], + "x-ms-client-request-id": [ "c3d09aa8-5731-4964-b862-f658e5146650" ], "Access-Control-Allow-Origin": [ "*" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200705T092954Z:950d0086-7b09-4729-a109-d9cac9297898" ], - "Date": [ "Sun, 05 Jul 2020 09:29:53 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200706T092526Z:d964c677-9edf-44a7-a2fd-e1857cd728f7" ], + "Date": [ "Mon, 06 Jul 2020 09:25:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "22569" ], + "Content-Length": [ "26269" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-xjsoqu\",\"name\":\"export-xjsoqu\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64f7b0dcfd26e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-01T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652ae782924c5\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}]}" + "Content": "{\"value\":[{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport\",\"name\":\"TestExport\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb46c1f5154\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T00:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport1\",\"name\":\"TestExport1\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d63fb4a3f75019\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-11T20:00:00+00:00\",\"to\":\"2020-06-20T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport2\",\"name\":\"TestExport2\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f5dda56551\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport3\",\"name\":\"TestExport3\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6069c44bb\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport4\",\"name\":\"TestExport4\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6425d3647\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport5\",\"name\":\"TestExport5\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f679d78775\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\"}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport6\",\"name\":\"TestExport6\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f6b27ba29f\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T02\",\"name\":\"LucasExport-T02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f8ec7b1149\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExport-T03\",\"name\":\"LucasExport-T03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f918708873\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-25T20:00:00+00:00\",\"to\":\"2020-06-29T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/LucasExportT06\",\"name\":\"LucasExportT06\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649f9d2f5df21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-27T20:00:00+00:00\",\"to\":\"2020-06-28T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t01\",\"name\":\"ps-costext-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d649ff52ae2bb7\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-24T00:00:00+00:00\",\"to\":\"2020-06-26T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t02\",\"name\":\"ps-costext-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d16faa5d7b4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T00:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-costext-t03\",\"name\":\"ps-costext-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1be92e19a4\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:45:28\",\"to\":\"2020-07-18T07:15:28\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azureps-manual-test/providers/Microsoft.Storage/storageAccounts/lucascostmanagement\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportws5qlv\",\"name\":\"exportws5qlv\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64d1d1164c9ac\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-28T07:53:46\",\"to\":\"2020-07-18T07:23:46\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmkjhje\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t01\",\"name\":\"manual-export-t01\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd725acbcdf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T20:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/manual-export-t02\",\"name\":\"manual-export-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dd8071bf283\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/exportinfo-ps-t\",\"name\":\"exportinfo-ps-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda275a663c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t\",\"name\":\"ps-exportall-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dda37395609\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-customcolum-t\",\"name\":\"ps-customcolum-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddad337a774\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-aggregation-t\",\"name\":\"ps-aggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddb7d30c57d\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-group-t\",\"name\":\"ps-group-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64ddd2f00c7aa\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-groupaggregation-t\",\"name\":\"ps-groupaggregation-t\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d64dde4850e487\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-06-29T13:00:00+00:00\",\"to\":\"2020-07-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"},\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExport10\",\"name\":\"TestExport10\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650dd9b8ab46b\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/TestExportDatasetAggregation\",\"name\":\"TestExportDatasetAggregation\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d650e17ad92f21\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T20:00:00+00:00\",\"to\":\"2020-07-10T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-costmanagement/providers/Microsoft.Storage/storageAccounts/wyunchistorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t02\",\"name\":\"ps-exportall-t02\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d651104357293e\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/ps-exportall-t03\",\"name\":\"ps-exportall-t03\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65110a073dc56\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-03T08:00:00+00:00\",\"to\":\"2020-08-01T00:00:00+00:00\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/lucasstorageaccount\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9yfan\",\"name\":\"export-u9yfan\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b1674994fd\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-u9sfcn\",\"name\":\"export-u9sfcn\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16952d046\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"configuration\":{\"columns\":[\"SubscriptionGuid\",\"MeterId\",\"InstanceId\",\"ResourceGroup\",\"PreTaxCost\"]},\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-cf6scg\",\"name\":\"export-cf6scg\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d652b16a169690\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-05T07:41:32\",\"to\":\"2020-07-21T07:41:32\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-38we0i\",\"name\":\"export-38we0i\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65375a9692caf\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-r6xjol\",\"name\":\"export-r6xjol\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377005b37c6\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\"}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-gq1kft\",\"name\":\"export-gq1kft\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d6537703972b88\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}},{\"id\":\"subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.CostManagement/exports/export-j8s5of\",\"name\":\"export-j8s5of\",\"type\":\"Microsoft.CostManagement/exports\",\"eTag\":\"\\\"1d65377046dbf7c\\\"\",\"properties\":{\"schedule\":{\"status\":\"Active\",\"recurrence\":\"Daily\",\"recurrencePeriod\":{\"from\":\"2020-07-06T09:13:02\",\"to\":\"2020-07-26T09:13:02\"}},\"format\":\"Csv\",\"deliveryInfo\":{\"destination\":{\"resourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu\",\"container\":\"exports\",\"rootFolderPath\":\"ad-hoc\"}},\"definition\":{\"type\":\"Usage\",\"timeframe\":\"MonthToDate\",\"dataSet\":{\"granularity\":\"Daily\",\"aggregation\":{\"costsum\":{\"name\":\"PreTaxCost\",\"function\":\"Sum\"},\"cost\":{\"name\":\"Cost\",\"function\":\"Sum\"}},\"grouping\":[{\"type\":\"Dimension\",\"name\":\"ResourceGroup\"}]}}}}]}" } } } \ No newline at end of file diff --git a/src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 b/src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 index c406b76ae100..ba82788c08a2 100644 --- a/src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 +++ b/src/CostManagement/test/Remove-AzCostManagementExport.Tests.ps1 @@ -15,7 +15,7 @@ Describe 'Remove-AzCostManagementExport' { It 'Delete' { Remove-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" -Name $env.exportName04 $exportList = Get-AzCostManagementExport -Scope "subscriptions/$($env.SubscriptionId)" - $exportList.Name| Should -Not -Contain $env.exportName02 + $exportList.Name| Should -Not -Contain $env.exportName04 } It 'DeleteViaIdentity' { diff --git a/src/CostManagement/test/deployment-templates/storage-account/template.json b/src/CostManagement/test/deployment-templates/storage-account/template.json index fccd796d68bf..1ce0851a5d9e 100644 --- a/src/CostManagement/test/deployment-templates/storage-account/template.json +++ b/src/CostManagement/test/deployment-templates/storage-account/template.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "storageAccounts_name": { - "defaultValue": "staaccountmhot0q", + "defaultValue": "staaccountjshubiu", "type": "String" } }, diff --git a/src/CostManagement/test/env.json b/src/CostManagement/test/env.json index 24aeaf3fdf15..4e7b60c28d9d 100644 --- a/src/CostManagement/test/env.json +++ b/src/CostManagement/test/env.json @@ -1,14 +1,17 @@ { - "exportName04": "export-u9sfcn", - "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", - "resourceGroup": "lucas-manual-test", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "storageAccountId": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/costmanagement-rg-5rij6b/providers/Microsoft.Storage/storageAccounts/staaccountjshubiu", "location": "eastus", - "exportName02": "export-u9yfan", - "toDate": "7/21/2020 7:41:32 AM", - "exportName03": "export-casdkb", - "exportName05": "export-cf6scg", - "fromDate": "7/5/2020 7:41:32 AM", - "storageAccountId": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-manual-test/providers/Microsoft.Storage/storageAccounts/staaccountmhot0q", - "exportName01": "export-xjsoqu" + "resourceGroup": "costmanagement-rg-5rij6b", + "exportName08": "export-93sr8e", + "exportName06": "export-j8s5of", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "exportName05": "export-gq1kft", + "fromDate": "7/6/2020 9:13:02 AM", + "exportName01": "export-38we0i", + "exportName02": "export-r6xjol", + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", + "toDate": "7/26/2020 9:13:02 AM", + "exportName03": "export-rs3qh5", + "exportName04": "export-ni0ar2", + "exportName07": "export-ktoa73" } diff --git a/src/CostManagement/test/utils.ps1 b/src/CostManagement/test/utils.ps1 index 36eb6ccfe754..71818c954ade 100644 --- a/src/CostManagement/test/utils.ps1 +++ b/src/CostManagement/test/utils.ps1 @@ -27,15 +27,22 @@ function setupEnv() { $exportName03 = 'export-' + (RandomString -allChars $false -len 6) $exportName04 = 'export-' + (RandomString -allChars $false -len 6) $exportName05 = 'export-' + (RandomString -allChars $false -len 6) + $exportName06 = 'export-' + (RandomString -allChars $false -len 6) + $exportName07 = 'export-' + (RandomString -allChars $false -len 6) + $exportName08 = 'export-' + (RandomString -allChars $false -len 6) $null = $env.Add('exportName01', $exportName01) $null = $env.Add('exportName02', $exportName02) $null = $env.Add('exportName03', $exportName03) $null = $env.Add('exportName04', $exportName04) $null = $env.Add('exportName05', $exportName05) + $null = $env.Add('exportName06', $exportName06) + $null = $env.Add('exportName07', $exportName07) + $null = $env.Add('exportName08', $exportName08) Write-Host -ForegroundColor Green "Create test group..." $resourceGroup = 'costmanagement-rg-' + (RandomString -allChars $false -len 6) + Write-Host $resourceGroup New-AzResourceGroup -Name $resourceGroup -Location $env.location $null = $env.Add('resourceGroup', $resourceGroup) Write-Host -ForegroundColor Green 'The test group create completed.' @@ -52,7 +59,7 @@ function setupEnv() { set-content -Path .\test\deployment-templates\storage-account\parameters.json -Value (ConvertTo-Json $staaccountParam) #> New-AzDeployment -Mode Incremental -TemplateFile .\test\deployment-templates\storage-account\template.json -TemplateParameterFile .\test\deployment-templates\storage-account\parameters.json -ResourceGroupName $env.resourceGroup - $staaccountName = 'staaccountmhot0q' # Value in template.json + $staaccountName = 'staaccountjshubiu' # Value in template.json $env.storageAccountId = "/subscriptions/$($env.SubscriptionId)/resourceGroups/$($env.resourceGroup)/providers/Microsoft.Storage/storageAccounts/$($staaccountName)" Start-Sleep -s 60 # Waiting storage account create complete. Write-Host -ForegroundColor Green "The storage account deployed successfully." @@ -68,6 +75,8 @@ function setupEnv() { -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" ` -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" + Invoke-AzCostManagementExecuteExport -Scope "subscriptions/$($env.SubscriptionId)" -ExportName $env.exportName01 + Write-Host -ForegroundColor Green "The cost management export created successfully." $envFile = 'env.json'