# 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
opsi_client = oci.opsi.OperationsInsightsClient(config)
# Send the request to service, some parameters are not required, see API
# doc for more info
create_exadata_insight_response = opsi_client.create_exadata_insight(
create_exadata_insight_details=oci.opsi.models.CreateMacsManagedCloudExadataInsightDetails(
entity_source="MACS_MANAGED_CLOUD_EXADATA",
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
exadata_infra_id="ocid1.test.oc1..<unique_ID>EXAMPLE-exadataInfraId-Value",
freeform_tags={
'EXAMPLE_KEY_3YAJb': 'EXAMPLE_VALUE_0qYgUulKgPaxyNcYi1Yw'},
defined_tags={
'EXAMPLE_KEY_gdcVP': {
'EXAMPLE_KEY_osgb6': 'EXAMPLE--Value'}},
member_vm_cluster_details=[
oci.opsi.models.CreateMacsManagedCloudExadataVmclusterDetails(
vm_cluster_type="vmCluster",
vmcluster_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vmclusterId-Value",
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
member_database_details=[
oci.opsi.models.CreateMacsManagedCloudDatabaseInsightDetails(
entity_source="MACS_MANAGED_CLOUD_DATABASE",
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
database_id="ocid1.test.oc1..<unique_ID>EXAMPLE-databaseId-Value",
management_agent_id="ocid1.test.oc1..<unique_ID>EXAMPLE-managementAgentId-Value",
connection_details=oci.opsi.models.ConnectionDetails(
host_name="EXAMPLE-hostName-Value",
protocol="TCP",
port=44938,
service_name="EXAMPLE-serviceName-Value"),
connection_credential_details=oci.opsi.models.CredentialsBySource(
credential_type="CREDENTIALS_BY_SOURCE",
credential_source_name="EXAMPLE-credentialSourceName-Value"),
database_resource_type="EXAMPLE-databaseResourceType-Value",
deployment_type="VIRTUAL_MACHINE",
freeform_tags={
'EXAMPLE_KEY_BBYDJ': 'EXAMPLE_VALUE_23IuKmJd9VZztCeOyW5v'},
defined_tags={
'EXAMPLE_KEY_f3zfS': {
'EXAMPLE_KEY_zdcgE': 'EXAMPLE--Value'}},
system_tags={
'EXAMPLE_KEY_B1kmw': {
'EXAMPLE_KEY_5OudO': 'EXAMPLE--Value'}})])]),
opc_retry_token="EXAMPLE-opcRetryToken-Value",
opc_request_id="6TZNE8W4MK5QGVI7X4FA<unique_ID>")
# Get the data from response
print(create_exadata_insight_response.data)