# 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 'date'
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
desktops_client = OCI::Desktops::DesktopServiceClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
update_desktop_pool_response =
desktops_client.update_desktop_pool(
'ocid1.test.oc1..<unique_ID>EXAMPLE-desktopPoolId-Value',
OCI::Desktops::Models::UpdateDesktopPoolDetails.new(
display_name: 'EXAMPLE-displayName-Value',
description: 'EXAMPLE-description-Value',
maximum_size: 7923,
standby_size: 720,
device_policy:
OCI::Desktops::Models::DesktopDevicePolicy.new(
clipboard_mode: 'FROMDESKTOP',
audio_mode: 'TODESKTOP',
cdm_mode: 'FULL',
is_printing_enabled: true,
is_pointer_enabled: true,
is_keyboard_enabled: true,
is_display_enabled: false,
is_video_input_enabled: true
),
availability_policy:
OCI::Desktops::Models::DesktopAvailabilityPolicy.new(
start_schedule:
OCI::Desktops::Models::DesktopSchedule.new(
cron_expression: 'EXAMPLE-cronExpression-Value',
timezone: 'EXAMPLE-timezone-Value'
)
),
contact_details: 'EXAMPLE-contactDetails-Value',
time_start_scheduled: DateTime.parse('2024-02-25T04:04:13.691Z'),
time_stop_scheduled: DateTime.parse('2001-09-28T05:18:12.012Z'),
freeform_tags: {
'EXAMPLE_KEY_aqmKy' => 'EXAMPLE_VALUE_2wTI89pch7GtqAZKcZFw'
},
defined_tags: {
'EXAMPLE_KEY_zeFUS' => { 'EXAMPLE_KEY_iJQ7k' => 'EXAMPLE--Value' }
},
session_lifecycle_actions:
OCI::Desktops::Models::UpdateDesktopPoolDesktopSessionLifecycleActions
.new(
inactivity:
OCI::Desktops::Models::InactivityConfig.new(
action: 'NONE', grace_period_in_minutes: 1271
),
disconnect:
OCI::Desktops::Models::DisconnectConfig.new(
action: 'DELETE', grace_period_in_minutes: 779
)
),
image:
OCI::Desktops::Models::UpdateDesktopImage.new(
image_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-imageId-Value'
),
network_configuration:
OCI::Desktops::Models::UpdateDesktopNetworkConfiguration.new(
security_attributes: {
'EXAMPLE_KEY_DIcZx' => { 'EXAMPLE_KEY_C149O' => 'EXAMPLE--Value' }
}
),
private_access_details:
OCI::Desktops::Models::UpdateDesktopPoolPrivateAccessDetails.new(
security_attributes: {
'EXAMPLE_KEY_iMzd3' => { 'EXAMPLE_KEY_AD1mg' => 'EXAMPLE--Value' }
}
),
security_attributes: {
'EXAMPLE_KEY_a4Uvk' => { 'EXAMPLE_KEY_CbzEO' => 'EXAMPLE--Value' }
},
boot_volume_size_in_gbs: 17_472
)
)
# Get the data from response
puts "#{update_desktop_pool_response.headers}"