tencentcloud.BillingAllocationTag
Explore with Pulumi AI
Provides a resource to create a Billing allocation tag
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleTag = new tencentcloud.Tag("exampleTag", {
tagKey: "tagKey",
tagValue: "tagValue",
});
const exampleBillingAllocationTag = new tencentcloud.BillingAllocationTag("exampleBillingAllocationTag", {tagKey: exampleTag.tagKey});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_tag = tencentcloud.Tag("exampleTag",
tag_key="tagKey",
tag_value="tagValue")
example_billing_allocation_tag = tencentcloud.BillingAllocationTag("exampleBillingAllocationTag", tag_key=example_tag.tag_key)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleTag, err := tencentcloud.NewTag(ctx, "exampleTag", &tencentcloud.TagArgs{
TagKey: pulumi.String("tagKey"),
TagValue: pulumi.String("tagValue"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewBillingAllocationTag(ctx, "exampleBillingAllocationTag", &tencentcloud.BillingAllocationTagArgs{
TagKey: exampleTag.TagKey,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var exampleTag = new Tencentcloud.Tag("exampleTag", new()
{
TagKey = "tagKey",
TagValue = "tagValue",
});
var exampleBillingAllocationTag = new Tencentcloud.BillingAllocationTag("exampleBillingAllocationTag", new()
{
TagKey = exampleTag.TagKey,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Tag;
import com.pulumi.tencentcloud.TagArgs;
import com.pulumi.tencentcloud.BillingAllocationTag;
import com.pulumi.tencentcloud.BillingAllocationTagArgs;
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 exampleTag = new Tag("exampleTag", TagArgs.builder()
.tagKey("tagKey")
.tagValue("tagValue")
.build());
var exampleBillingAllocationTag = new BillingAllocationTag("exampleBillingAllocationTag", BillingAllocationTagArgs.builder()
.tagKey(exampleTag.tagKey())
.build());
}
}
resources:
exampleTag:
type: tencentcloud:Tag
properties:
tagKey: tagKey
tagValue: tagValue
exampleBillingAllocationTag:
type: tencentcloud:BillingAllocationTag
properties:
tagKey: ${exampleTag.tagKey}
Create BillingAllocationTag Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BillingAllocationTag(name: string, args: BillingAllocationTagArgs, opts?: CustomResourceOptions);
@overload
def BillingAllocationTag(resource_name: str,
args: BillingAllocationTagArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BillingAllocationTag(resource_name: str,
opts: Optional[ResourceOptions] = None,
tag_key: Optional[str] = None,
billing_allocation_tag_id: Optional[str] = None)
func NewBillingAllocationTag(ctx *Context, name string, args BillingAllocationTagArgs, opts ...ResourceOption) (*BillingAllocationTag, error)
public BillingAllocationTag(string name, BillingAllocationTagArgs args, CustomResourceOptions? opts = null)
public BillingAllocationTag(String name, BillingAllocationTagArgs args)
public BillingAllocationTag(String name, BillingAllocationTagArgs args, CustomResourceOptions options)
type: tencentcloud:BillingAllocationTag
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 BillingAllocationTagArgs
- 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 BillingAllocationTagArgs
- 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 BillingAllocationTagArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BillingAllocationTagArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BillingAllocationTagArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BillingAllocationTag 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 BillingAllocationTag resource accepts the following input properties:
- Tag
Key string - Cost allocation tag key.
- Billing
Allocation stringTag Id - ID of the resource.
- Tag
Key string - Cost allocation tag key.
- Billing
Allocation stringTag Id - ID of the resource.
- tag
Key String - Cost allocation tag key.
- billing
Allocation StringTag Id - ID of the resource.
- tag
Key string - Cost allocation tag key.
- billing
Allocation stringTag Id - ID of the resource.
- tag_
key str - Cost allocation tag key.
- billing_
allocation_ strtag_ id - ID of the resource.
- tag
Key String - Cost allocation tag key.
- billing
Allocation StringTag Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the BillingAllocationTag resource produces the following output properties:
Look up Existing BillingAllocationTag Resource
Get an existing BillingAllocationTag 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?: BillingAllocationTagState, opts?: CustomResourceOptions): BillingAllocationTag
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
billing_allocation_tag_id: Optional[str] = None,
status: Optional[float] = None,
tag_key: Optional[str] = None) -> BillingAllocationTag
func GetBillingAllocationTag(ctx *Context, name string, id IDInput, state *BillingAllocationTagState, opts ...ResourceOption) (*BillingAllocationTag, error)
public static BillingAllocationTag Get(string name, Input<string> id, BillingAllocationTagState? state, CustomResourceOptions? opts = null)
public static BillingAllocationTag get(String name, Output<String> id, BillingAllocationTagState state, CustomResourceOptions options)
resources: _: type: tencentcloud:BillingAllocationTag get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Billing
Allocation stringTag Id - ID of the resource.
- Status double
- Tag type, 0 normal tag, 1 account tag.
- Tag
Key string - Cost allocation tag key.
- Billing
Allocation stringTag Id - ID of the resource.
- Status float64
- Tag type, 0 normal tag, 1 account tag.
- Tag
Key string - Cost allocation tag key.
- billing
Allocation StringTag Id - ID of the resource.
- status Double
- Tag type, 0 normal tag, 1 account tag.
- tag
Key String - Cost allocation tag key.
- billing
Allocation stringTag Id - ID of the resource.
- status number
- Tag type, 0 normal tag, 1 account tag.
- tag
Key string - Cost allocation tag key.
- billing_
allocation_ strtag_ id - ID of the resource.
- status float
- Tag type, 0 normal tag, 1 account tag.
- tag_
key str - Cost allocation tag key.
- billing
Allocation StringTag Id - ID of the resource.
- status Number
- Tag type, 0 normal tag, 1 account tag.
- tag
Key String - Cost allocation tag key.
Import
Billing allocation tag can be imported using the id, e.g.
$ pulumi import tencentcloud:index/billingAllocationTag:BillingAllocationTag example tagKey
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.