# 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
gdp_client = OCI::Gdp::GuardedDataPipelineClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
create_gdp_pipeline_response =
gdp_client.create_gdp_pipeline(
OCI::Gdp::Models::CreateGdpPipelineDetails.new(
compartment_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
display_name: 'EXAMPLE-displayName-Value',
pipeline_type: 'SENDER',
bucket_details: [
OCI::Gdp::Models::BucketDetailsDefinition.new(
bucket_type: 'REJECT',
namespace: 'EXAMPLE-namespace-Value',
name: 'EXAMPLE-name-Value',
id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value'
)
],
peering_region: 'EXAMPLE-peeringRegion-Value',
description: 'EXAMPLE-description-Value',
service_log_group_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-serviceLogGroupId-Value',
file_types: %w[EXAMPLE--Value],
authorization_details: 'EXAMPLE-authorizationDetails-Value',
is_file_override_in_destination_enabled: true,
is_scanning_enabled: false,
is_chunking_enabled: false,
is_approval_needed: false,
approval_key_vault_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-approvalKeyVaultId-Value',
freeform_tags: {
'EXAMPLE_KEY_4Ru32' => 'EXAMPLE_VALUE_LRC9uk2HDvJQxbDYxopi'
},
defined_tags: {
'EXAMPLE_KEY_I7AP0' => { 'EXAMPLE_KEY_pysYh' => 'EXAMPLE--Value' }
}
)
)
# Get the data from response
puts "#{create_gdp_pipeline_response.headers}"