# 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).

from datetime import datetime
import 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.config.from_file()


# Initialize service client with default config file
desktops_client = oci.desktops.DesktopServiceClient(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(
    desktop_pool_id="ocid1.test.oc1..<unique_ID>EXAMPLE-desktopPoolId-Value",
    update_desktop_pool_details=oci.desktops.models.UpdateDesktopPoolDetails(
        display_name="EXAMPLE-displayName-Value",
        description="EXAMPLE-description-Value",
        maximum_size=3443,
        standby_size=995,
        device_policy=oci.desktops.models.DesktopDevicePolicy(
            clipboard_mode="FULL",
            audio_mode="FROMDESKTOP",
            cdm_mode="READONLY",
            is_printing_enabled=False,
            is_pointer_enabled=False,
            is_keyboard_enabled=True,
            is_display_enabled=False),
        availability_policy=oci.desktops.models.DesktopAvailabilityPolicy(
            start_schedule=oci.desktops.models.DesktopSchedule(
                cron_expression="EXAMPLE-cronExpression-Value",
                timezone="EXAMPLE-timezone-Value")),
        contact_details="EXAMPLE-contactDetails-Value",
        time_start_scheduled=datetime.strptime(
                        "2022-08-05T09:06:48.234Z",
                        "%Y-%m-%dT%H:%M:%S.%fZ"),
        time_stop_scheduled=datetime.strptime(
            "2035-06-23T07:25:54.046Z",
            "%Y-%m-%dT%H:%M:%S.%fZ"),
        freeform_tags={
            'EXAMPLE_KEY_l5ndW': 'EXAMPLE_VALUE_W3MKSYhaojCdKI9DHb1P'},
        defined_tags={
            'EXAMPLE_KEY_pY8Vn': {
                'EXAMPLE_KEY_6YBOh': 'EXAMPLE--Value'}},
        session_lifecycle_actions=oci.desktops.models.UpdateDesktopPoolDesktopSessionLifecycleActions(
            inactivity=oci.desktops.models.InactivityConfig(
                action="NONE",
                grace_period_in_minutes=1393),
            disconnect=oci.desktops.models.DisconnectConfig(
                action="STOP",
                grace_period_in_minutes=796))),
    opc_request_id="ZHFQAOBOVN2CEAEATDH8<unique_ID>",
    if_match="EXAMPLE-ifMatch-Value")

# Get the data from response
print(update_desktop_pool_response.headers)