oci.Budget.Budget
Explore with Pulumi AI
This resource provides the Budget resource in Oracle Cloud Infrastructure Budget service.
Creates a new budget.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBudget = new oci.budget.Budget("test_budget", {
amount: budgetAmount,
compartmentId: tenancyOcid,
resetPeriod: budgetResetPeriod,
budgetProcessingPeriodStartOffset: budgetBudgetProcessingPeriodStartOffset,
definedTags: {
"Operations.CostCenter": "42",
},
description: budgetDescription,
displayName: budgetDisplayName,
endDate: budgetEndDate,
freeformTags: {
Department: "Finance",
},
processingPeriodType: budgetProcessingPeriodType,
startDate: budgetStartDate,
targetCompartmentId: testCompartment.id,
targetType: budgetTargetType,
targets: budgetTargets,
});
import pulumi
import pulumi_oci as oci
test_budget = oci.budget.Budget("test_budget",
amount=budget_amount,
compartment_id=tenancy_ocid,
reset_period=budget_reset_period,
budget_processing_period_start_offset=budget_budget_processing_period_start_offset,
defined_tags={
"Operations.CostCenter": "42",
},
description=budget_description,
display_name=budget_display_name,
end_date=budget_end_date,
freeform_tags={
"Department": "Finance",
},
processing_period_type=budget_processing_period_type,
start_date=budget_start_date,
target_compartment_id=test_compartment["id"],
target_type=budget_target_type,
targets=budget_targets)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Budget"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Budget.NewBudget(ctx, "test_budget", &Budget.BudgetArgs{
Amount: pulumi.Any(budgetAmount),
CompartmentId: pulumi.Any(tenancyOcid),
ResetPeriod: pulumi.Any(budgetResetPeriod),
BudgetProcessingPeriodStartOffset: pulumi.Any(budgetBudgetProcessingPeriodStartOffset),
DefinedTags: pulumi.StringMap{
"Operations.CostCenter": pulumi.String("42"),
},
Description: pulumi.Any(budgetDescription),
DisplayName: pulumi.Any(budgetDisplayName),
EndDate: pulumi.Any(budgetEndDate),
FreeformTags: pulumi.StringMap{
"Department": pulumi.String("Finance"),
},
ProcessingPeriodType: pulumi.Any(budgetProcessingPeriodType),
StartDate: pulumi.Any(budgetStartDate),
TargetCompartmentId: pulumi.Any(testCompartment.Id),
TargetType: pulumi.Any(budgetTargetType),
Targets: pulumi.Any(budgetTargets),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testBudget = new Oci.Budget.Budget("test_budget", new()
{
Amount = budgetAmount,
CompartmentId = tenancyOcid,
ResetPeriod = budgetResetPeriod,
BudgetProcessingPeriodStartOffset = budgetBudgetProcessingPeriodStartOffset,
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
Description = budgetDescription,
DisplayName = budgetDisplayName,
EndDate = budgetEndDate,
FreeformTags =
{
{ "Department", "Finance" },
},
ProcessingPeriodType = budgetProcessingPeriodType,
StartDate = budgetStartDate,
TargetCompartmentId = testCompartment.Id,
TargetType = budgetTargetType,
Targets = budgetTargets,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Budget.Budget;
import com.pulumi.oci.Budget.BudgetArgs;
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 testBudget = new Budget("testBudget", BudgetArgs.builder()
.amount(budgetAmount)
.compartmentId(tenancyOcid)
.resetPeriod(budgetResetPeriod)
.budgetProcessingPeriodStartOffset(budgetBudgetProcessingPeriodStartOffset)
.definedTags(Map.of("Operations.CostCenter", "42"))
.description(budgetDescription)
.displayName(budgetDisplayName)
.endDate(budgetEndDate)
.freeformTags(Map.of("Department", "Finance"))
.processingPeriodType(budgetProcessingPeriodType)
.startDate(budgetStartDate)
.targetCompartmentId(testCompartment.id())
.targetType(budgetTargetType)
.targets(budgetTargets)
.build());
}
}
resources:
testBudget:
type: oci:Budget:Budget
name: test_budget
properties:
amount: ${budgetAmount}
compartmentId: ${tenancyOcid}
resetPeriod: ${budgetResetPeriod}
budgetProcessingPeriodStartOffset: ${budgetBudgetProcessingPeriodStartOffset}
definedTags:
Operations.CostCenter: '42'
description: ${budgetDescription}
displayName: ${budgetDisplayName}
endDate: ${budgetEndDate}
freeformTags:
Department: Finance
processingPeriodType: ${budgetProcessingPeriodType}
startDate: ${budgetStartDate}
targetCompartmentId: ${testCompartment.id}
targetType: ${budgetTargetType}
targets: ${budgetTargets}
Create Budget Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Budget(name: string, args: BudgetArgs, opts?: CustomResourceOptions);
@overload
def Budget(resource_name: str,
args: BudgetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Budget(resource_name: str,
opts: Optional[ResourceOptions] = None,
amount: Optional[int] = None,
reset_period: Optional[str] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
end_date: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
processing_period_type: Optional[str] = None,
budget_processing_period_start_offset: Optional[int] = None,
start_date: Optional[str] = None,
target_compartment_id: Optional[str] = None,
target_type: Optional[str] = None,
targets: Optional[Sequence[str]] = None)
func NewBudget(ctx *Context, name string, args BudgetArgs, opts ...ResourceOption) (*Budget, error)
public Budget(string name, BudgetArgs args, CustomResourceOptions? opts = null)
public Budget(String name, BudgetArgs args)
public Budget(String name, BudgetArgs args, CustomResourceOptions options)
type: oci:Budget:Budget
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 BudgetArgs
- 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 BudgetArgs
- 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 BudgetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BudgetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BudgetArgs
- 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 budgetResource = new Oci.Budget.Budget("budgetResource", new()
{
Amount = 0,
ResetPeriod = "string",
CompartmentId = "string",
DefinedTags =
{
{ "string", "string" },
},
Description = "string",
DisplayName = "string",
EndDate = "string",
FreeformTags =
{
{ "string", "string" },
},
ProcessingPeriodType = "string",
BudgetProcessingPeriodStartOffset = 0,
StartDate = "string",
TargetType = "string",
Targets = new[]
{
"string",
},
});
example, err := Budget.NewBudget(ctx, "budgetResource", &Budget.BudgetArgs{
Amount: pulumi.Int(0),
ResetPeriod: pulumi.String("string"),
CompartmentId: pulumi.String("string"),
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
EndDate: pulumi.String("string"),
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
ProcessingPeriodType: pulumi.String("string"),
BudgetProcessingPeriodStartOffset: pulumi.Int(0),
StartDate: pulumi.String("string"),
TargetType: pulumi.String("string"),
Targets: pulumi.StringArray{
pulumi.String("string"),
},
})
var budgetResource = new Budget("budgetResource", BudgetArgs.builder()
.amount(0)
.resetPeriod("string")
.compartmentId("string")
.definedTags(Map.of("string", "string"))
.description("string")
.displayName("string")
.endDate("string")
.freeformTags(Map.of("string", "string"))
.processingPeriodType("string")
.budgetProcessingPeriodStartOffset(0)
.startDate("string")
.targetType("string")
.targets("string")
.build());
budget_resource = oci.budget.Budget("budgetResource",
amount=0,
reset_period="string",
compartment_id="string",
defined_tags={
"string": "string",
},
description="string",
display_name="string",
end_date="string",
freeform_tags={
"string": "string",
},
processing_period_type="string",
budget_processing_period_start_offset=0,
start_date="string",
target_type="string",
targets=["string"])
const budgetResource = new oci.budget.Budget("budgetResource", {
amount: 0,
resetPeriod: "string",
compartmentId: "string",
definedTags: {
string: "string",
},
description: "string",
displayName: "string",
endDate: "string",
freeformTags: {
string: "string",
},
processingPeriodType: "string",
budgetProcessingPeriodStartOffset: 0,
startDate: "string",
targetType: "string",
targets: ["string"],
});
type: oci:Budget:Budget
properties:
amount: 0
budgetProcessingPeriodStartOffset: 0
compartmentId: string
definedTags:
string: string
description: string
displayName: string
endDate: string
freeformTags:
string: string
processingPeriodType: string
resetPeriod: string
startDate: string
targetType: string
targets:
- string
Budget 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 Budget resource accepts the following input properties:
- Amount int
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- Compartment
Id string - The OCID of the compartment.
- Reset
Period string - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- Budget
Processing intPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description of the budget.
- Display
Name string - (Updatable) The displayName of the budget. Avoid entering confidential information.
- End
Date string - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Processing
Period stringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- Start
Date string - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Target
Compartment stringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- Target
Type string - The type of target on which the budget is applied.
- Targets List<string>
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Amount int
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- Compartment
Id string - The OCID of the compartment.
- Reset
Period string - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- Budget
Processing intPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description of the budget.
- Display
Name string - (Updatable) The displayName of the budget. Avoid entering confidential information.
- End
Date string - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Processing
Period stringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- Start
Date string - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Target
Compartment stringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- Target
Type string - The type of target on which the budget is applied.
- Targets []string
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- amount Integer
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- compartment
Id String - The OCID of the compartment.
- reset
Period String - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- budget
Processing IntegerPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- (Updatable) The description of the budget.
- display
Name String - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end
Date String - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing
Period StringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- start
Date String - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - target
Compartment StringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- target
Type String - The type of target on which the budget is applied.
- targets List<String>
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- amount number
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- compartment
Id string - The OCID of the compartment.
- reset
Period string - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- budget
Processing numberPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
- (Updatable) The description of the budget.
- display
Name string - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end
Date string - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing
Period stringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- start
Date string - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - target
Compartment stringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- target
Type string - The type of target on which the budget is applied.
- targets string[]
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- amount int
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- compartment_
id str - The OCID of the compartment.
- reset_
period str - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- budget_
processing_ intperiod_ start_ offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
- (Updatable) The description of the budget.
- display_
name str - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end_
date str - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing_
period_ strtype - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- start_
date str - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - target_
compartment_ strid - This is DEPRECATED. Set the target compartment ID in targets instead.
- target_
type str - The type of target on which the budget is applied.
- targets Sequence[str]
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- amount Number
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- compartment
Id String - The OCID of the compartment.
- reset
Period String - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- budget
Processing NumberPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- (Updatable) The description of the budget.
- display
Name String - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end
Date String - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing
Period StringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- start
Date String - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - target
Compartment StringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- target
Type String - The type of target on which the budget is applied.
- targets List<String>
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Outputs
All input properties are implicitly available as output properties. Additionally, the Budget resource produces the following output properties:
- Actual
Spend double - The actual spend in currency for the current budget cycle.
- Alert
Rule intCount - The total number of alert rules in the budget.
- Forecasted
Spend double - The forecasted spend in currency by the end of the current budget cycle.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The current state of the budget.
- Time
Created string - The time that the budget was created.
- Time
Spend stringComputed - The time that the budget spend was last computed.
- Time
Updated string - The time that the budget was updated.
- Version int
- The version of the budget. Starts from 1 and increments by 1.
- Actual
Spend float64 - The actual spend in currency for the current budget cycle.
- Alert
Rule intCount - The total number of alert rules in the budget.
- Forecasted
Spend float64 - The forecasted spend in currency by the end of the current budget cycle.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The current state of the budget.
- Time
Created string - The time that the budget was created.
- Time
Spend stringComputed - The time that the budget spend was last computed.
- Time
Updated string - The time that the budget was updated.
- Version int
- The version of the budget. Starts from 1 and increments by 1.
- actual
Spend Double - The actual spend in currency for the current budget cycle.
- alert
Rule IntegerCount - The total number of alert rules in the budget.
- forecasted
Spend Double - The forecasted spend in currency by the end of the current budget cycle.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The current state of the budget.
- time
Created String - The time that the budget was created.
- time
Spend StringComputed - The time that the budget spend was last computed.
- time
Updated String - The time that the budget was updated.
- version Integer
- The version of the budget. Starts from 1 and increments by 1.
- actual
Spend number - The actual spend in currency for the current budget cycle.
- alert
Rule numberCount - The total number of alert rules in the budget.
- forecasted
Spend number - The forecasted spend in currency by the end of the current budget cycle.
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- The current state of the budget.
- time
Created string - The time that the budget was created.
- time
Spend stringComputed - The time that the budget spend was last computed.
- time
Updated string - The time that the budget was updated.
- version number
- The version of the budget. Starts from 1 and increments by 1.
- actual_
spend float - The actual spend in currency for the current budget cycle.
- alert_
rule_ intcount - The total number of alert rules in the budget.
- forecasted_
spend float - The forecasted spend in currency by the end of the current budget cycle.
- id str
- The provider-assigned unique ID for this managed resource.
- state str
- The current state of the budget.
- time_
created str - The time that the budget was created.
- time_
spend_ strcomputed - The time that the budget spend was last computed.
- time_
updated str - The time that the budget was updated.
- version int
- The version of the budget. Starts from 1 and increments by 1.
- actual
Spend Number - The actual spend in currency for the current budget cycle.
- alert
Rule NumberCount - The total number of alert rules in the budget.
- forecasted
Spend Number - The forecasted spend in currency by the end of the current budget cycle.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The current state of the budget.
- time
Created String - The time that the budget was created.
- time
Spend StringComputed - The time that the budget spend was last computed.
- time
Updated String - The time that the budget was updated.
- version Number
- The version of the budget. Starts from 1 and increments by 1.
Look up Existing Budget Resource
Get an existing Budget 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?: BudgetState, opts?: CustomResourceOptions): Budget
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actual_spend: Optional[float] = None,
alert_rule_count: Optional[int] = None,
amount: Optional[int] = None,
budget_processing_period_start_offset: Optional[int] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
end_date: Optional[str] = None,
forecasted_spend: Optional[float] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
processing_period_type: Optional[str] = None,
reset_period: Optional[str] = None,
start_date: Optional[str] = None,
state: Optional[str] = None,
target_compartment_id: Optional[str] = None,
target_type: Optional[str] = None,
targets: Optional[Sequence[str]] = None,
time_created: Optional[str] = None,
time_spend_computed: Optional[str] = None,
time_updated: Optional[str] = None,
version: Optional[int] = None) -> Budget
func GetBudget(ctx *Context, name string, id IDInput, state *BudgetState, opts ...ResourceOption) (*Budget, error)
public static Budget Get(string name, Input<string> id, BudgetState? state, CustomResourceOptions? opts = null)
public static Budget get(String name, Output<String> id, BudgetState 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.
- Actual
Spend double - The actual spend in currency for the current budget cycle.
- Alert
Rule intCount - The total number of alert rules in the budget.
- Amount int
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- Budget
Processing intPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- Compartment
Id string - The OCID of the compartment.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description of the budget.
- Display
Name string - (Updatable) The displayName of the budget. Avoid entering confidential information.
- End
Date string - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Forecasted
Spend double - The forecasted spend in currency by the end of the current budget cycle.
- Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Processing
Period stringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- Reset
Period string - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- Start
Date string - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - State string
- The current state of the budget.
- Target
Compartment stringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- Target
Type string - The type of target on which the budget is applied.
- Targets List<string>
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Time
Created string - The time that the budget was created.
- Time
Spend stringComputed - The time that the budget spend was last computed.
- Time
Updated string - The time that the budget was updated.
- Version int
- The version of the budget. Starts from 1 and increments by 1.
- Actual
Spend float64 - The actual spend in currency for the current budget cycle.
- Alert
Rule intCount - The total number of alert rules in the budget.
- Amount int
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- Budget
Processing intPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- Compartment
Id string - The OCID of the compartment.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description of the budget.
- Display
Name string - (Updatable) The displayName of the budget. Avoid entering confidential information.
- End
Date string - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - Forecasted
Spend float64 - The forecasted spend in currency by the end of the current budget cycle.
- map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Processing
Period stringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- Reset
Period string - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- Start
Date string - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - State string
- The current state of the budget.
- Target
Compartment stringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- Target
Type string - The type of target on which the budget is applied.
- Targets []string
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Time
Created string - The time that the budget was created.
- Time
Spend stringComputed - The time that the budget spend was last computed.
- Time
Updated string - The time that the budget was updated.
- Version int
- The version of the budget. Starts from 1 and increments by 1.
- actual
Spend Double - The actual spend in currency for the current budget cycle.
- alert
Rule IntegerCount - The total number of alert rules in the budget.
- amount Integer
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- budget
Processing IntegerPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- compartment
Id String - The OCID of the compartment.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- (Updatable) The description of the budget.
- display
Name String - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end
Date String - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - forecasted
Spend Double - The forecasted spend in currency by the end of the current budget cycle.
- Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing
Period StringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset
Period String - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- start
Date String - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - state String
- The current state of the budget.
- target
Compartment StringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- target
Type String - The type of target on which the budget is applied.
- targets List<String>
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- time
Created String - The time that the budget was created.
- time
Spend StringComputed - The time that the budget spend was last computed.
- time
Updated String - The time that the budget was updated.
- version Integer
- The version of the budget. Starts from 1 and increments by 1.
- actual
Spend number - The actual spend in currency for the current budget cycle.
- alert
Rule numberCount - The total number of alert rules in the budget.
- amount number
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- budget
Processing numberPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- compartment
Id string - The OCID of the compartment.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
- (Updatable) The description of the budget.
- display
Name string - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end
Date string - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - forecasted
Spend number - The forecasted spend in currency by the end of the current budget cycle.
- {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing
Period stringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset
Period string - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- start
Date string - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - state string
- The current state of the budget.
- target
Compartment stringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- target
Type string - The type of target on which the budget is applied.
- targets string[]
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- time
Created string - The time that the budget was created.
- time
Spend stringComputed - The time that the budget spend was last computed.
- time
Updated string - The time that the budget was updated.
- version number
- The version of the budget. Starts from 1 and increments by 1.
- actual_
spend float - The actual spend in currency for the current budget cycle.
- alert_
rule_ intcount - The total number of alert rules in the budget.
- amount int
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- budget_
processing_ intperiod_ start_ offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- compartment_
id str - The OCID of the compartment.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
- (Updatable) The description of the budget.
- display_
name str - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end_
date str - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - forecasted_
spend float - The forecasted spend in currency by the end of the current budget cycle.
- Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing_
period_ strtype - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset_
period str - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- start_
date str - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - state str
- The current state of the budget.
- target_
compartment_ strid - This is DEPRECATED. Set the target compartment ID in targets instead.
- target_
type str - The type of target on which the budget is applied.
- targets Sequence[str]
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- time_
created str - The time that the budget was created.
- time_
spend_ strcomputed - The time that the budget spend was last computed.
- time_
updated str - The time that the budget was updated.
- version int
- The version of the budget. Starts from 1 and increments by 1.
- actual
Spend Number - The actual spend in currency for the current budget cycle.
- alert
Rule NumberCount - The total number of alert rules in the budget.
- amount Number
- (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
- budget
Processing NumberPeriod Start Offset - (Updatable) The number of days offset from the first day of the month, at which the budget processing period starts. In months that have fewer days than this value, processing will begin on the last day of that month. For example, for a value of 12, processing starts every month on the 12th at midnight.
- compartment
Id String - The OCID of the compartment.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- (Updatable) The description of the budget.
- display
Name String - (Updatable) The displayName of the budget. Avoid entering confidential information.
- end
Date String - (Updatable) The date when the one-time budget concludes. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - forecasted
Spend Number - The forecasted spend in currency by the end of the current budget cycle.
- Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- processing
Period StringType - (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset
Period String - (Updatable) The reset period for the budget. Valid value is MONTHLY.
- start
Date String - (Updatable) The date when the one-time budget begins. For example,
2023-03-23
. The date-time format conforms to RFC 3339, and will be truncated to the starting point of the date provided after being converted to UTC time. - state String
- The current state of the budget.
- target
Compartment StringId - This is DEPRECATED. Set the target compartment ID in targets instead.
- target
Type String - The type of target on which the budget is applied.
- targets List<String>
The list of targets on which the budget is applied. If targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}". Curerntly, the array should contain exactly one item.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- time
Created String - The time that the budget was created.
- time
Spend StringComputed - The time that the budget spend was last computed.
- time
Updated String - The time that the budget was updated.
- version Number
- The version of the budget. Starts from 1 and increments by 1.
Import
Budgets can be imported using the id
, e.g.
$ pulumi import oci:Budget/budget:Budget test_budget "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.