getBudget

This data source provides details about a specific Budget resource in Oracle Cloud Infrastructure Budget service.

Gets a budget by the identifier.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testBudget = Oci.Budget.GetBudget.Invoke(new()
    {
        BudgetId = oci_budget_budget.Test_budget.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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: oci_budget_budget.Test_budget.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(oci_budget_budget.test_budget().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_budget = oci.Budget.get_budget(budget_id=oci_budget_budget["test_budget"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testBudget = oci.Budget.getBudget({
    budgetId: oci_budget_budget.test_budget.id,
});
variables:
  testBudget:
    Fn::Invoke:
      Function: oci:Budget:getBudget
      Arguments:
        budgetId: ${oci_budget_budget.test_budget.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:

BudgetId string

The unique budget OCID.

BudgetId string

The unique budget OCID.

budgetId String

The unique budget OCID.

budgetId string

The unique budget OCID.

budget_id str

The unique budget OCID.

budgetId String

The unique budget OCID.

getBudget Result

The following output properties are available:

ActualSpend double

The actual spend in currency for the current budget cycle.

AlertRuleCount int

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.

BudgetId string
BudgetProcessingPeriodStartOffset int

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.

CompartmentId string

The OCID of the compartment.

DefinedTags Dictionary<string, object>

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.

DisplayName string

The display name of the budget. Avoid entering confidential information.

ForecastedSpend double

The forecasted spend in currency by the end of the current budget cycle.

FreeformTags Dictionary<string, object>

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.

ProcessingPeriodType string

The type of the budget processing period. Valid values are INVOICE and MONTH.

ResetPeriod string

The reset period for the budget.

State string

The current state of the budget.

TargetCompartmentId string

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.

Deprecated:

The 'target_compartment_id' field has been deprecated. Please use 'target_type' instead.

TargetType 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}".

TimeCreated string

The time that the budget was created.

TimeSpendComputed string

The time that the budget spend was last computed.

TimeUpdated string

The time that the budget was updated.

Version int

The version of the budget. Starts from 1 and increments by 1.

ActualSpend float64

The actual spend in currency for the current budget cycle.

AlertRuleCount int

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.

BudgetId string
BudgetProcessingPeriodStartOffset int

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.

CompartmentId string

The OCID of the compartment.

DefinedTags map[string]interface{}

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.

DisplayName string

The display name of the budget. Avoid entering confidential information.

ForecastedSpend float64

The forecasted spend in currency by the end of the current budget cycle.

FreeformTags map[string]interface{}

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.

ProcessingPeriodType string

The type of the budget processing period. Valid values are INVOICE and MONTH.

ResetPeriod string

The reset period for the budget.

State string

The current state of the budget.

TargetCompartmentId string

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.

Deprecated:

The 'target_compartment_id' field has been deprecated. Please use 'target_type' instead.

TargetType 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}".

TimeCreated string

The time that the budget was created.

TimeSpendComputed string

The time that the budget spend was last computed.

TimeUpdated string

The time that the budget was updated.

Version int

The version of the budget. Starts from 1 and increments by 1.

actualSpend Double

The actual spend in currency for the current budget cycle.

alertRuleCount Integer

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.

budgetId String
budgetProcessingPeriodStartOffset Integer

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.

compartmentId String

The OCID of the compartment.

definedTags Map<String,Object>

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.

displayName String

The display name of the budget. Avoid entering confidential information.

forecastedSpend Double

The forecasted spend in currency by the end of the current budget cycle.

freeformTags Map<String,Object>

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.

processingPeriodType String

The type of the budget processing period. Valid values are INVOICE and MONTH.

resetPeriod String

The reset period for the budget.

state String

The current state of the budget.

targetCompartmentId String

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.

Deprecated:

The 'target_compartment_id' field has been deprecated. Please use 'target_type' instead.

targetType 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}".

timeCreated String

The time that the budget was created.

timeSpendComputed String

The time that the budget spend was last computed.

timeUpdated String

The time that the budget was updated.

version Integer

The version of the budget. Starts from 1 and increments by 1.

actualSpend number

The actual spend in currency for the current budget cycle.

alertRuleCount number

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.

budgetId string
budgetProcessingPeriodStartOffset number

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.

compartmentId string

The OCID of the compartment.

definedTags {[key: string]: any}

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.

displayName string

The display name of the budget. Avoid entering confidential information.

forecastedSpend number

The forecasted spend in currency by the end of the current budget cycle.

freeformTags {[key: string]: any}

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.

processingPeriodType string

The type of the budget processing period. Valid values are INVOICE and MONTH.

resetPeriod string

The reset period for the budget.

state string

The current state of the budget.

targetCompartmentId string

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.

Deprecated:

The 'target_compartment_id' field has been deprecated. Please use 'target_type' instead.

targetType 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}".

timeCreated string

The time that the budget was created.

timeSpendComputed string

The time that the budget spend was last computed.

timeUpdated 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_count int

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_period_start_offset int

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.

defined_tags Mapping[str, Any]

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.

forecasted_spend float

The forecasted spend in currency by the end of the current budget cycle.

freeform_tags Mapping[str, Any]

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_type str

The type of the budget processing period. Valid values are INVOICE and MONTH.

reset_period str

The reset period for the budget.

state str

The current state of the budget.

target_compartment_id str

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.

Deprecated:

The 'target_compartment_id' field has been deprecated. Please use 'target_type' 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 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_computed str

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.

actualSpend Number

The actual spend in currency for the current budget cycle.

alertRuleCount Number

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.

budgetId String
budgetProcessingPeriodStartOffset Number

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.

compartmentId String

The OCID of the compartment.

definedTags Map<Any>

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.

displayName String

The display name of the budget. Avoid entering confidential information.

forecastedSpend Number

The forecasted spend in currency by the end of the current budget cycle.

freeformTags Map<Any>

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.

processingPeriodType String

The type of the budget processing period. Valid values are INVOICE and MONTH.

resetPeriod String

The reset period for the budget.

state String

The current state of the budget.

targetCompartmentId String

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.

Deprecated:

The 'target_compartment_id' field has been deprecated. Please use 'target_type' instead.

targetType 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}".

timeCreated String

The time that the budget was created.

timeSpendComputed String

The time that the budget spend was last computed.

timeUpdated 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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.