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

require 'date'
require '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::ConfigFileLoader.load_config

# Initialize service client with default config file
data_integration_client =
  OCI::DataIntegration::DataIntegrationClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
update_application_response =
  data_integration_client.update_application(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value',
    'EXAMPLE-applicationKey-Value',
    OCI::DataIntegration::Models::UpdateApplicationDetails.new(
      key: 'EXAMPLE-key-Value',
      model_type: 'EXAMPLE-modelType-Value',
      object_version: 830,
      model_version: 'EXAMPLE-modelVersion-Value',
      name: 'EXAMPLE-name-Value',
      description: 'EXAMPLE-description-Value',
      application_version: 694,
      object_status: 489,
      identifier: 'EXAMPLE-identifier-Value',
      parent_ref:
        OCI::DataIntegration::Models::ParentReference.new(
          parent: 'EXAMPLE-parent-Value',
          root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
        ),
      metadata:
        OCI::DataIntegration::Models::ObjectMetadata.new(
          created_by: 'EXAMPLE-createdBy-Value',
          created_by_name: 'EXAMPLE-createdByName-Value',
          updated_by: 'EXAMPLE-updatedBy-Value',
          updated_by_name: 'EXAMPLE-updatedByName-Value',
          time_created: DateTime.parse('2020-03-15T19:05:39.362Z'),
          time_updated: DateTime.parse('2045-03-13T17:29:59.371Z'),
          aggregator_key: 'EXAMPLE-aggregatorKey-Value',
          aggregator:
            OCI::DataIntegration::Models::AggregatorSummary.new(
              type: 'EXAMPLE-type-Value',
              key: 'EXAMPLE-key-Value',
              name: 'EXAMPLE-name-Value',
              identifier: 'EXAMPLE-identifier-Value',
              description: 'EXAMPLE-description-Value'
            ),
          identifier_path: 'EXAMPLE-identifierPath-Value',
          info_fields: {
            'EXAMPLE_KEY_rDy4n' => 'EXAMPLE_VALUE_xRtXAZZSQ36PR2EB3JGA'
          },
          registry_version: 588,
          labels: %w[EXAMPLE--Value],
          is_favorite: true,
          count_statistics:
            OCI::DataIntegration::Models::CountStatistic.new(
              object_type_count_list: [
                OCI::DataIntegration::Models::CountStatisticSummary.new(
                  object_type: 'APPLICATION', object_count: 640
                )
              ]
            )
        ),
      display_name: 'EXAMPLE-displayName-Value',
      freeform_tags: {
        'EXAMPLE_KEY_zQuPX' => 'EXAMPLE_VALUE_RJAPJdGya1eNOVPffWlY'
      },
      defined_tags: {
        'EXAMPLE_KEY_PNqrM' => { 'EXAMPLE_KEY_mXvC5' => 'EXAMPLE--Value' }
      },
      lifecycle_state: 'ACTIVE'
    )
  )

# Get the data from response
puts "#{update_application_response.data}"

Was this article helpful?