# 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 '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
dif_client = OCI::Dif::StackClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
deploy_artifacts_response =
dif_client.deploy_artifacts(
'ocid1.test.oc1..<unique_ID>EXAMPLE-stackId-Value',
OCI::Dif::Models::DeployArtifactsDetails.new(
stack_templates: %w[DATATRANSFORMATION],
services: %w[GGCS],
subnet_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value',
adb: [
OCI::Dif::Models::AdbArtifactsDetail.new(
instance_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-instanceId-Value',
artifact_object_storage_path:
'EXAMPLE-artifactObjectStoragePath-Value',
db_credentials: [
OCI::Dif::Models::DbCredentialsDetail.new(
user_name: 'EXAMPLE-userName-Value',
secret_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value',
user_type: 'EXAMPLE-userType-Value'
)
]
)
],
ggcs: [
OCI::Dif::Models::GgcsArtifactsDetail.new(
instance_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-instanceId-Value',
artifact_object_storage_path:
'EXAMPLE-artifactObjectStoragePath-Value',
users: [
OCI::Dif::Models::GgcsUserDetail.new(
user_name: 'EXAMPLE-userName-Value',
secret_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value',
user_type: 'EXAMPLE-userType-Value',
action: 'CREATE'
)
],
sources: [
OCI::Dif::Models::GgcsSourceDetail.new(
source_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-sourceId-Value',
action: 'CREATE',
should_start_source_operations: false,
target_uri: 'EXAMPLE-targetUri-Value',
target_connection_name: 'EXAMPLE-targetConnectionName-Value'
)
],
targets: [
OCI::Dif::Models::GgcsTargetDetail.new(
target_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-targetId-Value',
action: 'CREATE',
should_start_target_operations: false,
source_uri: 'EXAMPLE-sourceUri-Value',
source_connection_name: 'EXAMPLE-sourceConnectionName-Value'
)
]
)
],
dataflow: [
OCI::Dif::Models::DataflowArtifactsDetail.new(
instance_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-instanceId-Value',
execute: 'EXAMPLE-execute-Value',
archive_uri: 'EXAMPLE-archiveUri-Value'
)
],
omk: [
OCI::Dif::Models::OmkArtifactsDetail.new(
instance_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-instanceId-Value',
secrets: [
OCI::Dif::Models::SecretDetail.new(
secret_name: 'EXAMPLE-secretName-Value',
secret_data: [
OCI::Dif::Models::SecretData.new(
key: 'EXAMPLE-key-Value',
secret_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value'
)
],
template_object_storage_path:
'EXAMPLE-templateObjectStoragePath-Value'
)
],
manifest_object_storage_path:
'EXAMPLE-manifestObjectStoragePath-Value',
component_value_overrides: [
OCI::Dif::Models::ComponentValueOverride.new(
component_name: 'EXAMPLE-componentName-Value',
value_overrides: {
'EXAMPLE_KEY_OqR5d' => 'EXAMPLE_VALUE_9u3enoiGuDSWEwKAK3t8'
}
)
]
)
],
oke: [
OCI::Dif::Models::OkeArtifactsDetail.new(
instance_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-instanceId-Value',
secrets: [
OCI::Dif::Models::SecretDetail.new(
secret_name: 'EXAMPLE-secretName-Value',
secret_data: [
OCI::Dif::Models::SecretData.new(
key: 'EXAMPLE-key-Value',
secret_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value'
)
],
template_object_storage_path:
'EXAMPLE-templateObjectStoragePath-Value'
)
],
manifest_object_storage_path:
'EXAMPLE-manifestObjectStoragePath-Value',
component_value_overrides: [
OCI::Dif::Models::ComponentValueOverride.new(
component_name: 'EXAMPLE-componentName-Value',
value_overrides: {
'EXAMPLE_KEY_YQztW' => 'EXAMPLE_VALUE_fpbPgMX7bpQoTmnUjWli'
}
)
]
)
]
)
)
# Get the data from response
puts "#{deploy_artifacts_response.headers}"