# 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
iot_client = oci.iot.IotClient(config)
# Send the request to service, some parameters are not required, see API
# doc for more info
update_digital_twin_adapter_response = iot_client.update_digital_twin_adapter(
digital_twin_adapter_id="ocid1.test.oc1..<unique_ID>EXAMPLE-digitalTwinAdapterId-Value",
update_digital_twin_adapter_details=oci.iot.models.UpdateDigitalTwinAdapterDetails(
display_name="EXAMPLE-displayName-Value",
description="EXAMPLE-description-Value",
inbound_envelope=oci.iot.models.DigitalTwinAdapterInboundEnvelope(
reference_endpoint="EXAMPLE-referenceEndpoint-Value",
reference_payload=oci.iot.models.DigitalTwinAdapterJsonPayload(
data_format="JSON",
data={
'EXAMPLE_KEY_PY1dY': 'EXAMPLE--Value'}),
envelope_mapping=oci.iot.models.DigitalTwinAdapterEnvelopeMapping(
time_observed="EXAMPLE-timeObserved-Value")),
inbound_routes=[
oci.iot.models.DigitalTwinAdapterInboundRoute(
condition="EXAMPLE-condition-Value",
reference_payload=oci.iot.models.DigitalTwinAdapterJsonPayload(
data_format="JSON",
data={
'EXAMPLE_KEY_gemnW': 'EXAMPLE--Value'}),
payload_mapping={
'EXAMPLE_KEY_cqQY7': 'EXAMPLE_VALUE_UxIrm0p4q2sGLD3tXH0C'},
description="EXAMPLE-description-Value")],
freeform_tags={
'EXAMPLE_KEY_GZsof': 'EXAMPLE_VALUE_YMCpcZkeh4xDEL8GficA'},
defined_tags={
'EXAMPLE_KEY_HARJh': {
'EXAMPLE_KEY_Wrkcg': 'EXAMPLE--Value'}}),
if_match="EXAMPLE-ifMatch-Value",
opc_request_id="SL2TLA1LTTSXSWVH6YIV<unique_ID>")
# Get the data from response
print(update_digital_twin_adapter_response.data)