1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Budget
  5. Budget
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Budget.Budget

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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.
    CompartmentId string
    The OCID of the compartment.
    ResetPeriod string
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    BudgetProcessingPeriodStartOffset int
    (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.
    DefinedTags 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.
    DisplayName string
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    EndDate 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.
    FreeformTags 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"}
    ProcessingPeriodType string
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    StartDate 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.
    TargetCompartmentId string
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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.
    CompartmentId string
    The OCID of the compartment.
    ResetPeriod string
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    BudgetProcessingPeriodStartOffset int
    (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.
    DefinedTags 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.
    DisplayName string
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    EndDate 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.
    FreeformTags 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"}
    ProcessingPeriodType string
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    StartDate 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.
    TargetCompartmentId string
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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.
    compartmentId String
    The OCID of the compartment.
    resetPeriod String
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    budgetProcessingPeriodStartOffset Integer
    (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.
    definedTags 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.
    displayName String
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    endDate 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.
    freeformTags 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"}
    processingPeriodType String
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    startDate 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.
    targetCompartmentId String
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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.
    compartmentId string
    The OCID of the compartment.
    resetPeriod string
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    budgetProcessingPeriodStartOffset number
    (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.
    definedTags {[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.
    displayName string
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    endDate 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.
    freeformTags {[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"}
    processingPeriodType string
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    startDate 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.
    targetCompartmentId string
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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_period_start_offset int
    (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.
    defined_tags 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.
    freeform_tags 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_type str
    (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_id str
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use '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.
    compartmentId String
    The OCID of the compartment.
    resetPeriod String
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    budgetProcessingPeriodStartOffset Number
    (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.
    definedTags 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.
    displayName String
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    endDate 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.
    freeformTags 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"}
    processingPeriodType String
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    startDate 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.
    targetCompartmentId String
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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:

    ActualSpend double
    The actual spend in currency for the current budget cycle.
    AlertRuleCount int
    The total number of alert rules in the budget.
    ForecastedSpend 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.
    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.
    ForecastedSpend 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.
    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.
    forecastedSpend 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.
    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.
    forecastedSpend 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.
    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.
    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_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.
    forecastedSpend 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.
    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.

    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.
    The following state arguments are supported:
    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
    (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
    BudgetProcessingPeriodStartOffset int
    (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.
    CompartmentId string
    The OCID of the compartment.
    DefinedTags 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.
    DisplayName string
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    EndDate 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.
    ForecastedSpend double
    The forecasted spend in currency by the end of the current budget cycle.
    FreeformTags 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"}
    ProcessingPeriodType string
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    ResetPeriod string
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    StartDate 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.
    TargetCompartmentId string
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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

    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
    (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
    BudgetProcessingPeriodStartOffset int
    (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.
    CompartmentId string
    The OCID of the compartment.
    DefinedTags 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.
    DisplayName string
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    EndDate 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.
    ForecastedSpend float64
    The forecasted spend in currency by the end of the current budget cycle.
    FreeformTags 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"}
    ProcessingPeriodType string
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    ResetPeriod string
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    StartDate 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.
    TargetCompartmentId string
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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

    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
    (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
    budgetProcessingPeriodStartOffset Integer
    (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.
    compartmentId String
    The OCID of the compartment.
    definedTags 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.
    displayName String
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    endDate 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.
    forecastedSpend Double
    The forecasted spend in currency by the end of the current budget cycle.
    freeformTags 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"}
    processingPeriodType String
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    resetPeriod String
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    startDate 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.
    targetCompartmentId String
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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

    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
    (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
    budgetProcessingPeriodStartOffset number
    (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.
    compartmentId string
    The OCID of the compartment.
    definedTags {[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.
    displayName string
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    endDate 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.
    forecastedSpend number
    The forecasted spend in currency by the end of the current budget cycle.
    freeformTags {[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"}
    processingPeriodType string
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    resetPeriod string
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    startDate 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.
    targetCompartmentId string
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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

    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
    (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
    budget_processing_period_start_offset int
    (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.
    defined_tags 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.
    freeform_tags 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_type str
    (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_id str
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use '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_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
    (Updatable) The amount of the budget expressed as a whole number in the currency of the customer's rate card.
    budgetProcessingPeriodStartOffset Number
    (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.
    compartmentId String
    The OCID of the compartment.
    definedTags 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.
    displayName String
    (Updatable) The displayName of the budget. Avoid entering confidential information.
    endDate 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.
    forecastedSpend Number
    The forecasted spend in currency by the end of the current budget cycle.
    freeformTags 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"}
    processingPeriodType String
    (Updatable) The type of the budget processing period. Valid values are INVOICE, MONTH, and SINGLE_USE.
    resetPeriod String
    (Updatable) The reset period for the budget. Valid value is MONTHLY.
    startDate 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.
    targetCompartmentId String
    This is DEPRECATED. Set the target compartment ID in targets instead.

    Deprecated: The 'target_compartment_id' field has been deprecated. Please use 'targets' 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", 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

    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.

    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.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi