1. Packages
  2. Azure Classic
  3. API Docs
  4. core
  5. ResourceGroupCostManagementView

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.core.ResourceGroupCostManagementView

Explore with Pulumi AI

Manages an Azure Cost Management View for a Resource Group.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleResourceGroupCostManagementView = new azure.core.ResourceGroupCostManagementView("example", {
    name: "example",
    displayName: "Cost View per Month",
    chartType: "StackedColumn",
    accumulated: false,
    resourceGroupId: example.id,
    reportType: "Usage",
    timeframe: "MonthToDate",
    dataset: {
        granularity: "Monthly",
        aggregations: [{
            name: "totalCost",
            columnName: "Cost",
        }],
    },
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_resource_group_cost_management_view = azure.core.ResourceGroupCostManagementView("example",
    name="example",
    display_name="Cost View per Month",
    chart_type="StackedColumn",
    accumulated=False,
    resource_group_id=example.id,
    report_type="Usage",
    timeframe="MonthToDate",
    dataset={
        "granularity": "Monthly",
        "aggregations": [{
            "name": "totalCost",
            "column_name": "Cost",
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = core.NewResourceGroupCostManagementView(ctx, "example", &core.ResourceGroupCostManagementViewArgs{
			Name:            pulumi.String("example"),
			DisplayName:     pulumi.String("Cost View per Month"),
			ChartType:       pulumi.String("StackedColumn"),
			Accumulated:     pulumi.Bool(false),
			ResourceGroupId: example.ID(),
			ReportType:      pulumi.String("Usage"),
			Timeframe:       pulumi.String("MonthToDate"),
			Dataset: &core.ResourceGroupCostManagementViewDatasetArgs{
				Granularity: pulumi.String("Monthly"),
				Aggregations: core.ResourceGroupCostManagementViewDatasetAggregationArray{
					&core.ResourceGroupCostManagementViewDatasetAggregationArgs{
						Name:       pulumi.String("totalCost"),
						ColumnName: pulumi.String("Cost"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleResourceGroupCostManagementView = new Azure.Core.ResourceGroupCostManagementView("example", new()
    {
        Name = "example",
        DisplayName = "Cost View per Month",
        ChartType = "StackedColumn",
        Accumulated = false,
        ResourceGroupId = example.Id,
        ReportType = "Usage",
        Timeframe = "MonthToDate",
        Dataset = new Azure.Core.Inputs.ResourceGroupCostManagementViewDatasetArgs
        {
            Granularity = "Monthly",
            Aggregations = new[]
            {
                new Azure.Core.Inputs.ResourceGroupCostManagementViewDatasetAggregationArgs
                {
                    Name = "totalCost",
                    ColumnName = "Cost",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.core.ResourceGroupCostManagementView;
import com.pulumi.azure.core.ResourceGroupCostManagementViewArgs;
import com.pulumi.azure.core.inputs.ResourceGroupCostManagementViewDatasetArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var exampleResourceGroupCostManagementView = new ResourceGroupCostManagementView("exampleResourceGroupCostManagementView", ResourceGroupCostManagementViewArgs.builder()
            .name("example")
            .displayName("Cost View per Month")
            .chartType("StackedColumn")
            .accumulated(false)
            .resourceGroupId(example.id())
            .reportType("Usage")
            .timeframe("MonthToDate")
            .dataset(ResourceGroupCostManagementViewDatasetArgs.builder()
                .granularity("Monthly")
                .aggregations(ResourceGroupCostManagementViewDatasetAggregationArgs.builder()
                    .name("totalCost")
                    .columnName("Cost")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleResourceGroupCostManagementView:
    type: azure:core:ResourceGroupCostManagementView
    name: example
    properties:
      name: example
      displayName: Cost View per Month
      chartType: StackedColumn
      accumulated: false
      resourceGroupId: ${example.id}
      reportType: Usage
      timeframe: MonthToDate
      dataset:
        granularity: Monthly
        aggregations:
          - name: totalCost
            columnName: Cost
Copy

Create ResourceGroupCostManagementView Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ResourceGroupCostManagementView(name: string, args: ResourceGroupCostManagementViewArgs, opts?: CustomResourceOptions);
@overload
def ResourceGroupCostManagementView(resource_name: str,
                                    args: ResourceGroupCostManagementViewArgs,
                                    opts: Optional[ResourceOptions] = None)

@overload
def ResourceGroupCostManagementView(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    accumulated: Optional[bool] = None,
                                    chart_type: Optional[str] = None,
                                    dataset: Optional[ResourceGroupCostManagementViewDatasetArgs] = None,
                                    display_name: Optional[str] = None,
                                    report_type: Optional[str] = None,
                                    resource_group_id: Optional[str] = None,
                                    timeframe: Optional[str] = None,
                                    kpis: Optional[Sequence[ResourceGroupCostManagementViewKpiArgs]] = None,
                                    name: Optional[str] = None,
                                    pivots: Optional[Sequence[ResourceGroupCostManagementViewPivotArgs]] = None)
func NewResourceGroupCostManagementView(ctx *Context, name string, args ResourceGroupCostManagementViewArgs, opts ...ResourceOption) (*ResourceGroupCostManagementView, error)
public ResourceGroupCostManagementView(string name, ResourceGroupCostManagementViewArgs args, CustomResourceOptions? opts = null)
public ResourceGroupCostManagementView(String name, ResourceGroupCostManagementViewArgs args)
public ResourceGroupCostManagementView(String name, ResourceGroupCostManagementViewArgs args, CustomResourceOptions options)
type: azure:core:ResourceGroupCostManagementView
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ResourceGroupCostManagementViewArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ResourceGroupCostManagementViewArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ResourceGroupCostManagementViewArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ResourceGroupCostManagementViewArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ResourceGroupCostManagementViewArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var resourceGroupCostManagementViewResource = new Azure.Core.ResourceGroupCostManagementView("resourceGroupCostManagementViewResource", new()
{
    Accumulated = false,
    ChartType = "string",
    Dataset = new Azure.Core.Inputs.ResourceGroupCostManagementViewDatasetArgs
    {
        Aggregations = new[]
        {
            new Azure.Core.Inputs.ResourceGroupCostManagementViewDatasetAggregationArgs
            {
                ColumnName = "string",
                Name = "string",
            },
        },
        Granularity = "string",
        Groupings = new[]
        {
            new Azure.Core.Inputs.ResourceGroupCostManagementViewDatasetGroupingArgs
            {
                Name = "string",
                Type = "string",
            },
        },
        Sortings = new[]
        {
            new Azure.Core.Inputs.ResourceGroupCostManagementViewDatasetSortingArgs
            {
                Direction = "string",
                Name = "string",
            },
        },
    },
    DisplayName = "string",
    ReportType = "string",
    ResourceGroupId = "string",
    Timeframe = "string",
    Kpis = new[]
    {
        new Azure.Core.Inputs.ResourceGroupCostManagementViewKpiArgs
        {
            Type = "string",
        },
    },
    Name = "string",
    Pivots = new[]
    {
        new Azure.Core.Inputs.ResourceGroupCostManagementViewPivotArgs
        {
            Name = "string",
            Type = "string",
        },
    },
});
Copy
example, err := core.NewResourceGroupCostManagementView(ctx, "resourceGroupCostManagementViewResource", &core.ResourceGroupCostManagementViewArgs{
	Accumulated: pulumi.Bool(false),
	ChartType:   pulumi.String("string"),
	Dataset: &core.ResourceGroupCostManagementViewDatasetArgs{
		Aggregations: core.ResourceGroupCostManagementViewDatasetAggregationArray{
			&core.ResourceGroupCostManagementViewDatasetAggregationArgs{
				ColumnName: pulumi.String("string"),
				Name:       pulumi.String("string"),
			},
		},
		Granularity: pulumi.String("string"),
		Groupings: core.ResourceGroupCostManagementViewDatasetGroupingArray{
			&core.ResourceGroupCostManagementViewDatasetGroupingArgs{
				Name: pulumi.String("string"),
				Type: pulumi.String("string"),
			},
		},
		Sortings: core.ResourceGroupCostManagementViewDatasetSortingArray{
			&core.ResourceGroupCostManagementViewDatasetSortingArgs{
				Direction: pulumi.String("string"),
				Name:      pulumi.String("string"),
			},
		},
	},
	DisplayName:     pulumi.String("string"),
	ReportType:      pulumi.String("string"),
	ResourceGroupId: pulumi.String("string"),
	Timeframe:       pulumi.String("string"),
	Kpis: core.ResourceGroupCostManagementViewKpiArray{
		&core.ResourceGroupCostManagementViewKpiArgs{
			Type: pulumi.String("string"),
		},
	},
	Name: pulumi.String("string"),
	Pivots: core.ResourceGroupCostManagementViewPivotArray{
		&core.ResourceGroupCostManagementViewPivotArgs{
			Name: pulumi.String("string"),
			Type: pulumi.String("string"),
		},
	},
})
Copy
var resourceGroupCostManagementViewResource = new ResourceGroupCostManagementView("resourceGroupCostManagementViewResource", ResourceGroupCostManagementViewArgs.builder()
    .accumulated(false)
    .chartType("string")
    .dataset(ResourceGroupCostManagementViewDatasetArgs.builder()
        .aggregations(ResourceGroupCostManagementViewDatasetAggregationArgs.builder()
            .columnName("string")
            .name("string")
            .build())
        .granularity("string")
        .groupings(ResourceGroupCostManagementViewDatasetGroupingArgs.builder()
            .name("string")
            .type("string")
            .build())
        .sortings(ResourceGroupCostManagementViewDatasetSortingArgs.builder()
            .direction("string")
            .name("string")
            .build())
        .build())
    .displayName("string")
    .reportType("string")
    .resourceGroupId("string")
    .timeframe("string")
    .kpis(ResourceGroupCostManagementViewKpiArgs.builder()
        .type("string")
        .build())
    .name("string")
    .pivots(ResourceGroupCostManagementViewPivotArgs.builder()
        .name("string")
        .type("string")
        .build())
    .build());
Copy
resource_group_cost_management_view_resource = azure.core.ResourceGroupCostManagementView("resourceGroupCostManagementViewResource",
    accumulated=False,
    chart_type="string",
    dataset={
        "aggregations": [{
            "column_name": "string",
            "name": "string",
        }],
        "granularity": "string",
        "groupings": [{
            "name": "string",
            "type": "string",
        }],
        "sortings": [{
            "direction": "string",
            "name": "string",
        }],
    },
    display_name="string",
    report_type="string",
    resource_group_id="string",
    timeframe="string",
    kpis=[{
        "type": "string",
    }],
    name="string",
    pivots=[{
        "name": "string",
        "type": "string",
    }])
Copy
const resourceGroupCostManagementViewResource = new azure.core.ResourceGroupCostManagementView("resourceGroupCostManagementViewResource", {
    accumulated: false,
    chartType: "string",
    dataset: {
        aggregations: [{
            columnName: "string",
            name: "string",
        }],
        granularity: "string",
        groupings: [{
            name: "string",
            type: "string",
        }],
        sortings: [{
            direction: "string",
            name: "string",
        }],
    },
    displayName: "string",
    reportType: "string",
    resourceGroupId: "string",
    timeframe: "string",
    kpis: [{
        type: "string",
    }],
    name: "string",
    pivots: [{
        name: "string",
        type: "string",
    }],
});
Copy
type: azure:core:ResourceGroupCostManagementView
properties:
    accumulated: false
    chartType: string
    dataset:
        aggregations:
            - columnName: string
              name: string
        granularity: string
        groupings:
            - name: string
              type: string
        sortings:
            - direction: string
              name: string
    displayName: string
    kpis:
        - type: string
    name: string
    pivots:
        - name: string
          type: string
    reportType: string
    resourceGroupId: string
    timeframe: string
Copy

ResourceGroupCostManagementView Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ResourceGroupCostManagementView resource accepts the following input properties:

Accumulated
This property is required.
Changes to this property will trigger replacement.
bool
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
ChartType This property is required. string
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
Dataset This property is required. ResourceGroupCostManagementViewDataset
A dataset block as defined below.
DisplayName This property is required. string
User visible input name of the Cost Management View.
ReportType This property is required. string
The type of the report. The only possible value is Usage.
ResourceGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
Timeframe This property is required. string
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
Kpis List<ResourceGroupCostManagementViewKpi>
One or more kpi blocks as defined below, to show in Cost Analysis UI.
Name Changes to this property will trigger replacement. string
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
Pivots List<ResourceGroupCostManagementViewPivot>
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
Accumulated
This property is required.
Changes to this property will trigger replacement.
bool
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
ChartType This property is required. string
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
Dataset This property is required. ResourceGroupCostManagementViewDatasetArgs
A dataset block as defined below.
DisplayName This property is required. string
User visible input name of the Cost Management View.
ReportType This property is required. string
The type of the report. The only possible value is Usage.
ResourceGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
Timeframe This property is required. string
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
Kpis []ResourceGroupCostManagementViewKpiArgs
One or more kpi blocks as defined below, to show in Cost Analysis UI.
Name Changes to this property will trigger replacement. string
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
Pivots []ResourceGroupCostManagementViewPivotArgs
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
accumulated
This property is required.
Changes to this property will trigger replacement.
Boolean
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chartType This property is required. String
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset This property is required. ResourceGroupCostManagementViewDataset
A dataset block as defined below.
displayName This property is required. String
User visible input name of the Cost Management View.
reportType This property is required. String
The type of the report. The only possible value is Usage.
resourceGroupId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe This property is required. String
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
kpis List<ResourceGroupCostManagementViewKpi>
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. String
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots List<ResourceGroupCostManagementViewPivot>
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
accumulated
This property is required.
Changes to this property will trigger replacement.
boolean
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chartType This property is required. string
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset This property is required. ResourceGroupCostManagementViewDataset
A dataset block as defined below.
displayName This property is required. string
User visible input name of the Cost Management View.
reportType This property is required. string
The type of the report. The only possible value is Usage.
resourceGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe This property is required. string
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
kpis ResourceGroupCostManagementViewKpi[]
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. string
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots ResourceGroupCostManagementViewPivot[]
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
accumulated
This property is required.
Changes to this property will trigger replacement.
bool
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chart_type This property is required. str
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset This property is required. ResourceGroupCostManagementViewDatasetArgs
A dataset block as defined below.
display_name This property is required. str
User visible input name of the Cost Management View.
report_type This property is required. str
The type of the report. The only possible value is Usage.
resource_group_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe This property is required. str
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
kpis Sequence[ResourceGroupCostManagementViewKpiArgs]
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. str
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots Sequence[ResourceGroupCostManagementViewPivotArgs]
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
accumulated
This property is required.
Changes to this property will trigger replacement.
Boolean
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chartType This property is required. String
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset This property is required. Property Map
A dataset block as defined below.
displayName This property is required. String
User visible input name of the Cost Management View.
reportType This property is required. String
The type of the report. The only possible value is Usage.
resourceGroupId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe This property is required. String
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
kpis List<Property Map>
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. String
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots List<Property Map>
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.

Outputs

All input properties are implicitly available as output properties. Additionally, the ResourceGroupCostManagementView resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ResourceGroupCostManagementView Resource

Get an existing ResourceGroupCostManagementView resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ResourceGroupCostManagementViewState, opts?: CustomResourceOptions): ResourceGroupCostManagementView
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accumulated: Optional[bool] = None,
        chart_type: Optional[str] = None,
        dataset: Optional[ResourceGroupCostManagementViewDatasetArgs] = None,
        display_name: Optional[str] = None,
        kpis: Optional[Sequence[ResourceGroupCostManagementViewKpiArgs]] = None,
        name: Optional[str] = None,
        pivots: Optional[Sequence[ResourceGroupCostManagementViewPivotArgs]] = None,
        report_type: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        timeframe: Optional[str] = None) -> ResourceGroupCostManagementView
func GetResourceGroupCostManagementView(ctx *Context, name string, id IDInput, state *ResourceGroupCostManagementViewState, opts ...ResourceOption) (*ResourceGroupCostManagementView, error)
public static ResourceGroupCostManagementView Get(string name, Input<string> id, ResourceGroupCostManagementViewState? state, CustomResourceOptions? opts = null)
public static ResourceGroupCostManagementView get(String name, Output<String> id, ResourceGroupCostManagementViewState state, CustomResourceOptions options)
resources:  _:    type: azure:core:ResourceGroupCostManagementView    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Accumulated Changes to this property will trigger replacement. bool
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
ChartType string
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
Dataset ResourceGroupCostManagementViewDataset
A dataset block as defined below.
DisplayName string
User visible input name of the Cost Management View.
Kpis List<ResourceGroupCostManagementViewKpi>
One or more kpi blocks as defined below, to show in Cost Analysis UI.
Name Changes to this property will trigger replacement. string
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
Pivots List<ResourceGroupCostManagementViewPivot>
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
ReportType string
The type of the report. The only possible value is Usage.
ResourceGroupId Changes to this property will trigger replacement. string
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
Timeframe string
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
Accumulated Changes to this property will trigger replacement. bool
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
ChartType string
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
Dataset ResourceGroupCostManagementViewDatasetArgs
A dataset block as defined below.
DisplayName string
User visible input name of the Cost Management View.
Kpis []ResourceGroupCostManagementViewKpiArgs
One or more kpi blocks as defined below, to show in Cost Analysis UI.
Name Changes to this property will trigger replacement. string
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
Pivots []ResourceGroupCostManagementViewPivotArgs
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
ReportType string
The type of the report. The only possible value is Usage.
ResourceGroupId Changes to this property will trigger replacement. string
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
Timeframe string
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
accumulated Changes to this property will trigger replacement. Boolean
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chartType String
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset ResourceGroupCostManagementViewDataset
A dataset block as defined below.
displayName String
User visible input name of the Cost Management View.
kpis List<ResourceGroupCostManagementViewKpi>
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. String
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots List<ResourceGroupCostManagementViewPivot>
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
reportType String
The type of the report. The only possible value is Usage.
resourceGroupId Changes to this property will trigger replacement. String
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe String
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
accumulated Changes to this property will trigger replacement. boolean
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chartType string
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset ResourceGroupCostManagementViewDataset
A dataset block as defined below.
displayName string
User visible input name of the Cost Management View.
kpis ResourceGroupCostManagementViewKpi[]
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. string
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots ResourceGroupCostManagementViewPivot[]
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
reportType string
The type of the report. The only possible value is Usage.
resourceGroupId Changes to this property will trigger replacement. string
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe string
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
accumulated Changes to this property will trigger replacement. bool
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chart_type str
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset ResourceGroupCostManagementViewDatasetArgs
A dataset block as defined below.
display_name str
User visible input name of the Cost Management View.
kpis Sequence[ResourceGroupCostManagementViewKpiArgs]
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. str
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots Sequence[ResourceGroupCostManagementViewPivotArgs]
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
report_type str
The type of the report. The only possible value is Usage.
resource_group_id Changes to this property will trigger replacement. str
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe str
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.
accumulated Changes to this property will trigger replacement. Boolean
Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created.
chartType String
Chart type of the main view in Cost Analysis. Possible values are Area, GroupedColumn, Line, StackedColumn and Table.
dataset Property Map
A dataset block as defined below.
displayName String
User visible input name of the Cost Management View.
kpis List<Property Map>
One or more kpi blocks as defined below, to show in Cost Analysis UI.
name Changes to this property will trigger replacement. String
The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created.
pivots List<Property Map>
One or more pivot blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots.
reportType String
The type of the report. The only possible value is Usage.
resourceGroupId Changes to this property will trigger replacement. String
The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created.
timeframe String
The time frame for pulling data for the report. Possible values are Custom, MonthToDate, WeekToDate and YearToDate.

Supporting Types

ResourceGroupCostManagementViewDataset
, ResourceGroupCostManagementViewDatasetArgs

Aggregations This property is required. List<ResourceGroupCostManagementViewDatasetAggregation>
One or more aggregation blocks as defined above.
Granularity This property is required. string
The granularity of rows in the report. Possible values are Daily and Monthly.
Groupings List<ResourceGroupCostManagementViewDatasetGrouping>
One or more grouping blocks as defined below.
Sortings List<ResourceGroupCostManagementViewDatasetSorting>
One or more sorting blocks as defined below, containing the order by expression to be used in the report
Aggregations This property is required. []ResourceGroupCostManagementViewDatasetAggregation
One or more aggregation blocks as defined above.
Granularity This property is required. string
The granularity of rows in the report. Possible values are Daily and Monthly.
Groupings []ResourceGroupCostManagementViewDatasetGrouping
One or more grouping blocks as defined below.
Sortings []ResourceGroupCostManagementViewDatasetSorting
One or more sorting blocks as defined below, containing the order by expression to be used in the report
aggregations This property is required. List<ResourceGroupCostManagementViewDatasetAggregation>
One or more aggregation blocks as defined above.
granularity This property is required. String
The granularity of rows in the report. Possible values are Daily and Monthly.
groupings List<ResourceGroupCostManagementViewDatasetGrouping>
One or more grouping blocks as defined below.
sortings List<ResourceGroupCostManagementViewDatasetSorting>
One or more sorting blocks as defined below, containing the order by expression to be used in the report
aggregations This property is required. ResourceGroupCostManagementViewDatasetAggregation[]
One or more aggregation blocks as defined above.
granularity This property is required. string
The granularity of rows in the report. Possible values are Daily and Monthly.
groupings ResourceGroupCostManagementViewDatasetGrouping[]
One or more grouping blocks as defined below.
sortings ResourceGroupCostManagementViewDatasetSorting[]
One or more sorting blocks as defined below, containing the order by expression to be used in the report
aggregations This property is required. Sequence[ResourceGroupCostManagementViewDatasetAggregation]
One or more aggregation blocks as defined above.
granularity This property is required. str
The granularity of rows in the report. Possible values are Daily and Monthly.
groupings Sequence[ResourceGroupCostManagementViewDatasetGrouping]
One or more grouping blocks as defined below.
sortings Sequence[ResourceGroupCostManagementViewDatasetSorting]
One or more sorting blocks as defined below, containing the order by expression to be used in the report
aggregations This property is required. List<Property Map>
One or more aggregation blocks as defined above.
granularity This property is required. String
The granularity of rows in the report. Possible values are Daily and Monthly.
groupings List<Property Map>
One or more grouping blocks as defined below.
sortings List<Property Map>
One or more sorting blocks as defined below, containing the order by expression to be used in the report

ResourceGroupCostManagementViewDatasetAggregation
, ResourceGroupCostManagementViewDatasetAggregationArgs

ColumnName
This property is required.
Changes to this property will trigger replacement.
string
The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created.
Name
This property is required.
Changes to this property will trigger replacement.
string
The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created.
ColumnName
This property is required.
Changes to this property will trigger replacement.
string
The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created.
Name
This property is required.
Changes to this property will trigger replacement.
string
The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created.
columnName
This property is required.
Changes to this property will trigger replacement.
String
The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created.
name
This property is required.
Changes to this property will trigger replacement.
String
The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created.
columnName
This property is required.
Changes to this property will trigger replacement.
string
The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created.
name
This property is required.
Changes to this property will trigger replacement.
string
The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created.
column_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created.
name
This property is required.
Changes to this property will trigger replacement.
str
The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created.
columnName
This property is required.
Changes to this property will trigger replacement.
String
The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created.
name
This property is required.
Changes to this property will trigger replacement.
String
The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created.

ResourceGroupCostManagementViewDatasetGrouping
, ResourceGroupCostManagementViewDatasetGroupingArgs

Name This property is required. string
The name of the column to group.
Type This property is required. string
The type of the column. Possible values are Dimension and TagKey.
Name This property is required. string
The name of the column to group.
Type This property is required. string
The type of the column. Possible values are Dimension and TagKey.
name This property is required. String
The name of the column to group.
type This property is required. String
The type of the column. Possible values are Dimension and TagKey.
name This property is required. string
The name of the column to group.
type This property is required. string
The type of the column. Possible values are Dimension and TagKey.
name This property is required. str
The name of the column to group.
type This property is required. str
The type of the column. Possible values are Dimension and TagKey.
name This property is required. String
The name of the column to group.
type This property is required. String
The type of the column. Possible values are Dimension and TagKey.

ResourceGroupCostManagementViewDatasetSorting
, ResourceGroupCostManagementViewDatasetSortingArgs

Direction This property is required. string
Direction of sort. Possible values are Ascending and Descending.
Name This property is required. string
The name of the column to sort.
Direction This property is required. string
Direction of sort. Possible values are Ascending and Descending.
Name This property is required. string
The name of the column to sort.
direction This property is required. String
Direction of sort. Possible values are Ascending and Descending.
name This property is required. String
The name of the column to sort.
direction This property is required. string
Direction of sort. Possible values are Ascending and Descending.
name This property is required. string
The name of the column to sort.
direction This property is required. str
Direction of sort. Possible values are Ascending and Descending.
name This property is required. str
The name of the column to sort.
direction This property is required. String
Direction of sort. Possible values are Ascending and Descending.
name This property is required. String
The name of the column to sort.

ResourceGroupCostManagementViewKpi
, ResourceGroupCostManagementViewKpiArgs

Type This property is required. string
KPI type. Possible values are Budget and Forecast.
Type This property is required. string
KPI type. Possible values are Budget and Forecast.
type This property is required. String
KPI type. Possible values are Budget and Forecast.
type This property is required. string
KPI type. Possible values are Budget and Forecast.
type This property is required. str
KPI type. Possible values are Budget and Forecast.
type This property is required. String
KPI type. Possible values are Budget and Forecast.

ResourceGroupCostManagementViewPivot
, ResourceGroupCostManagementViewPivotArgs

Name This property is required. string
The name of the column which should be used for this sub-view in the Cost Analysis UI.
Type This property is required. string
The data type to show in this sub-view. Possible values are Dimension and TagKey.
Name This property is required. string
The name of the column which should be used for this sub-view in the Cost Analysis UI.
Type This property is required. string
The data type to show in this sub-view. Possible values are Dimension and TagKey.
name This property is required. String
The name of the column which should be used for this sub-view in the Cost Analysis UI.
type This property is required. String
The data type to show in this sub-view. Possible values are Dimension and TagKey.
name This property is required. string
The name of the column which should be used for this sub-view in the Cost Analysis UI.
type This property is required. string
The data type to show in this sub-view. Possible values are Dimension and TagKey.
name This property is required. str
The name of the column which should be used for this sub-view in the Cost Analysis UI.
type This property is required. str
The data type to show in this sub-view. Possible values are Dimension and TagKey.
name This property is required. String
The name of the column which should be used for this sub-view in the Cost Analysis UI.
type This property is required. String
The data type to show in this sub-view. Possible values are Dimension and TagKey.

Import

Cost Management View for a Resource Groups can be imported using the resource id, e.g.

$ pulumi import azure:core/resourceGroupCostManagementView:ResourceGroupCostManagementView example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.CostManagement/views/costmanagementview
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.