Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getBudget

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

Gets a Budget by identifier

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testBudget = Output.Create(Oci.Budget.GetBudget.InvokeAsync(new Oci.Budget.GetBudgetArgs
        {
            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
	})
}

Coming soon!

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,
});

Coming soon!

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

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 tenancy

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.

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

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 will be populated when targetType is "COMPARTMENT" AND targets contains EXACT ONE 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 targetType is "COMPARTMENT", targets contains list of compartment OCIDs. If targetType is "TAG", targets contains list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".

TimeCreated string

Time that budget was created

TimeSpendComputed string

The time that the budget spend was last computed

TimeUpdated string

Time that budget was updated

Version int

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

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 tenancy

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.

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

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 will be populated when targetType is "COMPARTMENT" AND targets contains EXACT ONE 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 targetType is "COMPARTMENT", targets contains list of compartment OCIDs. If targetType is "TAG", targets contains list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".

TimeCreated string

Time that budget was created

TimeSpendComputed string

The time that the budget spend was last computed

TimeUpdated string

Time that budget was updated

Version int

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

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 tenancy

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.

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

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 will be populated when targetType is "COMPARTMENT" AND targets contains EXACT ONE 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 targetType is "COMPARTMENT", targets contains list of compartment OCIDs. If targetType is "TAG", targets contains list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".

timeCreated String

Time that budget was created

timeSpendComputed String

The time that the budget spend was last computed

timeUpdated String

Time that budget was updated

version Integer

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

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 tenancy

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.

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

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 will be populated when targetType is "COMPARTMENT" AND targets contains EXACT ONE 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 targetType is "COMPARTMENT", targets contains list of compartment OCIDs. If targetType is "TAG", targets contains list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".

timeCreated string

Time that budget was created

timeSpendComputed string

The time that the budget spend was last computed

timeUpdated string

Time that budget was updated

version number

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

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 tenancy

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.

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

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 will be populated when targetType is "COMPARTMENT" AND targets contains EXACT ONE 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 targetType is "COMPARTMENT", targets contains list of compartment OCIDs. If targetType is "TAG", targets contains list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".

time_created str

Time that budget was created

time_spend_computed str

The time that the budget spend was last computed

time_updated str

Time that budget was updated

version int

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

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 tenancy

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.

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

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 will be populated when targetType is "COMPARTMENT" AND targets contains EXACT ONE 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 targetType is "COMPARTMENT", targets contains list of compartment OCIDs. If targetType is "TAG", targets contains list of cost tracking tag identifiers in the form of "{tagNamespace}.{tagKey}.{tagValue}".

timeCreated String

Time that budget was created

timeSpendComputed String

The time that the budget spend was last computed

timeUpdated String

Time that budget was updated

version Number

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.