Bewerken

Delen via


New-AzCostManagementExport

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 <String>
   -Scope <String>
   [-ConfigurationColumn <String[]>]
   [-DataSetGranularity <GranularityType>]
   [-DefinitionTimeframe <TimeframeType>]
   [-DefinitionType <ExportType>]
   [-DestinationContainer <String>]
   [-DestinationResourceId <String>]
   [-DestinationRootFolderPath <String>]
   [-Format <FormatType>]
   [-RecurrencePeriodFrom <DateTime>]
   [-RecurrencePeriodTo <DateTime>]
   [-ScheduleRecurrence <RecurrenceType>]
   [-ScheduleStatus <StatusType>]
   [-TimePeriodFrom <DateTime>]
   [-TimePeriodTo <DateTime>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

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 an AzCostManagementExport

New-AzCostManagementExport -Scope "subscriptions/***********" -Name "CostManagementExportTest" -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-10-31T20:00:00Z" -RecurrencePeriodTo "2020-11-30T00:00:00Z" -Format "Csv" -DestinationResourceId "/subscriptions/*************/resourceGroups/ResourceGroupTest/providers/Microsoft.Storage/storageAccounts/storageAccountTest" `  -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily"

ETag              Name                                      Type
----              ----                                      ----
"********" TestExportDatasetAggregationInfosagdhaghj Microsoft.CostManagement/exports

Create an AzCostManagementExport

Parameters

-ConfigurationColumn

Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples).

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DataSetGranularity

The granularity of rows in the export. Currently only 'Daily' is supported.

Type:GranularityType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefinitionTimeframe

The time frame for pulling data for the export. If custom, then a specific time period must be provided.

Type:TimeframeType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefinitionType

The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations.

Type:ExportType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationContainer

The name of the container where exports will be uploaded.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationResourceId

The resource id of the storage account where exports will be delivered.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationRootFolderPath

The name of the directory where exports will be uploaded.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Format

The format of the export being delivered. Currently only 'Csv' is supported.

Type:FormatType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Export Name.

Type:String
Aliases:ExportName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RecurrencePeriodFrom

The start date of recurrence.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RecurrencePeriodTo

The end date of recurrence.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ScheduleRecurrence

The schedule recurrence.

Type:RecurrenceType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ScheduleStatus

The status of the export's schedule. If 'Inactive', the export's schedule is paused.

Type:StatusType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Scope

This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TimePeriodFrom

The start date for export data.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TimePeriodTo

The end date for export data.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IExport