1. Packages
  2. Datadog Provider
  3. API Docs
  4. CostBudget
Datadog v4.55.0 published on Friday, Sep 5, 2025 by Pulumi

datadog.CostBudget

Explore with Pulumi AI

datadog logo
Datadog v4.55.0 published on Friday, Sep 5, 2025 by Pulumi

    Provides a Datadog Cost Budget resource.

    Create CostBudget Resource

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

    Constructor syntax

    new CostBudget(name: string, args: CostBudgetArgs, opts?: CustomResourceOptions);
    @overload
    def CostBudget(resource_name: str,
                   args: CostBudgetArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def CostBudget(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   end_month: Optional[int] = None,
                   metrics_query: Optional[str] = None,
                   name: Optional[str] = None,
                   start_month: Optional[int] = None,
                   budget_id: Optional[str] = None,
                   entries: Optional[Sequence[CostBudgetEntryArgs]] = None)
    func NewCostBudget(ctx *Context, name string, args CostBudgetArgs, opts ...ResourceOption) (*CostBudget, error)
    public CostBudget(string name, CostBudgetArgs args, CustomResourceOptions? opts = null)
    public CostBudget(String name, CostBudgetArgs args)
    public CostBudget(String name, CostBudgetArgs args, CustomResourceOptions options)
    
    type: datadog:CostBudget
    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 CostBudgetArgs
    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 CostBudgetArgs
    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 CostBudgetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CostBudgetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CostBudgetArgs
    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 costBudgetResource = new Datadog.CostBudget("costBudgetResource", new()
    {
        EndMonth = 0,
        MetricsQuery = "string",
        Name = "string",
        StartMonth = 0,
        BudgetId = "string",
        Entries = new[]
        {
            new Datadog.Inputs.CostBudgetEntryArgs
            {
                Amount = 0,
                Month = 0,
                TagFilters = new[]
                {
                    new Datadog.Inputs.CostBudgetEntryTagFilterArgs
                    {
                        TagKey = "string",
                        TagValue = "string",
                    },
                },
            },
        },
    });
    
    example, err := datadog.NewCostBudget(ctx, "costBudgetResource", &datadog.CostBudgetArgs{
    	EndMonth:     pulumi.Int(0),
    	MetricsQuery: pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	StartMonth:   pulumi.Int(0),
    	BudgetId:     pulumi.String("string"),
    	Entries: datadog.CostBudgetEntryArray{
    		&datadog.CostBudgetEntryArgs{
    			Amount: pulumi.Float64(0),
    			Month:  pulumi.Int(0),
    			TagFilters: datadog.CostBudgetEntryTagFilterArray{
    				&datadog.CostBudgetEntryTagFilterArgs{
    					TagKey:   pulumi.String("string"),
    					TagValue: pulumi.String("string"),
    				},
    			},
    		},
    	},
    })
    
    var costBudgetResource = new CostBudget("costBudgetResource", CostBudgetArgs.builder()
        .endMonth(0)
        .metricsQuery("string")
        .name("string")
        .startMonth(0)
        .budgetId("string")
        .entries(CostBudgetEntryArgs.builder()
            .amount(0.0)
            .month(0)
            .tagFilters(CostBudgetEntryTagFilterArgs.builder()
                .tagKey("string")
                .tagValue("string")
                .build())
            .build())
        .build());
    
    cost_budget_resource = datadog.CostBudget("costBudgetResource",
        end_month=0,
        metrics_query="string",
        name="string",
        start_month=0,
        budget_id="string",
        entries=[{
            "amount": 0,
            "month": 0,
            "tag_filters": [{
                "tag_key": "string",
                "tag_value": "string",
            }],
        }])
    
    const costBudgetResource = new datadog.CostBudget("costBudgetResource", {
        endMonth: 0,
        metricsQuery: "string",
        name: "string",
        startMonth: 0,
        budgetId: "string",
        entries: [{
            amount: 0,
            month: 0,
            tagFilters: [{
                tagKey: "string",
                tagValue: "string",
            }],
        }],
    });
    
    type: datadog:CostBudget
    properties:
        budgetId: string
        endMonth: 0
        entries:
            - amount: 0
              month: 0
              tagFilters:
                - tagKey: string
                  tagValue: string
        metricsQuery: string
        name: string
        startMonth: 0
    

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

    EndMonth int
    The month when the budget ends (YYYYMM).
    MetricsQuery string
    The cost query used to track against the budget.
    Name string
    The name of the budget.
    StartMonth int
    The month when the budget starts (YYYYMM).
    BudgetId string
    The ID of the budget.
    Entries List<CostBudgetEntry>
    The entries of the budget.
    EndMonth int
    The month when the budget ends (YYYYMM).
    MetricsQuery string
    The cost query used to track against the budget.
    Name string
    The name of the budget.
    StartMonth int
    The month when the budget starts (YYYYMM).
    BudgetId string
    The ID of the budget.
    Entries []CostBudgetEntryArgs
    The entries of the budget.
    endMonth Integer
    The month when the budget ends (YYYYMM).
    metricsQuery String
    The cost query used to track against the budget.
    name String
    The name of the budget.
    startMonth Integer
    The month when the budget starts (YYYYMM).
    budgetId String
    The ID of the budget.
    entries List<CostBudgetEntry>
    The entries of the budget.
    endMonth number
    The month when the budget ends (YYYYMM).
    metricsQuery string
    The cost query used to track against the budget.
    name string
    The name of the budget.
    startMonth number
    The month when the budget starts (YYYYMM).
    budgetId string
    The ID of the budget.
    entries CostBudgetEntry[]
    The entries of the budget.
    end_month int
    The month when the budget ends (YYYYMM).
    metrics_query str
    The cost query used to track against the budget.
    name str
    The name of the budget.
    start_month int
    The month when the budget starts (YYYYMM).
    budget_id str
    The ID of the budget.
    entries Sequence[CostBudgetEntryArgs]
    The entries of the budget.
    endMonth Number
    The month when the budget ends (YYYYMM).
    metricsQuery String
    The cost query used to track against the budget.
    name String
    The name of the budget.
    startMonth Number
    The month when the budget starts (YYYYMM).
    budgetId String
    The ID of the budget.
    entries List<Property Map>
    The entries of the budget.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TotalAmount double
    The sum of all budget entries' amounts.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalAmount float64
    The sum of all budget entries' amounts.
    id String
    The provider-assigned unique ID for this managed resource.
    totalAmount Double
    The sum of all budget entries' amounts.
    id string
    The provider-assigned unique ID for this managed resource.
    totalAmount number
    The sum of all budget entries' amounts.
    id str
    The provider-assigned unique ID for this managed resource.
    total_amount float
    The sum of all budget entries' amounts.
    id String
    The provider-assigned unique ID for this managed resource.
    totalAmount Number
    The sum of all budget entries' amounts.

    Look up Existing CostBudget Resource

    Get an existing CostBudget 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?: CostBudgetState, opts?: CustomResourceOptions): CostBudget
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            budget_id: Optional[str] = None,
            end_month: Optional[int] = None,
            entries: Optional[Sequence[CostBudgetEntryArgs]] = None,
            metrics_query: Optional[str] = None,
            name: Optional[str] = None,
            start_month: Optional[int] = None,
            total_amount: Optional[float] = None) -> CostBudget
    func GetCostBudget(ctx *Context, name string, id IDInput, state *CostBudgetState, opts ...ResourceOption) (*CostBudget, error)
    public static CostBudget Get(string name, Input<string> id, CostBudgetState? state, CustomResourceOptions? opts = null)
    public static CostBudget get(String name, Output<String> id, CostBudgetState state, CustomResourceOptions options)
    resources:  _:    type: datadog:CostBudget    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.
    The following state arguments are supported:
    BudgetId string
    The ID of the budget.
    EndMonth int
    The month when the budget ends (YYYYMM).
    Entries List<CostBudgetEntry>
    The entries of the budget.
    MetricsQuery string
    The cost query used to track against the budget.
    Name string
    The name of the budget.
    StartMonth int
    The month when the budget starts (YYYYMM).
    TotalAmount double
    The sum of all budget entries' amounts.
    BudgetId string
    The ID of the budget.
    EndMonth int
    The month when the budget ends (YYYYMM).
    Entries []CostBudgetEntryArgs
    The entries of the budget.
    MetricsQuery string
    The cost query used to track against the budget.
    Name string
    The name of the budget.
    StartMonth int
    The month when the budget starts (YYYYMM).
    TotalAmount float64
    The sum of all budget entries' amounts.
    budgetId String
    The ID of the budget.
    endMonth Integer
    The month when the budget ends (YYYYMM).
    entries List<CostBudgetEntry>
    The entries of the budget.
    metricsQuery String
    The cost query used to track against the budget.
    name String
    The name of the budget.
    startMonth Integer
    The month when the budget starts (YYYYMM).
    totalAmount Double
    The sum of all budget entries' amounts.
    budgetId string
    The ID of the budget.
    endMonth number
    The month when the budget ends (YYYYMM).
    entries CostBudgetEntry[]
    The entries of the budget.
    metricsQuery string
    The cost query used to track against the budget.
    name string
    The name of the budget.
    startMonth number
    The month when the budget starts (YYYYMM).
    totalAmount number
    The sum of all budget entries' amounts.
    budget_id str
    The ID of the budget.
    end_month int
    The month when the budget ends (YYYYMM).
    entries Sequence[CostBudgetEntryArgs]
    The entries of the budget.
    metrics_query str
    The cost query used to track against the budget.
    name str
    The name of the budget.
    start_month int
    The month when the budget starts (YYYYMM).
    total_amount float
    The sum of all budget entries' amounts.
    budgetId String
    The ID of the budget.
    endMonth Number
    The month when the budget ends (YYYYMM).
    entries List<Property Map>
    The entries of the budget.
    metricsQuery String
    The cost query used to track against the budget.
    name String
    The name of the budget.
    startMonth Number
    The month when the budget starts (YYYYMM).
    totalAmount Number
    The sum of all budget entries' amounts.

    Supporting Types

    CostBudgetEntry, CostBudgetEntryArgs

    CostBudgetEntryTagFilter, CostBudgetEntryTagFilterArgs

    TagKey string
    TagValue string
    TagKey string
    TagValue string
    tagKey String
    tagValue String
    tagKey string
    tagValue string
    tagKey String
    tagValue String

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.55.0 published on Friday, Sep 5, 2025 by Pulumi