# 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'
# 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
database_client = OCI::Database::DatabaseClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
create_exadata_infrastructure_response =
database_client.create_exadata_infrastructure(
OCI::Database::Models::CreateExadataInfrastructureDetails.new(
compartment_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
display_name: 'EXAMPLE-displayName-Value',
shape: 'EXAMPLE-shape-Value',
time_zone: 'EXAMPLE-timeZone-Value',
cloud_control_plane_server1: 'EXAMPLE-cloudControlPlaneServer1-Value',
cloud_control_plane_server2: 'EXAMPLE-cloudControlPlaneServer2-Value',
netmask: 'EXAMPLE-netmask-Value',
gateway: 'EXAMPLE-gateway-Value',
admin_network_cidr: 'EXAMPLE-adminNetworkCIDR-Value',
infini_band_network_cidr: 'EXAMPLE-infiniBandNetworkCIDR-Value',
dns_server: %w[EXAMPLE--Value],
ntp_server: %w[EXAMPLE--Value],
corporate_proxy: 'EXAMPLE-corporateProxy-Value',
contacts: [
OCI::Database::Models::ExadataInfrastructureContact.new(
name: 'EXAMPLE-name-Value',
email: 'EXAMPLE-email-Value',
is_primary: true,
phone_number: 'EXAMPLE-phoneNumber-Value',
is_contact_mos_validated: true
)
],
maintenance_window:
OCI::Database::Models::MaintenanceWindow.new(
preference: 'CUSTOM_PREFERENCE',
patching_mode: 'NONROLLING',
is_custom_action_timeout_enabled: true,
custom_action_timeout_in_mins: 84,
is_monthly_patching_enabled: false,
months: [OCI::Database::Models::Month.new(name: 'JULY')],
weeks_of_month: [2],
days_of_week: [OCI::Database::Models::DayOfWeek.new(name: 'SUNDAY')],
hours_of_day: [18],
lead_time_in_weeks: 1
),
storage_count: 379,
compute_count: 362,
is_multi_rack_deployment: false,
multi_rack_configuration_file: 'dzxc9HrlLvleDMFrPNKl',
is_cps_offline_report_enabled: false,
network_bonding_mode_details:
OCI::Database::Models::NetworkBondingModeDetails.new(
client_network_bonding_mode: 'LACP',
backup_network_bonding_mode: 'ACTIVE_BACKUP',
dr_network_bonding_mode: 'LACP'
),
freeform_tags: {
'EXAMPLE_KEY_VNWJY' => 'EXAMPLE_VALUE_YT6dfKdtevM6r0hK2AhL'
},
defined_tags: {
'EXAMPLE_KEY_nTte8' => { 'EXAMPLE_KEY_1IHR9' => 'EXAMPLE--Value' }
}
)
)
# Get the data from response
puts "#{create_exadata_infrastructure_response.data}"