# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).

require 'oci'
require 'date'

# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config

# Initialize service client with default config file
budget_client = OCI::Budget::BudgetClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
update_budget_response =
      display_name: 'EXAMPLE-displayName-Value',
      description: 'EXAMPLE-description-Value',
      amount: 14363765800.0,
      budget_processing_period_start_offset: 26,
      processing_period_type: 'MONTH',
      start_date: DateTime.parse('2038-05-14T14:01:01.573Z'),
      end_date: DateTime.parse('2024-09-09T03:58:43.493Z'),
      reset_period: 'MONTHLY',
      freeform_tags: {
        'EXAMPLE_KEY_4S0iv' => 'EXAMPLE_VALUE_ECZx9KlySOPnv6N56hO6'
      defined_tags: {
        'EXAMPLE_KEY_q725v' => { 'EXAMPLE_KEY_WaDWD' => 'EXAMPLE--Value' }

# Get the data from response
puts "#{update_budget_response.data}"