# 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
batch_client = oci.batch.BatchComputingClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
create_batch_context_response = batch_client.create_batch_context(
    create_batch_context_details=oci.batch.models.CreateBatchContextDetails(
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        network=oci.batch.models.CreateNetworkDetails(
            subnet_id="ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
            nsg_ids=["EXAMPLE--Value"]),
        fleets=[
            oci.batch.models.CreateServiceManagedGpuFleetDetails(
                type="SERVICE_MANAGED_GPU_FLEET",
                name="EXAMPLE-name-Value",
                shape=oci.batch.models.CreateFixedGpuFleetShapeDetails(
                    type="FIXED_GPU_FLEET_SHAPE",
                    shape_name="EXAMPLE-shapeName-Value",
                    disk_size_in_gbs=610),
                max_concurrent_tasks=456)],
        display_name="EXAMPLE-displayName-Value",
        description="EXAMPLE-description-Value",
        freeform_tags={
            'EXAMPLE_KEY_KL08H': 'EXAMPLE_VALUE_4Y6bzit1r6zBPlrQgSTA'},
        defined_tags={
            'EXAMPLE_KEY_2bc1k': {
                'EXAMPLE_KEY_vKOqN': 'EXAMPLE--Value'}},
        job_priority_configurations=[
            oci.batch.models.JobPriorityConfiguration(
                tag_namespace="EXAMPLE-tagNamespace-Value",
                tag_key="EXAMPLE-tagKey-Value",
                weight=-35,
                values={
                    'EXAMPLE_KEY_P4wDF': 1680012640})],
        entitlements={
            'EXAMPLE_KEY_qTxUW': -211094204},
        logging_configuration=oci.batch.models.OciLoggingConfiguration(
            type="OCI_LOGGING",
            log_group_id="ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
            log_id="ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",
            is_job_task_events_propagation_enabled=False)),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="EOAKRLSUDEVEIEXX7PNZ<unique_ID>")

# Get the data from response
print(create_batch_context_response.data)