# 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
data_science_client = oci.data_science.DataScienceClient(config)
# Send the request to service, some parameters are not required, see API
# doc for more info
create_compute_target_response = data_science_client.create_compute_target(
create_compute_target_details=oci.data_science.models.CreateComputeTargetDetails(
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
compute_configuration_details=oci.data_science.models.ManagedComputeClusterComputeConfigurationDetails(
compute_type="MANAGED_COMPUTE_CLUSTER",
instance_configuration=oci.data_science.models.ManagedComputeClusterInstanceConfigurationDetails(
instance_shape="EXAMPLE-instanceShape-Value",
boot_volume_size_in_gbs=4321,
instance_shape_details=oci.data_science.models.ManagedComputeClusterInstanceShapeDetails(
ocpus=337.85522,
memory_in_gbs=9658.503)),
scaling_policy=oci.data_science.models.ManagedComputeClusterFixedSizeScalingPolicy(
policy_type="FIXED_SIZE",
instance_count=382)),
display_name="EXAMPLE-displayName-Value",
description="EXAMPLE-description-Value",
metadata={
'EXAMPLE_KEY_F5ztC': 'EXAMPLE_VALUE_f7fM3z3fKHXpDWh61OPk'},
freeform_tags={
'EXAMPLE_KEY_vaXt7': 'EXAMPLE_VALUE_OVq0bdnhQXkHbkLS9uSm'},
defined_tags={
'EXAMPLE_KEY_zMTT4': {
'EXAMPLE_KEY_Wry2y': 'EXAMPLE--Value'}}),
opc_request_id="Q6HM5PHNT48UGIRB1DZH<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(create_compute_target_response.data)