aws.costexplorer.CostAllocationTag
Explore with Pulumi AI
Provides a CE Cost Allocation Tag.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.costexplorer.CostAllocationTag("example", {
tagKey: "example",
status: "Active",
});
import pulumi
import pulumi_aws as aws
example = aws.costexplorer.CostAllocationTag("example",
tag_key="example",
status="Active")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/costexplorer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costexplorer.NewCostAllocationTag(ctx, "example", &costexplorer.CostAllocationTagArgs{
TagKey: pulumi.String("example"),
Status: pulumi.String("Active"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CostExplorer.CostAllocationTag("example", new()
{
TagKey = "example",
Status = "Active",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.costexplorer.CostAllocationTag;
import com.pulumi.aws.costexplorer.CostAllocationTagArgs;
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 CostAllocationTag("example", CostAllocationTagArgs.builder()
.tagKey("example")
.status("Active")
.build());
}
}
resources:
example:
type: aws:costexplorer:CostAllocationTag
properties:
tagKey: example
status: Active
Create CostAllocationTag Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CostAllocationTag(name: string, args: CostAllocationTagArgs, opts?: CustomResourceOptions);
@overload
def CostAllocationTag(resource_name: str,
args: CostAllocationTagArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CostAllocationTag(resource_name: str,
opts: Optional[ResourceOptions] = None,
status: Optional[str] = None,
tag_key: Optional[str] = None)
func NewCostAllocationTag(ctx *Context, name string, args CostAllocationTagArgs, opts ...ResourceOption) (*CostAllocationTag, error)
public CostAllocationTag(string name, CostAllocationTagArgs args, CustomResourceOptions? opts = null)
public CostAllocationTag(String name, CostAllocationTagArgs args)
public CostAllocationTag(String name, CostAllocationTagArgs args, CustomResourceOptions options)
type: aws:costexplorer:CostAllocationTag
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 CostAllocationTagArgs
- 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 CostAllocationTagArgs
- 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 CostAllocationTagArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CostAllocationTagArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CostAllocationTagArgs
- 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 costAllocationTagResource = new Aws.CostExplorer.CostAllocationTag("costAllocationTagResource", new()
{
Status = "string",
TagKey = "string",
});
example, err := costexplorer.NewCostAllocationTag(ctx, "costAllocationTagResource", &costexplorer.CostAllocationTagArgs{
Status: pulumi.String("string"),
TagKey: pulumi.String("string"),
})
var costAllocationTagResource = new CostAllocationTag("costAllocationTagResource", CostAllocationTagArgs.builder()
.status("string")
.tagKey("string")
.build());
cost_allocation_tag_resource = aws.costexplorer.CostAllocationTag("costAllocationTagResource",
status="string",
tag_key="string")
const costAllocationTagResource = new aws.costexplorer.CostAllocationTag("costAllocationTagResource", {
status: "string",
tagKey: "string",
});
type: aws:costexplorer:CostAllocationTag
properties:
status: string
tagKey: string
CostAllocationTag Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CostAllocationTag resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the CostAllocationTag resource produces the following output properties:
Look up Existing CostAllocationTag Resource
Get an existing CostAllocationTag 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?: CostAllocationTagState, opts?: CustomResourceOptions): CostAllocationTag
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
status: Optional[str] = None,
tag_key: Optional[str] = None,
type: Optional[str] = None) -> CostAllocationTag
func GetCostAllocationTag(ctx *Context, name string, id IDInput, state *CostAllocationTagState, opts ...ResourceOption) (*CostAllocationTag, error)
public static CostAllocationTag Get(string name, Input<string> id, CostAllocationTagState? state, CustomResourceOptions? opts = null)
public static CostAllocationTag get(String name, Output<String> id, CostAllocationTagState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
Import
Using pulumi import
, import aws_ce_cost_allocation_tag
using the id
. For example:
$ pulumi import aws:costexplorer/costAllocationTag:CostAllocationTag example key
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.