Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.Budget.getBudget
Explore with Pulumi AI
This data source provides details about a specific Budget resource in Oracle Cloud Infrastructure Budget service.
Gets a budget by the identifier.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBudget = oci.Budget.getBudget({
budgetId: testBudgetOciBudgetBudget.id,
});
import pulumi
import pulumi_oci as oci
test_budget = oci.Budget.get_budget(budget_id=test_budget_oci_budget_budget["id"])
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.GetBudget(ctx, &budget.GetBudgetArgs{
BudgetId: testBudgetOciBudgetBudget.Id,
}, nil)
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 = Oci.Budget.GetBudget.Invoke(new()
{
BudgetId = testBudgetOciBudgetBudget.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Budget.BudgetFunctions;
import com.pulumi.oci.Budget.inputs.GetBudgetArgs;
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) {
final var testBudget = BudgetFunctions.getBudget(GetBudgetArgs.builder()
.budgetId(testBudgetOciBudgetBudget.id())
.build());
}
}
variables:
testBudget:
fn::invoke:
Function: oci:Budget:getBudget
Arguments:
budgetId: ${testBudgetOciBudgetBudget.id}
Using getBudget
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBudget(args: GetBudgetArgs, opts?: InvokeOptions): Promise<GetBudgetResult>
function getBudgetOutput(args: GetBudgetOutputArgs, opts?: InvokeOptions): Output<GetBudgetResult>
def get_budget(budget_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBudgetResult
def get_budget_output(budget_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBudgetResult]
func GetBudget(ctx *Context, args *GetBudgetArgs, opts ...InvokeOption) (*GetBudgetResult, error)
func GetBudgetOutput(ctx *Context, args *GetBudgetOutputArgs, opts ...InvokeOption) GetBudgetResultOutput
> Note: This function is named GetBudget
in the Go SDK.
public static class GetBudget
{
public static Task<GetBudgetResult> InvokeAsync(GetBudgetArgs args, InvokeOptions? opts = null)
public static Output<GetBudgetResult> Invoke(GetBudgetInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBudgetResult> getBudget(GetBudgetArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Budget/getBudget:getBudget
arguments:
# arguments dictionary
The following arguments are supported:
- Budget
Id string - The unique budget OCID.
- Budget
Id string - The unique budget OCID.
- budget
Id String - The unique budget OCID.
- budget
Id string - The unique budget OCID.
- budget_
id str - The unique budget OCID.
- budget
Id String - The unique budget OCID.
getBudget Result
The following output properties are available:
- 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
- The amount of the budget, expressed in the currency of the customer's rate card.
- Budget
Id string - Budget
Processing intPeriod Start Offset - 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>
- 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
- The description of the budget.
- Display
Name string - The display name of the budget. Avoid entering confidential information.
- End
Date string - The time 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>
- 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"}
- Id string
- The OCID of the budget.
- Processing
Period stringType - The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- Reset
Period string - The reset period for the budget.
- Start
Date string - 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. For backwards compatability, the property is populated when the targetType is "COMPARTMENT", and targets contain the specific target compartment OCID. For all other scenarios, this property will be left empty.
- 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 the targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If the targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
- 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
- The amount of the budget, expressed in the currency of the customer's rate card.
- Budget
Id string - Budget
Processing intPeriod Start Offset - 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
- 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
- The description of the budget.
- Display
Name string - The display name of the budget. Avoid entering confidential information.
- End
Date string - The time 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
- 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"}
- Id string
- The OCID of the budget.
- Processing
Period stringType - The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- Reset
Period string - The reset period for the budget.
- Start
Date string - 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. For backwards compatability, the property is populated when the targetType is "COMPARTMENT", and targets contain the specific target compartment OCID. For all other scenarios, this property will be left empty.
- 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 the targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If the targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
- 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
- The amount of the budget, expressed in the currency of the customer's rate card.
- budget
Id String - budget
Processing IntegerPeriod Start Offset - 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>
- 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
- The description of the budget.
- display
Name String - The display name of the budget. Avoid entering confidential information.
- end
Date String - The time 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>
- 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"}
- id String
- The OCID of the budget.
- processing
Period StringType - The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset
Period String - The reset period for the budget.
- start
Date String - 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. For backwards compatability, the property is populated when the targetType is "COMPARTMENT", and targets contain the specific target compartment OCID. For all other scenarios, this property will be left empty.
- 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 the targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If the targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
- 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
- The amount of the budget, expressed in the currency of the customer's rate card.
- budget
Id string - budget
Processing numberPeriod Start Offset - 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}
- 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
- The description of the budget.
- display
Name string - The display name of the budget. Avoid entering confidential information.
- end
Date string - The time 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}
- 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"}
- id string
- The OCID of the budget.
- processing
Period stringType - The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset
Period string - The reset period for the budget.
- start
Date string - 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. For backwards compatability, the property is populated when the targetType is "COMPARTMENT", and targets contain the specific target compartment OCID. For all other scenarios, this property will be left empty.
- 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 the targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If the targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
- 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
- The amount of the budget, expressed in the currency of the customer's rate card.
- budget_
id str - budget_
processing_ intperiod_ start_ offset - 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]
- 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
- The description of the budget.
- display_
name str - The display name of the budget. Avoid entering confidential information.
- end_
date str - The time 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]
- 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"}
- id str
- The OCID of the budget.
- processing_
period_ strtype - The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset_
period str - The reset period for the budget.
- start_
date str - 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. For backwards compatability, the property is populated when the targetType is "COMPARTMENT", and targets contain the specific target compartment OCID. For all other scenarios, this property will be left empty.
- 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 the targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If the targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
- 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
- The amount of the budget, expressed in the currency of the customer's rate card.
- budget
Id String - budget
Processing NumberPeriod Start Offset - 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>
- 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
- The description of the budget.
- display
Name String - The display name of the budget. Avoid entering confidential information.
- end
Date String - The time 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>
- 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"}
- id String
- The OCID of the budget.
- processing
Period StringType - The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
- reset
Period String - The reset period for the budget.
- start
Date String - 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. For backwards compatability, the property is populated when the targetType is "COMPARTMENT", and targets contain the specific target compartment OCID. For all other scenarios, this property will be left empty.
- 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 the targetType is "COMPARTMENT", the targets contain the list of compartment OCIDs. If the targetType is "TAG", the targets contain the list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".
- 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.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.