# 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
database_management_client = oci.database_management.SqlTuningClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
load_sql_tuning_set_response = database_management_client.load_sql_tuning_set(
    managed_database_id="ocid1.test.oc1..<unique_ID>EXAMPLE-managedDatabaseId-Value",
    sql_tuning_set_id=253,
    load_sql_tuning_set_details=oci.database_management.models.LoadSqlTuningSetDetails(
        name="EXAMPLE-name-Value",
        load_type="CURRENT_CURSOR_CACHE",
        credential_details=oci.database_management.models.SqlTuningSetAdminSecretCredentialDetails(
            sql_tuning_set_admin_credential_type="SECRET",
            username="EXAMPLE-username-Value",
            role="NORMAL",
            secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
        database_credential=oci.database_management.models.DatabaseSecretCredentialDetails(
            credential_type="SECRET",
            password_secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-passwordSecretId-Value",
            username="EXAMPLE-username-Value",
            role="NORMAL"),
        show_sql_only=30,
        owner="EXAMPLE-owner-Value",
        basic_filter="EXAMPLE-basicFilter-Value",
        recursive_sql="NO_RECURSIVE_SQL",
        result_percentage=3369.3044,
        result_limit=371,
        ranking_measure1="BUFFER_GETS",
        ranking_measure2="CPU_TIME",
        ranking_measure3="BUFFER_GETS",
        total_time_limit=543,
        repeat_interval=271,
        capture_option="INSERT",
        capture_mode="MODE_REPLACE_OLD_STATS",
        attribute_list="EXAMPLE-attributeList-Value",
        load_option="INSERT",
        update_option="REPLACE",
        update_attributes="EXAMPLE-updateAttributes-Value",
        update_condition="NEW",
        is_ignore_null=True,
        commit_rows=268,
        begin_snapshot=153,
        end_snapshot=736,
        baseline_name="EXAMPLE-baselineName-Value"),
    opc_request_id="AH9OBK06OZKAKTNWMQ0V<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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