datadog.CostBudget
Explore with Pulumi AI
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:
- End
Month int - The month when the budget ends (YYYYMM).
- Metrics
Query string - The cost query used to track against the budget.
- Name string
- The name of the budget.
- Start
Month int - The month when the budget starts (YYYYMM).
- Budget
Id string - The ID of the budget.
- Entries
List<Cost
Budget Entry> - The entries of the budget.
- End
Month int - The month when the budget ends (YYYYMM).
- Metrics
Query string - The cost query used to track against the budget.
- Name string
- The name of the budget.
- Start
Month int - The month when the budget starts (YYYYMM).
- Budget
Id string - The ID of the budget.
- Entries
[]Cost
Budget Entry Args - The entries of the budget.
- end
Month Integer - The month when the budget ends (YYYYMM).
- metrics
Query String - The cost query used to track against the budget.
- name String
- The name of the budget.
- start
Month Integer - The month when the budget starts (YYYYMM).
- budget
Id String - The ID of the budget.
- entries
List<Cost
Budget Entry> - The entries of the budget.
- end
Month number - The month when the budget ends (YYYYMM).
- metrics
Query string - The cost query used to track against the budget.
- name string
- The name of the budget.
- start
Month number - The month when the budget starts (YYYYMM).
- budget
Id string - The ID of the budget.
- entries
Cost
Budget Entry[] - 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[Cost
Budget Entry Args] - The entries of the budget.
- end
Month Number - The month when the budget ends (YYYYMM).
- metrics
Query String - The cost query used to track against the budget.
- name String
- The name of the budget.
- start
Month Number - The month when the budget starts (YYYYMM).
- budget
Id 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.
- Total
Amount double - The sum of all budget entries' amounts.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Amount float64 - The sum of all budget entries' amounts.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Amount Double - The sum of all budget entries' amounts.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Amount 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.
- total
Amount 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.
- Budget
Id string - The ID of the budget.
- End
Month int - The month when the budget ends (YYYYMM).
- Entries
List<Cost
Budget Entry> - The entries of the budget.
- Metrics
Query string - The cost query used to track against the budget.
- Name string
- The name of the budget.
- Start
Month int - The month when the budget starts (YYYYMM).
- Total
Amount double - The sum of all budget entries' amounts.
- Budget
Id string - The ID of the budget.
- End
Month int - The month when the budget ends (YYYYMM).
- Entries
[]Cost
Budget Entry Args - The entries of the budget.
- Metrics
Query string - The cost query used to track against the budget.
- Name string
- The name of the budget.
- Start
Month int - The month when the budget starts (YYYYMM).
- Total
Amount float64 - The sum of all budget entries' amounts.
- budget
Id String - The ID of the budget.
- end
Month Integer - The month when the budget ends (YYYYMM).
- entries
List<Cost
Budget Entry> - The entries of the budget.
- metrics
Query String - The cost query used to track against the budget.
- name String
- The name of the budget.
- start
Month Integer - The month when the budget starts (YYYYMM).
- total
Amount Double - The sum of all budget entries' amounts.
- budget
Id string - The ID of the budget.
- end
Month number - The month when the budget ends (YYYYMM).
- entries
Cost
Budget Entry[] - The entries of the budget.
- metrics
Query string - The cost query used to track against the budget.
- name string
- The name of the budget.
- start
Month number - The month when the budget starts (YYYYMM).
- total
Amount 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[Cost
Budget Entry Args] - 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.
- budget
Id String - The ID of the budget.
- end
Month Number - The month when the budget ends (YYYYMM).
- entries List<Property Map>
- The entries of the budget.
- metrics
Query String - The cost query used to track against the budget.
- name String
- The name of the budget.
- start
Month Number - The month when the budget starts (YYYYMM).
- total
Amount Number - The sum of all budget entries' amounts.
Supporting Types
CostBudgetEntry, CostBudgetEntryArgs
- Amount float64
- Month int
- Tag
Filters []CostBudget Entry Tag Filter
- amount Double
- month Integer
- tag
Filters List<CostBudget Entry Tag Filter>
- amount number
- month number
- tag
Filters CostBudget Entry Tag Filter[]
- amount Number
- month Number
- tag
Filters List<Property Map>
CostBudgetEntryTagFilter, CostBudgetEntryTagFilterArgs
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.