# 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
opsi_client = oci.opsi.OperationsInsightsClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
ingest_host_configuration_response = opsi_client.ingest_host_configuration(
    id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
    ingest_host_configuration_details=oci.opsi.models.IngestHostConfigurationDetails(
        items=[
            oci.opsi.models.HostMemoryConfiguration(
                metric_name="HOST_MEMORY_CONFIGURATION",
                time_collected=datetime.strptime(
                    "2035-07-09T17:21:36.288Z",
                    "%Y-%m-%dT%H:%M:%S.%fZ"),
                page_size_in_kb=4162.501,
                page_tables_in_kb=8014.3105,
                swap_total_in_kb=5479.619,
                huge_page_size_in_kb=7329.9883,
                huge_pages_total=54)]),
    opc_request_id="YYIFBEUV5IG7PPGTTABN<unique_ID>",
    if_match="EXAMPLE-ifMatch-Value",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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