azure-native.costmanagement.TagInheritanceSetting
Explore with Pulumi AI
Tag Inheritance Setting definition.
Uses Azure REST API version 2024-08-01. In version 2.x of the Azure Native provider, it used API version 2022-10-05-preview.
Example Usage
CreateOrUpdateSettingByScope
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var tagInheritanceSetting = new AzureNative.CostManagement.TagInheritanceSetting("tagInheritanceSetting", new()
{
Kind = "taginheritance",
Properties = new AzureNative.CostManagement.Inputs.TagInheritancePropertiesArgs
{
PreferContainerTags = false,
},
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
Type = "taginheritance",
});
});
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costmanagement.NewTagInheritanceSetting(ctx, "tagInheritanceSetting", &costmanagement.TagInheritanceSettingArgs{
Kind: pulumi.String("taginheritance"),
Properties: &costmanagement.TagInheritancePropertiesArgs{
PreferContainerTags: pulumi.Bool(false),
},
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
Type: pulumi.String("taginheritance"),
})
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.TagInheritanceSetting;
import com.pulumi.azurenative.costmanagement.TagInheritanceSettingArgs;
import com.pulumi.azurenative.costmanagement.inputs.TagInheritancePropertiesArgs;
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 tagInheritanceSetting = new TagInheritanceSetting("tagInheritanceSetting", TagInheritanceSettingArgs.builder()
.kind("taginheritance")
.properties(TagInheritancePropertiesArgs.builder()
.preferContainerTags(false)
.build())
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.type("taginheritance")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const tagInheritanceSetting = new azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSetting", {
kind: "taginheritance",
properties: {
preferContainerTags: false,
},
scope: "subscriptions/00000000-0000-0000-0000-000000000000",
type: "taginheritance",
});
import pulumi
import pulumi_azure_native as azure_native
tag_inheritance_setting = azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSetting",
kind="taginheritance",
properties={
"prefer_container_tags": False,
},
scope="subscriptions/00000000-0000-0000-0000-000000000000",
type="taginheritance")
resources:
tagInheritanceSetting:
type: azure-native:costmanagement:TagInheritanceSetting
properties:
kind: taginheritance
properties:
preferContainerTags: false
scope: subscriptions/00000000-0000-0000-0000-000000000000
type: taginheritance
Create TagInheritanceSetting Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TagInheritanceSetting(name: string, args: TagInheritanceSettingArgs, opts?: CustomResourceOptions);
@overload
def TagInheritanceSetting(resource_name: str,
args: TagInheritanceSettingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TagInheritanceSetting(resource_name: str,
opts: Optional[ResourceOptions] = None,
scope: Optional[str] = None,
properties: Optional[TagInheritancePropertiesArgs] = None,
type: Optional[str] = None)
func NewTagInheritanceSetting(ctx *Context, name string, args TagInheritanceSettingArgs, opts ...ResourceOption) (*TagInheritanceSetting, error)
public TagInheritanceSetting(string name, TagInheritanceSettingArgs args, CustomResourceOptions? opts = null)
public TagInheritanceSetting(String name, TagInheritanceSettingArgs args)
public TagInheritanceSetting(String name, TagInheritanceSettingArgs args, CustomResourceOptions options)
type: azure-native:costmanagement:TagInheritanceSetting
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TagInheritanceSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TagInheritanceSettingArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TagInheritanceSettingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagInheritanceSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagInheritanceSettingArgs
- 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 tagInheritanceSettingResource = new AzureNative.CostManagement.TagInheritanceSetting("tagInheritanceSettingResource", new()
{
Kind = "string",
Scope = "string",
Properties = new AzureNative.CostManagement.Inputs.TagInheritancePropertiesArgs
{
PreferContainerTags = false,
},
Type = "string",
});
example, err := costmanagement.NewTagInheritanceSetting(ctx, "tagInheritanceSettingResource", &costmanagement.TagInheritanceSettingArgs{
Kind: pulumi.String("string"),
Scope: pulumi.String("string"),
Properties: &costmanagement.TagInheritancePropertiesArgs{
PreferContainerTags: pulumi.Bool(false),
},
Type: pulumi.String("string"),
})
var tagInheritanceSettingResource = new TagInheritanceSetting("tagInheritanceSettingResource", TagInheritanceSettingArgs.builder()
.kind("string")
.scope("string")
.properties(TagInheritancePropertiesArgs.builder()
.preferContainerTags(false)
.build())
.type("string")
.build());
tag_inheritance_setting_resource = azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSettingResource",
kind="string",
scope="string",
properties={
"prefer_container_tags": False,
},
type="string")
const tagInheritanceSettingResource = new azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSettingResource", {
kind: "string",
scope: "string",
properties: {
preferContainerTags: false,
},
type: "string",
});
type: azure-native:costmanagement:TagInheritanceSetting
properties:
kind: string
properties:
preferContainerTags: false
scope: string
type: string
TagInheritanceSetting 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 TagInheritanceSetting resource accepts the following input properties:
- Scope string
- The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
- Properties
Pulumi.
Azure Native. Cost Management. Inputs. Tag Inheritance Properties - The properties of the tag inheritance setting.
- Type string
- Setting type.
- Scope string
- The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
- Properties
Tag
Inheritance Properties Args - The properties of the tag inheritance setting.
- Type string
- Setting type.
- scope String
- The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
- properties
Tag
Inheritance Properties - The properties of the tag inheritance setting.
- type String
- Setting type.
- scope string
- The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
- properties
Tag
Inheritance Properties - The properties of the tag inheritance setting.
- type string
- Setting type.
- scope str
- The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
- properties
Tag
Inheritance Properties Args - The properties of the tag inheritance setting.
- type str
- Setting type.
- scope String
- The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
- properties Property Map
- The properties of the tag inheritance setting.
- type String
- Setting type.
Outputs
All input properties are implicitly available as output properties. Additionally, the TagInheritanceSetting resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- azure
Api stringVersion - The Azure API version of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- azure_
api_ strversion - The Azure API version of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
Supporting Types
TagInheritanceProperties, TagInheritancePropertiesArgs
- bool
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- bool
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- Boolean
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- boolean
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- bool
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- Boolean
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
TagInheritancePropertiesResponse, TagInheritancePropertiesResponseArgs
- bool
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- bool
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- Boolean
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- boolean
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- bool
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
- Boolean
- This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:costmanagement:TagInheritanceSetting taginheritance /{scope}/providers/Microsoft.CostManagement/settings/{type}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0