1. Packages
  2. Azure Native v2
  3. API Docs
  4. costmanagement
  5. Setting
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.costmanagement.Setting

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

State of the myscope setting. Azure REST API version: 2019-11-01. Prior API version in Azure Native 1.x: 2019-11-01.

Example Usage

CreateOrUpdateSetting

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var setting = new AzureNative.CostManagement.Setting("setting", new()
    {
        Cache = new[]
        {
            new AzureNative.CostManagement.Inputs.SettingsPropertiesCacheArgs
            {
                Channel = "Modern",
                Id = "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47",
                Name = "72f988bf-86f1-41af-91ab-2d7cd011db47",
                Parent = "/providers/Microsoft.Management/managementGroups/acm",
                Status = "enabled",
                Subchannel = "NotApplicable",
            },
        },
        Scope = "/subscriptions/00000000-0000-0000-0000-000000000000",
        SettingName = "myscope",
        StartOn = "LastUsed",
    });

});
Copy
package main

import (
	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costmanagement.NewSetting(ctx, "setting", &costmanagement.SettingArgs{
			Cache: costmanagement.SettingsPropertiesCacheArray{
				&costmanagement.SettingsPropertiesCacheArgs{
					Channel:    pulumi.String("Modern"),
					Id:         pulumi.String("/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47"),
					Name:       pulumi.String("72f988bf-86f1-41af-91ab-2d7cd011db47"),
					Parent:     pulumi.String("/providers/Microsoft.Management/managementGroups/acm"),
					Status:     pulumi.String("enabled"),
					Subchannel: pulumi.String("NotApplicable"),
				},
			},
			Scope:       pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000"),
			SettingName: pulumi.String("myscope"),
			StartOn:     pulumi.String("LastUsed"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.Setting;
import com.pulumi.azurenative.costmanagement.SettingArgs;
import com.pulumi.azurenative.costmanagement.inputs.SettingsPropertiesCacheArgs;
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 setting = new Setting("setting", SettingArgs.builder()
            .cache(SettingsPropertiesCacheArgs.builder()
                .channel("Modern")
                .id("/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47")
                .name("72f988bf-86f1-41af-91ab-2d7cd011db47")
                .parent("/providers/Microsoft.Management/managementGroups/acm")
                .status("enabled")
                .subchannel("NotApplicable")
                .build())
            .scope("/subscriptions/00000000-0000-0000-0000-000000000000")
            .settingName("myscope")
            .startOn("LastUsed")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const setting = new azure_native.costmanagement.Setting("setting", {
    cache: [{
        channel: "Modern",
        id: "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47",
        name: "72f988bf-86f1-41af-91ab-2d7cd011db47",
        parent: "/providers/Microsoft.Management/managementGroups/acm",
        status: "enabled",
        subchannel: "NotApplicable",
    }],
    scope: "/subscriptions/00000000-0000-0000-0000-000000000000",
    settingName: "myscope",
    startOn: "LastUsed",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

setting = azure_native.costmanagement.Setting("setting",
    cache=[{
        "channel": "Modern",
        "id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47",
        "name": "72f988bf-86f1-41af-91ab-2d7cd011db47",
        "parent": "/providers/Microsoft.Management/managementGroups/acm",
        "status": "enabled",
        "subchannel": "NotApplicable",
    }],
    scope="/subscriptions/00000000-0000-0000-0000-000000000000",
    setting_name="myscope",
    start_on="LastUsed")
Copy
resources:
  setting:
    type: azure-native:costmanagement:Setting
    properties:
      cache:
        - channel: Modern
          id: /providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47
          name: 72f988bf-86f1-41af-91ab-2d7cd011db47
          parent: /providers/Microsoft.Management/managementGroups/acm
          status: enabled
          subchannel: NotApplicable
      scope: /subscriptions/00000000-0000-0000-0000-000000000000
      settingName: myscope
      startOn: LastUsed
Copy

Create Setting Resource

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

Constructor syntax

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

@overload
def Setting(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            scope: Optional[str] = None,
            cache: Optional[Sequence[SettingsPropertiesCacheArgs]] = None,
            setting_name: Optional[str] = None,
            start_on: Optional[str] = None)
func NewSetting(ctx *Context, name string, args SettingArgs, opts ...ResourceOption) (*Setting, error)
public Setting(string name, SettingArgs args, CustomResourceOptions? opts = null)
public Setting(String name, SettingArgs args)
public Setting(String name, SettingArgs args, CustomResourceOptions options)
type: azure-native:costmanagement:Setting
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. SettingArgs
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. SettingArgs
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. SettingArgs
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. SettingArgs
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. SettingArgs
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 settingResource = new AzureNative.Costmanagement.Setting("settingResource", new()
{
    Scope = "string",
    Cache = new[]
    {
        
        {
            { "channel", "string" },
            { "id", "string" },
            { "name", "string" },
            { "subchannel", "string" },
            { "parent", "string" },
            { "status", "string" },
        },
    },
    SettingName = "string",
    StartOn = "string",
});
Copy
example, err := costmanagement.NewSetting(ctx, "settingResource", &costmanagement.SettingArgs{
	Scope: "string",
	Cache: []map[string]interface{}{
		map[string]interface{}{
			"channel":    "string",
			"id":         "string",
			"name":       "string",
			"subchannel": "string",
			"parent":     "string",
			"status":     "string",
		},
	},
	SettingName: "string",
	StartOn:     "string",
})
Copy
var settingResource = new Setting("settingResource", SettingArgs.builder()
    .scope("string")
    .cache(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .settingName("string")
    .startOn("string")
    .build());
Copy
setting_resource = azure_native.costmanagement.Setting("settingResource",
    scope=string,
    cache=[{
        channel: string,
        id: string,
        name: string,
        subchannel: string,
        parent: string,
        status: string,
    }],
    setting_name=string,
    start_on=string)
Copy
const settingResource = new azure_native.costmanagement.Setting("settingResource", {
    scope: "string",
    cache: [{
        channel: "string",
        id: "string",
        name: "string",
        subchannel: "string",
        parent: "string",
        status: "string",
    }],
    settingName: "string",
    startOn: "string",
});
Copy
type: azure-native:costmanagement:Setting
properties:
    cache:
        - channel: string
          id: string
          name: string
          parent: string
          status: string
          subchannel: string
    scope: string
    settingName: string
    startOn: string
Copy

Setting 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 Setting resource accepts the following input properties:

Scope This property is required. string
Sets the default scope the current user will see when they sign into Azure Cost Management in the Azure portal.
Cache List<Pulumi.AzureNative.CostManagement.Inputs.SettingsPropertiesCache>
Array of scopes with additional details used by Cost Management in the Azure portal.
SettingName Changes to this property will trigger replacement. string
Name of the setting. Allowed values: myscope
StartOn string
Indicates what scope Cost Management in the Azure portal should default to. Allowed values: LastUsed.
Scope This property is required. string
Sets the default scope the current user will see when they sign into Azure Cost Management in the Azure portal.
Cache []SettingsPropertiesCacheArgs
Array of scopes with additional details used by Cost Management in the Azure portal.
SettingName Changes to this property will trigger replacement. string
Name of the setting. Allowed values: myscope
StartOn string
Indicates what scope Cost Management in the Azure portal should default to. Allowed values: LastUsed.
scope This property is required. String
Sets the default scope the current user will see when they sign into Azure Cost Management in the Azure portal.
cache List<SettingsPropertiesCache>
Array of scopes with additional details used by Cost Management in the Azure portal.
settingName Changes to this property will trigger replacement. String
Name of the setting. Allowed values: myscope
startOn String
Indicates what scope Cost Management in the Azure portal should default to. Allowed values: LastUsed.
scope This property is required. string
Sets the default scope the current user will see when they sign into Azure Cost Management in the Azure portal.
cache SettingsPropertiesCache[]
Array of scopes with additional details used by Cost Management in the Azure portal.
settingName Changes to this property will trigger replacement. string
Name of the setting. Allowed values: myscope
startOn string
Indicates what scope Cost Management in the Azure portal should default to. Allowed values: LastUsed.
scope This property is required. str
Sets the default scope the current user will see when they sign into Azure Cost Management in the Azure portal.
cache Sequence[SettingsPropertiesCacheArgs]
Array of scopes with additional details used by Cost Management in the Azure portal.
setting_name Changes to this property will trigger replacement. str
Name of the setting. Allowed values: myscope
start_on str
Indicates what scope Cost Management in the Azure portal should default to. Allowed values: LastUsed.
scope This property is required. String
Sets the default scope the current user will see when they sign into Azure Cost Management in the Azure portal.
cache List<Property Map>
Array of scopes with additional details used by Cost Management in the Azure portal.
settingName Changes to this property will trigger replacement. String
Name of the setting. Allowed values: myscope
startOn String
Indicates what scope Cost Management in the Azure portal should default to. Allowed values: LastUsed.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Kind string
Resource kind.
Name string
Resource name.
Type string
Resource type.
Id string
The provider-assigned unique ID for this managed resource.
Kind string
Resource kind.
Name string
Resource name.
Type string
Resource type.
id String
The provider-assigned unique ID for this managed resource.
kind String
Resource kind.
name String
Resource name.
type String
Resource type.
id string
The provider-assigned unique ID for this managed resource.
kind string
Resource kind.
name string
Resource name.
type string
Resource type.
id str
The provider-assigned unique ID for this managed resource.
kind str
Resource kind.
name str
Resource name.
type str
Resource type.
id String
The provider-assigned unique ID for this managed resource.
kind String
Resource kind.
name String
Resource name.
type String
Resource type.

Supporting Types

SettingsPropertiesCache
, SettingsPropertiesCacheArgs

Channel This property is required. string
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
Id This property is required. string
Resource ID used by Resource Manager to uniquely identify the scope.
Name This property is required. string
Display name for the scope.
Subchannel This property is required. string
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
Parent string
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
Status string
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
Channel This property is required. string
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
Id This property is required. string
Resource ID used by Resource Manager to uniquely identify the scope.
Name This property is required. string
Display name for the scope.
Subchannel This property is required. string
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
Parent string
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
Status string
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. String
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. String
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. String
Display name for the scope.
subchannel This property is required. String
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent String
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status String
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. string
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. string
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. string
Display name for the scope.
subchannel This property is required. string
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent string
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status string
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. str
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. str
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. str
Display name for the scope.
subchannel This property is required. str
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent str
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status str
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. String
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. String
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. String
Display name for the scope.
subchannel This property is required. String
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent String
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status String
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.

SettingsPropertiesResponseCache
, SettingsPropertiesResponseCacheArgs

Channel This property is required. string
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
Id This property is required. string
Resource ID used by Resource Manager to uniquely identify the scope.
Name This property is required. string
Display name for the scope.
Subchannel This property is required. string
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
Parent string
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
Status string
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
Channel This property is required. string
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
Id This property is required. string
Resource ID used by Resource Manager to uniquely identify the scope.
Name This property is required. string
Display name for the scope.
Subchannel This property is required. string
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
Parent string
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
Status string
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. String
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. String
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. String
Display name for the scope.
subchannel This property is required. String
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent String
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status String
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. string
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. string
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. string
Display name for the scope.
subchannel This property is required. string
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent string
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status string
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. str
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. str
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. str
Display name for the scope.
subchannel This property is required. str
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent str
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status str
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.
channel This property is required. String
Indicates the account type. Allowed values include: EA, PAYG, Modern, Internal, Unknown.
id This property is required. String
Resource ID used by Resource Manager to uniquely identify the scope.
name This property is required. String
Display name for the scope.
subchannel This property is required. String
Indicates the type of modern account. Allowed values include: Individual, Enterprise, Partner, Indirect, NotApplicable
parent String
Resource ID of the parent scope. For instance, subscription's resource ID for a resource group or a management group resource ID for a subscription.
status String
Indicates the status of the scope. Status only applies to subscriptions and billing accounts.

Import

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

$ pulumi import azure-native:costmanagement:Setting myscope /providers/Microsoft.CostManagement/settings/{settingName} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi