Using the Command Line Interface (CLI)

Use the CLI to manage private endpoints and work requests.

For information about using the CLI, see Command Line Interface (CLI). For a complete list of flags and options available for CLI commands, see the Command Line Reference.

Topics:

For Private Endpoints

To create a private endpoint

Open a command prompt and run oci dbtools private-endpoint create to create a new private endpoint for use with Database Tools connections:

Note

The endpoint service ID is required to create new private endpoints and can be located using oci dbtools endpoint-service list -c <target_compartment_id>.
oci dbtools private-endpoint create -c <target_compartment_ocid> --endpoint-service-id <endpoint_service_ocid> --subnet-id <target_subnet_ocid> --display-name <private_endpoint_name>

For example:

oci dbtools private-endpoint create -c ocid1.compartment.oc1..example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz --endpoint-service-id ocid1.databasetoolsendpointservice.oc1..example1service25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz --subnet-id ocid1.subnet.oc1.phx.example1subnet123456789abcdefgbghqgmuz2zzum45ibplooqtabwk3zz --display-name example-pe-1

To list private endpoints

Open a command prompt and run oci dbtools private-endpoint list to view the details of all private endpoints within a specified compartment:

oci dbtools private-endpoint list -c <target_compartment_ocid>

For example:

oci dbtools private-endpoint list -c ocid1.compartment.oc1..example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz

To get a specific private endpoint

Open a command prompt and run oci dbtools private-endpoint get to view the details of a specified private endpoint:

oci dbtools private-endpoint get --private-endpoint-id <private_endpoint_ocid>

For example:

oci dbtools private-endpoint get --private-endpoint-id ocid1.databasetoolsprivateendpoint.oc1.phx.example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz

To update a private endpoint

Open a command prompt and run oci dbtools private-endpoint update to update the details of a specified private endpoint:

oci dbtools private-endpoint update --private-endpoint-id <private_endpoint_ocid> --<property_to_update> <new_value>

For example:

oci dbtools private-endpoint update --private-endpoint-id ocid1.databasetoolsprivateendpoint.oc1.phx.example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz --display-name some-new-name

To delete a private endpoint

Open a command prompt and run oci dbtools private-endpoint delete to delete the specified private endpoint:

oci dbtools private-endpoint delete --private-endpoint-id <private_endpoint_ocid>

For example:

oci dbtools private-endpoint delete --private-endpoint-id ocid1.databasetoolsprivateendpoint.oc1.phx.example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz

For Work Requests

To get the status of a work request

Open a command prompt and run oci dbtools work-request get to check the status of a work request:

Note

Some commands for Database Tools start an asynchronous work request and return a work request ID. Work requests can be inspected by looking up the details by work request ID.
oci dbtools work-request get --work-request-id <work_request_ocid>

For example:

oci dbtools work-request get --work-request-id ocid1.databasetoolsworkrequest.oc1.phx.example1request25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz

To list work requests by compartment

Open a command prompt and run oci dbtools work-request list to list the work requests associated with a specified compartment:

oci dbtools work-request list -c <compartment_ocid>

For example:

oci dbtools work-request list -c ocid1.compartment.oc1..example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz