diff --git a/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.csproj b/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.csproj
index e81aa4d309f9..2d64bb4fe659 100644
--- a/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.csproj
+++ b/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.csproj
@@ -2,9 +2,9 @@
CostManagement
CostManagement
+ CostManagement.Autorest
-
diff --git a/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml b/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml
index 67ba9e8afdae..d243d8ac7160 100644
--- a/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml
+++ b/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml
@@ -2,279 +2,20 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostManagementIdentity
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostManagementIdentity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AlertId
-
-
- BillingAccountId
-
-
- BillingProfileId
-
-
- ExportName
-
-
- ExternalCloudProviderId
-
-
- ExternalCloudProviderType
-
-
- OperationId
-
-
- Scope
-
-
- ViewName
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.BlobInfo
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Alert
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.BlobInfo
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Alert#Multiple
-
-
-
-
+
-
-
-
-
-
- BlobLink
-
-
- ByteCount
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.CostDetailsOperationResults
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.CostDetailsOperationResults
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
- Status
-
-
- ValidTill
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.CostDetailsTimePeriod
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.CostDetailsTimePeriod
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- End
-
-
- Start
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.GenerateCostDetailsReportRequestDefinition
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.GenerateCostDetailsReportRequestDefinition
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BillingPeriod
-
-
- InvoiceId
-
-
- Metric
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ReportManifest
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ReportManifest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BlobCount
-
-
- ByteCount
-
-
- CompressData
-
-
- DataFormat
-
-
- ManifestVersion
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.RequestContext
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.RequestContext
-
-
-
-
-
-
-
-
-
-
-
- RequestScope
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Alert
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Alert
-
-
-
-
-
-
-
-
+
@@ -286,15 +27,18 @@
Name
+
+ ResourceGroupName
+
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertProperties#Multiple
@@ -362,9 +106,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertPropertiesDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertPropertiesDefinition
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertPropertiesDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertPropertiesDefinition#Multiple
@@ -390,9 +134,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertPropertiesDetails
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertPropertiesDetails
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertPropertiesDetails
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertPropertiesDetails#Multiple
@@ -402,15 +146,6 @@
-
-
-
-
-
-
-
-
-
@@ -429,9 +164,6 @@
-
-
-
@@ -441,12 +173,6 @@
-
-
-
-
-
-
@@ -469,15 +195,6 @@
CompanyName
-
- ContactEmail
-
-
- ContactGroup
-
-
- ContactRole
-
CurrentSpend
@@ -496,9 +213,6 @@
InvoicingThreshold
-
- MeterFilter
-
Operator
@@ -508,12 +222,6 @@
PeriodStartDate
-
- ResourceFilter
-
-
- ResourceGroupFilter
-
Threshold
@@ -532,9 +240,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertsResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertsResult
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.AlertsResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.AlertsResult#Multiple
@@ -554,33 +262,199 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.CommonExportProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.BlobInfo
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.CommonExportProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.BlobInfo#Multiple
-
+
+
+
+
+
+
+
+
+
+
+ BlobLink
+
+
+ ByteCount
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CommonExportProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CommonExportProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Format
+
+
+ NextRunTimeEstimate
+
+
+ PartitionData
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostDetailsOperationResults
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostDetailsOperationResults#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ ResourceGroupName
+
+
+ Status
+
+
+ ValidTill
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostDetailsTimePeriod
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostDetailsTimePeriod#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ End
+
+
+ Start
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostManagementIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.CostManagementIdentity#Multiple
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Format
+ AlertId
- NextRunTimeEstimate
+ BillingAccountId
- PartitionData
+ BillingProfileId
+
+
+ ExportName
+
+
+ ExternalCloudProviderId
+
+
+ ExternalCloudProviderType
+
+
+ OperationId
+
+
+ Scope
+
+
+ ViewName
@@ -588,9 +462,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Dimension
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Dimension
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Dimension
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Dimension#Multiple
@@ -628,18 +502,15 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.DimensionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.DimensionProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.DimensionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.DimensionProperties#Multiple
-
-
-
@@ -668,9 +539,6 @@
Category
-
- Data
-
Description
@@ -698,9 +566,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ErrorDetails
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ErrorDetails
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ErrorDetails
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ErrorDetails#Multiple
@@ -726,9 +594,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Export
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Export
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Export
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Export#Multiple
@@ -738,6 +606,9 @@
+
+
+
@@ -748,27 +619,8 @@
Name
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDataset
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDataset
-
-
-
-
-
-
-
-
-
-
- Granularity
+ ResourceGroupName
@@ -776,21 +628,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDatasetConfiguration
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportDataset
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDatasetConfiguration
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportDataset#Multiple
-
+
- Column
+ Granularity
@@ -798,9 +650,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportDefinition
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportDefinition#Multiple
@@ -820,9 +672,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDeliveryDestination
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportDeliveryDestination
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportDeliveryDestination
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportDeliveryDestination#Multiple
@@ -866,9 +718,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportExecution
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportExecution
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportExecution
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportExecution#Multiple
@@ -912,9 +764,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportExecutionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportExecutionProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportExecutionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportExecutionProperties#Multiple
@@ -970,15 +822,12 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportProperties#Multiple
-
-
-
@@ -1022,9 +871,6 @@
-
- ConfigurationColumn
-
DataSetGranularity
@@ -1070,9 +916,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportRecurrencePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportRecurrencePeriod
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportRecurrencePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportRecurrencePeriod#Multiple
@@ -1098,9 +944,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportSchedule
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportSchedule
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportSchedule
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportSchedule#Multiple
@@ -1126,9 +972,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportTimePeriod
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ExportTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ExportTimePeriod#Multiple
@@ -1154,9 +1000,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastAggregation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastAggregation
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastAggregation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastAggregation#Multiple
@@ -1182,9 +1028,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastColumn
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastColumn
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastColumn
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastColumn#Multiple
@@ -1204,9 +1050,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastComparisonExpression
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastComparisonExpression
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastComparisonExpression
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastComparisonExpression#Multiple
@@ -1216,9 +1062,6 @@
-
-
-
@@ -1229,18 +1072,15 @@
Operator
-
- Value
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastDataset
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastDataset
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastDataset
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastDataset#Multiple
@@ -1260,31 +1100,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastDatasetConfiguration
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastDatasetConfiguration
-
-
-
-
-
-
-
-
-
-
-
- Column
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastDefinition
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastDefinition#Multiple
@@ -1316,9 +1134,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastProperties#Multiple
@@ -1338,9 +1156,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastResult
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastResult#Multiple
@@ -1356,6 +1174,9 @@
+
+
+
@@ -1372,15 +1193,18 @@
Sku
+
+ ResourceGroupName
+
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastTimePeriod
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ForecastTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ForecastTimePeriod#Multiple
@@ -1406,9 +1230,43 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.KpiProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateCostDetailsReportRequestDefinition
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateCostDetailsReportRequestDefinition#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BillingPeriod
+
+
+ InvoiceId
+
+
+ Metric
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.KpiProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.KpiProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.KpiProperties#Multiple
@@ -1428,9 +1286,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Operation
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Operation#Multiple
@@ -1450,9 +1308,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.OperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.OperationDisplay#Multiple
@@ -1490,9 +1348,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.OperationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.OperationListResult
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.OperationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.OperationListResult#Multiple
@@ -1512,9 +1370,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.OperationStatus
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.OperationStatus
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.OperationStatus
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.OperationStatus#Multiple
@@ -1534,9 +1392,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.PivotProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.PivotProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.PivotProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.PivotProperties#Multiple
@@ -1556,9 +1414,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ProxyResource
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ProxyResource
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ProxyResource
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ProxyResource#Multiple
@@ -1584,9 +1442,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryAggregation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryAggregation
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryAggregation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryAggregation#Multiple
@@ -1612,9 +1470,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryColumn
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryColumn
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryColumn
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryColumn#Multiple
@@ -1634,9 +1492,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryComparisonExpression
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryComparisonExpression
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryComparisonExpression
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryComparisonExpression#Multiple
@@ -1646,9 +1504,6 @@
-
-
-
@@ -1659,18 +1514,15 @@
Operator
-
- Value
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryDataset
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryDataset
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryDataset
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryDataset#Multiple
@@ -1690,31 +1542,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryDatasetConfiguration
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryDatasetConfiguration
-
-
-
-
-
-
-
-
-
-
-
- Column
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryDefinition
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryDefinition#Multiple
@@ -1734,9 +1564,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryGrouping
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryGrouping
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryGrouping
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryGrouping#Multiple
@@ -1756,18 +1586,15 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryProperties#Multiple
-
-
-
@@ -1775,18 +1602,15 @@
NextLink
-
- Row
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryResult
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryResult#Multiple
@@ -1812,9 +1636,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryTimePeriod
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryTimePeriod#Multiple
@@ -1840,9 +1664,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigAggregation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigAggregation
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigAggregation
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigAggregation#Multiple
@@ -1868,9 +1692,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigComparisonExpression
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigComparisonExpression
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigComparisonExpression
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigComparisonExpression#Multiple
@@ -1880,9 +1704,6 @@
-
-
-
@@ -1893,18 +1714,15 @@
Operator
-
- Value
-
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigDataset
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigDataset
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigDataset
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigDataset#Multiple
@@ -1924,21 +1742,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigDatasetConfiguration
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigDefinition
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigDatasetConfiguration
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigDefinition#Multiple
-
+
+
+
+
- Column
+ IncludeMonetaryCommitment
+
+
+ Timeframe
@@ -1946,27 +1770,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigGrouping
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigDefinition
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigGrouping#Multiple
-
-
-
-
+
- IncludeMonetaryCommitment
-
-
- Timeframe
+ Name
@@ -1974,12 +1792,15 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigGrouping
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigSorting
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigGrouping
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigSorting#Multiple
+
+
+
@@ -1987,6 +1808,9 @@
+
+ Direction
+
Name
@@ -1996,27 +1820,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigSorting
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigTimePeriod
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigSorting
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportConfigTimePeriod#Multiple
-
+
-
+
- Direction
+ From
- Name
+ To
@@ -2024,27 +1848,45 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportManifest
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportConfigTimePeriod
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportManifest#Multiple
-
+
-
+
+
+
+
+
+
+
+
+
+
- From
+ BlobCount
- To
+ ByteCount
+
+
+ CompressData
+
+
+ DataFormat
+
+
+ ManifestVersion
@@ -2052,9 +1894,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportUrl
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportUrl
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ReportUrl
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ReportUrl#Multiple
@@ -2080,9 +1922,31 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.RequestContext
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.RequestContext#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ RequestScope
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Resource
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Resource#Multiple
@@ -2120,9 +1984,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ResourceTags
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ResourceTags#Multiple
@@ -2142,9 +2006,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.View
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.View
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.View
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.View#Multiple
@@ -2154,6 +2018,9 @@
+
+
+
@@ -2164,15 +2031,18 @@
Name
+
+ ResourceGroupName
+
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ViewListResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ViewListResult
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ViewListResult
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ViewListResult#Multiple
@@ -2192,9 +2062,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ViewProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ViewProperties
- Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.ViewProperties
+ Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ViewProperties#Multiple
diff --git a/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1 b/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1
index 5f283c22562d..3845f5eb2d06 100644
--- a/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1
+++ b/generated/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1
@@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.CostManagement.private.dll'
FormatsToProcess = './Az.CostManagement.format.ps1xml'
- FunctionsToExport = 'Get-AzCostManagementExport', 'Get-AzCostManagementExportExecutionHistory', 'Invoke-AzCostManagementExecuteExport', 'Invoke-AzCostManagementQuery', 'Invoke-AzCostManagementReservationDetailReport', 'New-AzCostManagementDetailReport', 'New-AzCostManagementExport', 'New-AzCostManagementQueryComparisonExpressionObject', 'New-AzCostManagementQueryFilterObject', 'Remove-AzCostManagementExport', 'Update-AzCostManagementExport', '*'
- AliasesToExport = '*'
+ FunctionsToExport = 'Get-AzCostManagementExport', 'Get-AzCostManagementExportExecutionHistory', 'Invoke-AzCostManagementExecuteExport', 'Invoke-AzCostManagementQuery', 'Invoke-AzCostManagementReservationDetailReport', 'New-AzCostManagementDetailReport', 'New-AzCostManagementExport', 'New-AzCostManagementQueryComparisonExpressionObject', 'New-AzCostManagementQueryFilterObject', 'Remove-AzCostManagementExport', 'Update-AzCostManagementExport'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Cost'
diff --git a/generated/CostManagement/CostManagement.Autorest/Properties/AssemblyInfo.cs b/generated/CostManagement/CostManagement.Autorest/Properties/AssemblyInfo.cs
index 0d69813674a4..27ba54fbf85d 100644
--- a/generated/CostManagement/CostManagement.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/CostManagement/CostManagement.Autorest/Properties/AssemblyInfo.cs
@@ -1,28 +1,26 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// 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,
+// 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.
-// ----------------------------------------------------------------------------------
+// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+// is regenerated.
using System;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Microsoft Azure Powershell - CostManagement")]
-[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
-[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
-[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
-
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: Guid("de963dfc-d256-4077-8836-2ae5079a43e7")]
-[assembly: AssemblyVersion("0.3.4")]
-[assembly: AssemblyFileVersion("0.3.4")]
+[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
+[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
+[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - CostManagement")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0")]
+[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
+[assembly: System.CLSCompliantAttribute(false)]
diff --git a/generated/CostManagement/CostManagement.Autorest/check-dependencies.ps1 b/generated/CostManagement/CostManagement.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/generated/CostManagement/CostManagement.Autorest/check-dependencies.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/check-dependencies.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1
index f3622d3de60f..6f2634875483 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1
@@ -27,7 +27,9 @@ Get-AzCostManagementExport -Name 'TestExport' -Scope 'subscriptions/**********'
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportListResult
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -39,16 +41,18 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Get-AzCostManagementExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport], [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportListResult])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -69,7 +73,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -135,6 +138,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -165,6 +177,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1
index d9d17ec4f625..3be8a4158fdc 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1
@@ -28,7 +28,7 @@ Get-AzCostManagementExportExecutionHistory -InputObject $getExport
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExportExecution
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportExecutionListResult
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -40,16 +40,18 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexportexecutionhistory
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Get-AzCostManagementExportExecutionHistory {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExportExecution])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportExecutionListResult])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -68,7 +70,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -127,6 +128,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -156,6 +166,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1
index ad54da1f58a7..aa2af668eda3 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1
@@ -40,13 +40,15 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementexecuteexport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Invoke-AzCostManagementExecuteExport {
[OutputType([System.Boolean])]
@@ -68,7 +70,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -133,6 +134,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -162,6 +172,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1
index e99f3be82874..76b1fcf5b02c 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1
@@ -27,29 +27,34 @@ $filter = New-AzCostManagementQueryFilterObject -Dimensions $dimensions
Invoke-AzCostManagementQuery -Type Usage -Scope "subscriptions/***********" -DatasetGranularity 'Monthly' -DatasetFilter $filter -Timeframe MonthToDate -Debug
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryResult
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryResult
.Notes
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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [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.
+ Type : Has type of the column to group.
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementquery
#>
function Invoke-AzCostManagementQuery {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryResult])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryResult])]
[CmdletBinding(DefaultParameterSetName='UsageExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UsageExpanded', Mandatory)]
@@ -65,23 +70,23 @@ param(
${ExternalCloudProviderId},
[Parameter(ParameterSetName='UsageExpanded1', Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExternalCloudProviderType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("ExternalBillingAccounts", "ExternalSubscriptions")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExternalCloudProviderType]
+ [System.String]
# The external cloud provider type associated with dimension/query operations.
${ExternalCloudProviderType},
[Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType]
+ [System.String]
# The time frame for pulling data for the query.
${Timeframe},
[Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Usage", "ActualCost", "AmortizedCost")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType]
+ [System.String]
# The type of the query.
${Type},
@@ -93,30 +98,28 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryDatasetAggregation]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryDatasetAggregation]))]
[System.Collections.Hashtable]
# Dictionary of aggregation expression to use in the query.
${DatasetAggregation},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter]
# Has filter expression to use in the query.
- # To construct, see NOTES section for DATASETFILTER properties and create a hash table.
${DatasetFilter},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType]
+ [System.String]
# The granularity of rows in the query.
${DatasetGranularity},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryGrouping[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryGrouping[]]
# Array of group by expression to use in the query.
- # To construct, see NOTES section for DATASETGROUPING properties and create a hash table.
${DatasetGrouping},
[Parameter()]
@@ -186,6 +189,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -215,6 +227,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1
index 9d2262eab524..ef3b55faa8e0 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1
@@ -27,12 +27,14 @@ For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-m
Invoke-AzCostManagementReservationDetailReport -BillingAccountId "00000000-0000-0000-0000-0000000000" -StartDate "2022-10-01" -EndDate "2022-10-20"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperationStatus
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IOperationStatus
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementreservationdetailreport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Invoke-AzCostManagementReservationDetailReport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperationStatus])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IOperationStatus])]
[CmdletBinding(DefaultParameterSetName='By', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -127,6 +129,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -156,6 +167,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1
index 2c05e55a83f9..df2110c03602 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1
@@ -37,12 +37,14 @@ The details on the file(s) available for download will be available in the polli
New-AzCostManagementDetailReport -Scope "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Metric 'ActualCost' -TimePeriodStart "2022-10-01" -TimePeriodEnd "2022-10-20"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ICostDetailsOperationResults
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostDetailsOperationResults
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementdetailreport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function New-AzCostManagementDetailReport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ICostDetailsOperationResults])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostDetailsOperationResults])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -53,7 +55,7 @@ param(
# Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount 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.
${Scope},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# This parameter can be used only by Enterprise Agreement customers.
@@ -63,7 +65,7 @@ param(
# If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost.
${BillingPeriod},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# This parameter can only be used by Microsoft Customer Agreement customers.
@@ -72,28 +74,40 @@ param(
# If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost.
${InvoiceId},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.CostDetailsMetricType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("ActualCost", "AmortizedCost")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.CostDetailsMetricType]
+ [System.String]
# The type of the detailed report.
# By default ActualCost is provided
${Metric},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The end date to pull data to.
# example format 2020-03-15
${TimePeriodEnd},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The start date to pull data from.
# example format 2020-03-15
${TimePeriodStart},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -162,6 +176,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -182,6 +205,8 @@ begin {
$mapping = @{
CreateExpanded = 'Az.CostManagement.private\New-AzCostManagementDetailReport_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.CostManagement.private\New-AzCostManagementDetailReport_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.CostManagement.private\New-AzCostManagementDetailReport_CreateViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -190,6 +215,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1
index b61cdc1254d3..355d0d51e640 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1
@@ -29,12 +29,12 @@ Create operation does not require eTag.
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"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementexport
#>
function New-AzCostManagementExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -50,7 +50,7 @@ param(
# This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'.
${Scope},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String[]]
# Array of column names to be included in the export.
@@ -58,101 +58,147 @@ param(
# The available columns can vary by customer channel (see examples).
${ConfigurationColumn},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType]
+ [System.String]
# The granularity of rows in the export.
# Currently only 'Daily' is supported.
${DataSetGranularity},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType]
+ [System.String]
# The time frame for pulling data for the export.
# If custom, then a specific time period must be provided.
${DefinitionTimeframe},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Usage", "ActualCost", "AmortizedCost")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType]
+ [System.String]
# 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.
${DefinitionType},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The name of the container where exports will be uploaded.
+ # If the container does not exist it will be created.
${DestinationContainer},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The resource id of the storage account where exports will be delivered.
+ # This is not required if a sasToken and storageAccount are specified.
${DestinationResourceId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The name of the directory where exports will be uploaded.
${DestinationRootFolderPath},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # A SAS token for the storage account.
+ # For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId.
+ # Note: the value returned by the API for this property will always be obfuscated.
+ # Returning this same obfuscated value will not result in the SAS token being updated.
+ # To update this value a new SAS token must be specified.
+ ${DestinationSasToken},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # The storage account where exports will be uploaded.
+ # For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId.
+ ${DestinationStorageAccount},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType]
+ [System.String]
+ # eTag of the resource.
+ # To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ ${ETag},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Csv")]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
# The format of the export being delivered.
# Currently only 'Csv' is supported.
${Format},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.
+ # Note: this option is currently available only for modern commerce scopes.
+ ${PartitionData},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The start date of recurrence.
${RecurrencePeriodFrom},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The end date of recurrence.
${RecurrencePeriodTo},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily", "Weekly", "Monthly", "Annually")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType]
+ [System.String]
# The schedule recurrence.
${ScheduleRecurrence},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Active", "Inactive")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType]
+ [System.String]
# The status of the export's schedule.
# If 'Inactive', the export's schedule is paused.
${ScheduleStatus},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The start date for export data.
${TimePeriodFrom},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The end date for export data.
${TimePeriodTo},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter(DontShow)]
@@ -202,6 +248,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -222,6 +277,8 @@ begin {
$mapping = @{
CreateExpanded = 'Az.CostManagement.custom\New-AzCostManagementExport';
+ CreateViaJsonFilePath = 'Az.CostManagement.custom\New-AzCostManagementExport';
+ CreateViaJsonString = 'Az.CostManagement.custom\New-AzCostManagementExport';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -230,6 +287,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1
index 8300d637a0c4..a64442d629e2 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1
@@ -16,19 +16,19 @@
<#
.Synopsis
-Create a in-memory object for QueryComparisonExpression
+Create an in-memory object for QueryComparisonExpression.
.Description
-Create a in-memory object for QueryComparisonExpression
+Create an in-memory object for QueryComparisonExpression.
.Example
New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Value @('East US', 'West Europe')
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryComparisonExpression
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryComparisonExpression
.Link
-https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryComparisonExpressionObject
+https://learn.microsoft.com/powershell/module/Az.CostManagement/new-azcostmanagementquerycomparisonexpressionobject
#>
function New-AzCostManagementQueryComparisonExpressionObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryComparisonExpression])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryComparisonExpression])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -37,12 +37,6 @@ param(
# The name of the column to use in comparison.
${Name},
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.OperatorType]
- # The operator to use for comparison.
- ${Operator},
-
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String[]]
@@ -57,6 +51,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -85,6 +82,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1
index 96435712eab3..b1b1bb26826d 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1
@@ -16,97 +16,107 @@
<#
.Synopsis
-Create a in-memory object for QueryFilter
+Create an in-memory object for QueryFilter.
.Description
-Create a in-memory object for QueryFilter
+Create an in-memory object for QueryFilter.
.Example
$orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Value @('East US', 'West Europe')
$orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Value @('UAT', 'Prod')
New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimensions $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag))
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryFilter
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryFilter
.Notes
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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [Or >]: The logical "OR" expression. Must have at least 2 items.
[Tag ]: Has comparison expression for a tag
-DIMENSIONS : Has comparison expression for a dimensions.
+DIMENSIONS : Has comparison expression for a dimension.
Name : The name of the column to use in comparison.
- Value : Array of values 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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [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.
- Value : Array of values to use for comparison
+ Value >: Array of values to use for comparison
.Link
-https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryFilterObject
+https://learn.microsoft.com/powershell/module/Az.CostManagement/new-azcostmanagementqueryfilterobject
#>
function New-AzCostManagementQueryFilterObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryFilter])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryFilter])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter[]]
# The logical "AND" expression.
# Must have at least 2 items.
- # To construct, see NOTES section for AND properties and create a hash table.
${And},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryComparisonExpression]
- # Has comparison expression for a dimensions.
- # To construct, see NOTES section for DIMENSIONS properties and create a hash table.
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryComparisonExpression]
+ # Has comparison expression for a dimension.
${Dimensions},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter]
# The logical "NOT" expression.
- # To construct, see NOTES section for NOT properties and create a hash table.
${Not},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter[]]
# The logical "OR" expression.
# Must have at least 2 items.
- # To construct, see NOTES section for OR properties and create a hash table.
${Or},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryComparisonExpression]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryComparisonExpression]
# Has comparison expression for a tag.
- # To construct, see NOTES section for TAG properties and create a hash table.
${Tag}
)
@@ -117,6 +127,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -145,6 +158,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1
index ae89920ce601..f615edb3ef33 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -28,7 +28,7 @@ Get-AzCostManagementExportExecutionHistory -InputObject $getExport
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExportExecution
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportExecutionListResult
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -40,16 +40,18 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexportexecutionhistory
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Get-AzCostManagementExportExecutionHistory {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExportExecution])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportExecutionListResult])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -68,7 +70,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -127,6 +128,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -156,6 +166,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -212,7 +225,9 @@ Get-AzCostManagementExport -Name 'TestExport' -Scope 'subscriptions/**********'
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportListResult
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -224,16 +239,18 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Get-AzCostManagementExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport], [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExportListResult])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -254,7 +271,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -320,6 +336,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -350,6 +375,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -419,13 +447,15 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementexecuteexport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Invoke-AzCostManagementExecuteExport {
[OutputType([System.Boolean])]
@@ -447,7 +477,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -512,6 +541,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -541,6 +579,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -597,12 +638,14 @@ For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-m
Invoke-AzCostManagementReservationDetailReport -BillingAccountId "00000000-0000-0000-0000-0000000000" -StartDate "2022-10-01" -EndDate "2022-10-20"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperationStatus
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IOperationStatus
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementreservationdetailreport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Invoke-AzCostManagementReservationDetailReport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperationStatus])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IOperationStatus])]
[CmdletBinding(DefaultParameterSetName='By', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -697,6 +740,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -726,6 +778,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -792,12 +847,14 @@ The details on the file(s) available for download will be available in the polli
New-AzCostManagementDetailReport -Scope "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Metric 'ActualCost' -TimePeriodStart "2022-10-01" -TimePeriodEnd "2022-10-20"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ICostDetailsOperationResults
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostDetailsOperationResults
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementdetailreport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function New-AzCostManagementDetailReport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ICostDetailsOperationResults])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostDetailsOperationResults])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -808,7 +865,7 @@ param(
# Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount 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.
${Scope},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# This parameter can be used only by Enterprise Agreement customers.
@@ -818,7 +875,7 @@ param(
# If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost.
${BillingPeriod},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# This parameter can only be used by Microsoft Customer Agreement customers.
@@ -827,28 +884,40 @@ param(
# If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost.
${InvoiceId},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.CostDetailsMetricType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("ActualCost", "AmortizedCost")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.CostDetailsMetricType]
+ [System.String]
# The type of the detailed report.
# By default ActualCost is provided
${Metric},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The end date to pull data to.
# example format 2020-03-15
${TimePeriodEnd},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The start date to pull data from.
# example format 2020-03-15
${TimePeriodStart},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -917,6 +986,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -937,6 +1015,8 @@ begin {
$mapping = @{
CreateExpanded = 'Az.CostManagement.private\New-AzCostManagementDetailReport_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.CostManagement.private\New-AzCostManagementDetailReport_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.CostManagement.private\New-AzCostManagementDetailReport_CreateViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -945,6 +1025,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1014,13 +1097,15 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/remove-azcostmanagementexport
+.Link
+https://docs.microsoft.com/en-us/rest/api/costmanagement/
#>
function Remove-AzCostManagementExport {
[OutputType([System.Boolean])]
@@ -1043,7 +1128,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -1108,6 +1192,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1137,6 +1230,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1193,29 +1289,34 @@ $filter = New-AzCostManagementQueryFilterObject -Dimensions $dimensions
Invoke-AzCostManagementQuery -Type Usage -Scope "subscriptions/***********" -DatasetGranularity 'Monthly' -DatasetFilter $filter -Timeframe MonthToDate -Debug
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryResult
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryResult
.Notes
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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [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.
+ Type : Has type of the column to group.
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementquery
#>
function Invoke-AzCostManagementQuery {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryResult])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryResult])]
[CmdletBinding(DefaultParameterSetName='UsageExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UsageExpanded', Mandatory)]
@@ -1231,23 +1332,23 @@ param(
${ExternalCloudProviderId},
[Parameter(ParameterSetName='UsageExpanded1', Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExternalCloudProviderType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("ExternalBillingAccounts", "ExternalSubscriptions")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExternalCloudProviderType]
+ [System.String]
# The external cloud provider type associated with dimension/query operations.
${ExternalCloudProviderType},
[Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType]
+ [System.String]
# The time frame for pulling data for the query.
${Timeframe},
[Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Usage", "ActualCost", "AmortizedCost")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType]
+ [System.String]
# The type of the query.
${Type},
@@ -1259,30 +1360,28 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryDatasetAggregation]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryDatasetAggregation]))]
[System.Collections.Hashtable]
# Dictionary of aggregation expression to use in the query.
${DatasetAggregation},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter]
# Has filter expression to use in the query.
- # To construct, see NOTES section for DATASETFILTER properties and create a hash table.
${DatasetFilter},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType]
+ [System.String]
# The granularity of rows in the query.
${DatasetGranularity},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryGrouping[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryGrouping[]]
# Array of group by expression to use in the query.
- # To construct, see NOTES section for DATASETGROUPING properties and create a hash table.
${DatasetGrouping},
[Parameter()]
@@ -1352,6 +1451,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1381,6 +1489,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1439,12 +1550,12 @@ Create operation does not require eTag.
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"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport
.Link
https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementexport
#>
function New-AzCostManagementExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -1460,7 +1571,7 @@ param(
# This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'.
${Scope},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String[]]
# Array of column names to be included in the export.
@@ -1468,101 +1579,147 @@ param(
# The available columns can vary by customer channel (see examples).
${ConfigurationColumn},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType]
+ [System.String]
# The granularity of rows in the export.
# Currently only 'Daily' is supported.
${DataSetGranularity},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType]
+ [System.String]
# The time frame for pulling data for the export.
# If custom, then a specific time period must be provided.
${DefinitionTimeframe},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Usage", "ActualCost", "AmortizedCost")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType]
+ [System.String]
# 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.
${DefinitionType},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The name of the container where exports will be uploaded.
+ # If the container does not exist it will be created.
${DestinationContainer},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The resource id of the storage account where exports will be delivered.
+ # This is not required if a sasToken and storageAccount are specified.
${DestinationResourceId},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The name of the directory where exports will be uploaded.
${DestinationRootFolderPath},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType]
+ [System.String]
+ # A SAS token for the storage account.
+ # For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId.
+ # Note: the value returned by the API for this property will always be obfuscated.
+ # Returning this same obfuscated value will not result in the SAS token being updated.
+ # To update this value a new SAS token must be specified.
+ ${DestinationSasToken},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # The storage account where exports will be uploaded.
+ # For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId.
+ ${DestinationStorageAccount},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # eTag of the resource.
+ # To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
+ ${ETag},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Csv")]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
# The format of the export being delivered.
# Currently only 'Csv' is supported.
${Format},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.
+ # Note: this option is currently available only for modern commerce scopes.
+ ${PartitionData},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The start date of recurrence.
${RecurrencePeriodFrom},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The end date of recurrence.
${RecurrencePeriodTo},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily", "Weekly", "Monthly", "Annually")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType]
+ [System.String]
# The schedule recurrence.
${ScheduleRecurrence},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType])]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Active", "Inactive")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType]
+ [System.String]
# The status of the export's schedule.
# If 'Inactive', the export's schedule is paused.
${ScheduleStatus},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The start date for export data.
${TimePeriodFrom},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The end date for export data.
${TimePeriodTo},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter(DontShow)]
@@ -1612,6 +1769,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1632,6 +1798,8 @@ begin {
$mapping = @{
CreateExpanded = 'Az.CostManagement.custom\New-AzCostManagementExport';
+ CreateViaJsonFilePath = 'Az.CostManagement.custom\New-AzCostManagementExport';
+ CreateViaJsonString = 'Az.CostManagement.custom\New-AzCostManagementExport';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -1640,6 +1808,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1685,19 +1856,19 @@ end {
<#
.Synopsis
-Create a in-memory object for QueryComparisonExpression
+Create an in-memory object for QueryComparisonExpression.
.Description
-Create a in-memory object for QueryComparisonExpression
+Create an in-memory object for QueryComparisonExpression.
.Example
New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Value @('East US', 'West Europe')
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryComparisonExpression
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryComparisonExpression
.Link
-https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryComparisonExpressionObject
+https://learn.microsoft.com/powershell/module/Az.CostManagement/new-azcostmanagementquerycomparisonexpressionobject
#>
function New-AzCostManagementQueryComparisonExpressionObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryComparisonExpression])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryComparisonExpression])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -1706,12 +1877,6 @@ param(
# The name of the column to use in comparison.
${Name},
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.OperatorType]
- # The operator to use for comparison.
- ${Operator},
-
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String[]]
@@ -1726,6 +1891,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1754,6 +1922,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1799,97 +1970,107 @@ end {
<#
.Synopsis
-Create a in-memory object for QueryFilter
+Create an in-memory object for QueryFilter.
.Description
-Create a in-memory object for QueryFilter
+Create an in-memory object for QueryFilter.
.Example
$orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Value @('East US', 'West Europe')
$orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Value @('UAT', 'Prod')
New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimensions $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag))
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryFilter
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryFilter
.Notes
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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [Or >]: The logical "OR" expression. Must have at least 2 items.
[Tag ]: Has comparison expression for a tag
-DIMENSIONS : Has comparison expression for a dimensions.
+DIMENSIONS : Has comparison expression for a dimension.
Name : The name of the column to use in comparison.
- Value : Array of values 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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [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.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [And >]: The logical "AND" expression. Must have at least 2 items.
+ [Dimensions ]: Has comparison expression for a dimension
+ Name : The name of the column to use in 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
[Dimensions ]: Has comparison expression for a dimension
- Name : The name of the column to use in 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.
+ [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.
- Value : Array of values to use for comparison
+ Value >: Array of values to use for comparison
.Link
-https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryFilterObject
+https://learn.microsoft.com/powershell/module/Az.CostManagement/new-azcostmanagementqueryfilterobject
#>
function New-AzCostManagementQueryFilterObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryFilter])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.QueryFilter])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter[]]
# The logical "AND" expression.
# Must have at least 2 items.
- # To construct, see NOTES section for AND properties and create a hash table.
${And},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryComparisonExpression]
- # Has comparison expression for a dimensions.
- # To construct, see NOTES section for DIMENSIONS properties and create a hash table.
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryComparisonExpression]
+ # Has comparison expression for a dimension.
${Dimensions},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter]
# The logical "NOT" expression.
- # To construct, see NOTES section for NOT properties and create a hash table.
${Not},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryFilter[]]
# The logical "OR" expression.
# Must have at least 2 items.
- # To construct, see NOTES section for OR properties and create a hash table.
${Or},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryComparisonExpression]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IQueryComparisonExpression]
# Has comparison expression for a tag.
- # To construct, see NOTES section for TAG properties and create a hash table.
${Tag}
)
@@ -1900,6 +2081,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1928,6 +2112,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1991,7 +2178,7 @@ Update-AzCostManagementExport -InputObject $oldExport -ScheduleRecurrence 'Weekl
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport
+Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -2003,7 +2190,7 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId ]: The target operation Id.
[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.
@@ -2012,10 +2199,12 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.costmanagement/update-azcostmanagementexport
#>
function Update-AzCostManagementExport {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IExport])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Alias('ExportName')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[System.String]
@@ -2023,6 +2212,8 @@ param(
${Name},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[System.String]
# This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'.
@@ -2032,10 +2223,10 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String[]]
# Array of column names to be included in the export.
@@ -2043,108 +2234,164 @@ param(
# The available columns can vary by customer channel (see examples).
${ConfigurationColumn},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType]
+ [System.String]
# The granularity of rows in the export.
# Currently only 'Daily' is supported.
${DataSetGranularity},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType]
+ [System.String]
# The time frame for pulling data for the export.
# If custom, then a specific time period must be provided.
${DefinitionTimeframe},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Usage", "ActualCost", "AmortizedCost")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType]
+ [System.String]
# 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.
${DefinitionType},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The name of the container where exports will be uploaded.
+ # If the container does not exist it will be created.
${DestinationContainer},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The resource id of the storage account where exports will be delivered.
+ # This is not required if a sasToken and storageAccount are specified.
${DestinationResourceId},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# The name of the directory where exports will be uploaded.
${DestinationRootFolderPath},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # A SAS token for the storage account.
+ # For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId.
+ # Note: the value returned by the API for this property will always be obfuscated.
+ # Returning this same obfuscated value will not result in the SAS token being updated.
+ # To update this value a new SAS token must be specified.
+ ${DestinationSasToken},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # The storage account where exports will be uploaded.
+ # For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId.
+ ${DestinationStorageAccount},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.String]
# eTag of the resource.
# To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
${ETag},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Csv")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType]
+ [System.String]
# The format of the export being delivered.
# Currently only 'Csv' is supported.
${Format},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.
+ # Note: this option is currently available only for modern commerce scopes.
+ ${PartitionData},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The start date of recurrence.
${RecurrencePeriodFrom},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The end date of recurrence.
${RecurrencePeriodTo},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Daily", "Weekly", "Monthly", "Annually")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType]
+ [System.String]
# The schedule recurrence.
${ScheduleRecurrence},
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType])]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PSArgumentCompleterAttribute("Active", "Inactive")]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType]
+ [System.String]
# The status of the export's schedule.
# If 'Inactive', the export's schedule is paused.
${ScheduleStatus},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The start date for export data.
${TimePeriodFrom},
- [Parameter()]
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
[System.DateTime]
# The end date for export data.
${TimePeriodTo},
+ [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Json string supplied to the Update operation
+ ${JsonString},
+
+ [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Update operation
+ ${JsonFilePath},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter(DontShow)]
@@ -2194,6 +2441,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -2214,6 +2470,8 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.CostManagement.custom\Update-AzCostManagementExport';
+ UpdateViaJsonString = 'Az.CostManagement.custom\Update-AzCostManagementExport';
+ UpdateViaJsonFilePath = 'Az.CostManagement.custom\Update-AzCostManagementExport';
UpdateViaIdentityExpanded = 'Az.CostManagement.custom\Update-AzCostManagementExport';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
@@ -2223,6 +2481,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1 b/generated/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1
index b82d9c0343b2..a40f688b9469 100644
--- a/generated/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1
+++ b/generated/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1
@@ -40,13 +40,15 @@ INPUTOBJECT : Identity Parameter
[BillingProfileId ]: BillingProfile 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.
+ [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
[OperationId