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

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
datacc_client = oci.datacc.BaseinfraClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
update_infrastructure_response = datacc_client.update_infrastructure(
    update_infrastructure_details=oci.datacc.models.UpdateInfrastructureDetails(
        display_name="EXAMPLE-displayName-Value",
        description="EXAMPLE-description-Value",
        system_model="X10_HA_512",
        shape="SIX_SSDS",
        cloud_control_plane_server1="EXAMPLE-cloudControlPlaneServer1-Value",
        cloud_control_plane_server2="EXAMPLE-cloudControlPlaneServer2-Value",
        netmask="EXAMPLE-netmask-Value",
        gateway="EXAMPLE-gateway-Value",
        admin_networkcidr="EXAMPLE-adminNetworkcidr-Value",
        data_disk_percentage=40,
        contacts=[
            oci.datacc.models.InfrastructureContact(
                name="EXAMPLE-name-Value",
                email="EXAMPLE-email-Value",
                is_primary=False,
                phone_number="EXAMPLE-phoneNumber-Value",
                is_contact_mos_validated=True)],
        dns_servers=["EXAMPLE--Value"],
        ntp_servers=["EXAMPLE--Value"],
        client_network_bonding_mode="ACTIVE_BACKUP",
        backup_network_bonding_mode="ACTIVE_BACKUP",
        cps_network_bonding_mode="ACTIVE_BACKUP",
        client_network_bonding_interface="BTBOND3",
        backup_network_bonding_interface="BTBOND6",
        cps_network_bonding_interface="BTBOND4",
        acfs_file_system_storage_in_gbs=9813.372,
        corporate_proxy="EXAMPLE-corporateProxy-Value",
        vlan_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vlanId-Value",
        maintenance_window=oci.datacc.models.MaintenanceWindow(
            preference="CUSTOM_PREFERENCE",
            patching_mode="ROLLING",
            is_custom_action_timeout_enabled=True,
            custom_action_timeout_in_mins=140,
            is_monthly_patching_enabled=True,
            months=["DECEMBER"],
            weeks_of_month=[2],
            days_of_week=["TUESDAY"],
            hours_of_day=[5],
            lead_time_in_weeks=3),
        defined_tags={
            'EXAMPLE_KEY_dtFur': {
                'EXAMPLE_KEY_PRaLK': 'EXAMPLE--Value'}},
        freeform_tags={
            'EXAMPLE_KEY_punEs': 'EXAMPLE_VALUE_CpBKNQssBJpUWltSNt2N'}),
    infrastructure_id="ocid1.test.oc1..<unique_ID>EXAMPLE-infrastructureId-Value",
    if_match="EXAMPLE-ifMatch-Value",
    opc_request_id="DZ0IW1SBGPODIJKR5CPO<unique_ID>")

# Get the data from response
print(update_infrastructure_response.data)