azure-native.costmanagement.TagInheritanceSetting
Explore with Pulumi AI
Tag Inheritance Setting definition. Azure REST 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/v2"
"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 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")
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",
});
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,
e_tag: 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",
ETag = "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"),
ETag: 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")
.eTag("string")
.properties(TagInheritancePropertiesArgs.builder()
.preferContainerTags(false)
.build())
.type("string")
.build());
tag_inheritance_setting_resource = azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSettingResource",
kind="string",
scope="string",
e_tag="string",
properties={
"prefer_container_tags": False,
},
type="string")
const tagInheritanceSettingResource = new azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSettingResource", {
kind: "string",
scope: "string",
eTag: "string",
properties: {
preferContainerTags: false,
},
type: "string",
});
type: azure-native:costmanagement:TagInheritanceSetting
properties:
eTag: string
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.
- ETag string
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- 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.
- ETag string
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- 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.
- e
Tag String - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- 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.
- e
Tag string - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- 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.
- e_
tag str - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- 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.
- e
Tag String - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- 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:
Supporting Types
TagInheritanceProperties, TagInheritancePropertiesArgs
- bool
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- bool
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- Boolean
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- boolean
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- bool
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- Boolean
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
TagInheritancePropertiesResponse, TagInheritancePropertiesResponseArgs
- bool
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- bool
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- Boolean
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- boolean
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- bool
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
- Boolean
- When resource has the same tag as subscription or resource group and this property is set to true - the subscription or resource group tag will be applied. If subscription and resource group tags are also the same, subscription tag will be applied.
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