ViewByScopeArgs

data class ViewByScopeArgs(val accumulated: Output<Either<String, AccumulatedType>>? = null, val chart: Output<Either<String, ChartType>>? = null, val dataSet: Output<ReportConfigDatasetArgs>? = null, val displayName: Output<String>? = null, val eTag: Output<String>? = null, val kpis: Output<List<KpiPropertiesArgs>>? = null, val metric: Output<Either<String, MetricType>>? = null, val pivots: Output<List<PivotPropertiesArgs>>? = null, val scope: Output<String>? = null, val timePeriod: Output<ReportConfigTimePeriodArgs>? = null, val timeframe: Output<Either<String, ReportTimeframeType>>? = null, val type: Output<Either<String, ReportType>>? = null, val viewName: Output<String>? = null) : ConvertibleToJava<ViewByScopeArgs>

States and configurations of Cost Analysis. API Version: 2019-11-01.

Example Usage

ResourceGroupCreateOrUpdateView

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var viewByScope = new AzureNative.CostManagement.ViewByScope("viewByScope", new()
{
Accumulated = "true",
Chart = "Table",
DataSet = new AzureNative.CostManagement.Inputs.ReportConfigDatasetArgs
{
Aggregation =
{
{ "totalCost", new AzureNative.CostManagement.Inputs.ReportConfigAggregationArgs
{
Function = "Sum",
Name = "PreTaxCost",
} },
},
Granularity = "Daily",
Grouping = new[] {},
Sorting = new[]
{
new AzureNative.CostManagement.Inputs.ReportConfigSortingArgs
{
Direction = "Ascending",
Name = "UsageDate",
},
},
},
DisplayName = "swagger Example",
ETag = "\"1d4ff9fe66f1d10\"",
Kpis = new[]
{
new AzureNative.CostManagement.Inputs.KpiPropertiesArgs
{
Enabled = true,
Type = "Forecast",
},
new AzureNative.CostManagement.Inputs.KpiPropertiesArgs
{
Enabled = true,
Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo",
Type = "Budget",
},
},
Metric = "ActualCost",
Pivots = new[]
{
new AzureNative.CostManagement.Inputs.PivotPropertiesArgs
{
Name = "ServiceName",
Type = "Dimension",
},
new AzureNative.CostManagement.Inputs.PivotPropertiesArgs
{
Name = "MeterCategory",
Type = "Dimension",
},
new AzureNative.CostManagement.Inputs.PivotPropertiesArgs
{
Name = "swaggerTagKey",
Type = "TagKey",
},
},
Scope = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG",
Timeframe = "MonthToDate",
Type = "Usage",
ViewName = "swaggerExample",
});
});
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costmanagement.NewViewByScope(ctx, "viewByScope", &costmanagement.ViewByScopeArgs{
Accumulated: pulumi.String("true"),
Chart: pulumi.String("Table"),
DataSet: costmanagement.ReportConfigDatasetResponse{
Aggregation: costmanagement.ReportConfigAggregationMap{
"totalCost": &costmanagement.ReportConfigAggregationArgs{
Function: pulumi.String("Sum"),
Name: pulumi.String("PreTaxCost"),
},
},
Granularity: pulumi.String("Daily"),
Grouping: costmanagement.ReportConfigGroupingArray{},
Sorting: costmanagement.ReportConfigSortingArray{
&costmanagement.ReportConfigSortingArgs{
Direction: pulumi.String("Ascending"),
Name: pulumi.String("UsageDate"),
},
},
},
DisplayName: pulumi.String("swagger Example"),
ETag: pulumi.String("\"1d4ff9fe66f1d10\""),
Kpis: []costmanagement.KpiPropertiesArgs{
{
Enabled: pulumi.Bool(true),
Type: pulumi.String("Forecast"),
},
{
Enabled: pulumi.Bool(true),
Id: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo"),
Type: pulumi.String("Budget"),
},
},
Metric: pulumi.String("ActualCost"),
Pivots: []costmanagement.PivotPropertiesArgs{
{
Name: pulumi.String("ServiceName"),
Type: pulumi.String("Dimension"),
},
{
Name: pulumi.String("MeterCategory"),
Type: pulumi.String("Dimension"),
},
{
Name: pulumi.String("swaggerTagKey"),
Type: pulumi.String("TagKey"),
},
},
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"),
Timeframe: pulumi.String("MonthToDate"),
Type: pulumi.String("Usage"),
ViewName: pulumi.String("swaggerExample"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.ViewByScope;
import com.pulumi.azurenative.costmanagement.ViewByScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var viewByScope = new ViewByScope("viewByScope", ViewByScopeArgs.builder()
.accumulated("true")
.chart("Table")
.dataSet(Map.ofEntries(
Map.entry("aggregation", Map.of("totalCost", Map.ofEntries(
Map.entry("function", "Sum"),
Map.entry("name", "PreTaxCost")
))),
Map.entry("granularity", "Daily"),
Map.entry("grouping", ),
Map.entry("sorting", Map.ofEntries(
Map.entry("direction", "Ascending"),
Map.entry("name", "UsageDate")
))
))
.displayName("swagger Example")
.eTag("\"1d4ff9fe66f1d10\"")
.kpis(
Map.ofEntries(
Map.entry("enabled", true),
Map.entry("type", "Forecast")
),
Map.ofEntries(
Map.entry("enabled", true),
Map.entry("id", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo"),
Map.entry("type", "Budget")
))
.metric("ActualCost")
.pivots(
Map.ofEntries(
Map.entry("name", "ServiceName"),
Map.entry("type", "Dimension")
),
Map.ofEntries(
Map.entry("name", "MeterCategory"),
Map.entry("type", "Dimension")
),
Map.ofEntries(
Map.entry("name", "swaggerTagKey"),
Map.entry("type", "TagKey")
))
.scope("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG")
.timeframe("MonthToDate")
.type("Usage")
.viewName("swaggerExample")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:costmanagement:ViewByScope swaggerExample /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/views/swaggerExample

Constructors

Link copied to clipboard
constructor(accumulated: Output<Either<String, AccumulatedType>>? = null, chart: Output<Either<String, ChartType>>? = null, dataSet: Output<ReportConfigDatasetArgs>? = null, displayName: Output<String>? = null, eTag: Output<String>? = null, kpis: Output<List<KpiPropertiesArgs>>? = null, metric: Output<Either<String, MetricType>>? = null, pivots: Output<List<PivotPropertiesArgs>>? = null, scope: Output<String>? = null, timePeriod: Output<ReportConfigTimePeriodArgs>? = null, timeframe: Output<Either<String, ReportTimeframeType>>? = null, type: Output<Either<String, ReportType>>? = null, viewName: Output<String>? = null)

Properties

Link copied to clipboard
val accumulated: Output<Either<String, AccumulatedType>>? = null

Show costs accumulated over time.

Link copied to clipboard
val chart: Output<Either<String, ChartType>>? = null

Chart type of the main view in Cost Analysis. Required.

Link copied to clipboard
val dataSet: Output<ReportConfigDatasetArgs>? = null

Has definition for data in this report config.

Link copied to clipboard
val displayName: Output<String>? = null

User input name of the view. Required.

Link copied to clipboard
val eTag: Output<String>? = null

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.

Link copied to clipboard
val kpis: Output<List<KpiPropertiesArgs>>? = null

List of KPIs to show in Cost Analysis UI.

Link copied to clipboard
val metric: Output<Either<String, MetricType>>? = null

Metric to use when displaying costs.

Link copied to clipboard
val pivots: Output<List<PivotPropertiesArgs>>? = null

Configuration of 3 sub-views in the Cost Analysis UI.

Link copied to clipboard
val scope: Output<String>? = null

Cost Management scope to save the view on. 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 ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.

Link copied to clipboard
val timeframe: Output<Either<String, ReportTimeframeType>>? = null

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

Link copied to clipboard

Has time period for pulling data for the report.

Link copied to clipboard
val type: Output<Either<String, ReportType>>? = null

The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.

Link copied to clipboard
val viewName: Output<String>? = null

View name

Functions

Link copied to clipboard
open override fun toJava(): ViewByScopeArgs