Get-AzCostManagementExport

The operation to get the export for the defined scope by export name.

Syntax

Get-AzCostManagementExport
   -Scope <String>
   [-Expand <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzCostManagementExport
   -Name <String>
   -Scope <String>
   [-Expand <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzCostManagementExport
   -InputObject <ICostManagementIdentity>
   [-Expand <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

The operation to get the export for the defined scope by export name.

Examples

Example 1: Get all AzCostManagementExports by scope

Get-AzCostManagementExport -Scope 'subscriptions/**********'

ETag              Name                               Type
----              ----                               ----
"************" TestExport                         Microsoft.CostManagement/exports
"************" TestExport1                        Microsoft.CostManagement/exports
"************" TestExport2                        Microsoft.CostManagement/exports

Get all AzCostManagementExports by Scope

Example 2: Get AzCostManagementExport by Name and scope

Get-AzCostManagementExport -Name 'TestExport' -Scope 'subscriptions/**********'

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

Get AzCostManagementExport by Name and scope

Parameters

-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

-Expand

May be used to expand the properties within an export. Currently only 'runHistory' is supported and will return information for the last 10 executions of the export.

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:ICostManagementIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

-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

Inputs

ICostManagementIdentity

Outputs

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 <ICostManagementIdentity>: Identity Parameter

  • [AlertId <String>]: Alert ID
  • [BillingAccountId <String>]: Enrollment ID (Legacy BillingAccount ID)
  • [BillingProfileId <String>]: BillingProfile ID
  • [ExportName <String>]: Export Name.
  • [ExternalCloudProviderId <String>]: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
  • [ExternalCloudProviderType <ExternalCloudProviderType?>]: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
  • [Id <String>]: Resource identity path
  • [OperationId <String>]: The target operation Id.
  • [Scope <String>]: 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 <String>]: View name