Interface GenerativeAiSandboxAsync

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    GenerativeAiSandboxAsyncClient

    @Generated(value="OracleSDKGenerator",
               comments="API Version: 1.0")
    public interface GenerativeAiSandboxAsync
    extends AutoCloseable
    API for managing sandbox resources and exchanging sandbox access tokens.
    • Method Detail

      • refreshClient

        void refreshClient()
        Rebuilds the client from scratch.

        Useful to refresh certificates.

      • setEndpoint

        void setEndpoint​(String endpoint)
        Sets the endpoint to call (ex, https://www.example.com).
        Parameters:
        endpoint - The endpoint of the serice.
      • getEndpoint

        String getEndpoint()
        Gets the set endpoint for REST call (ex, https://www.example.com)
      • setRegion

        void setRegion​(Region region)
        Sets the region to call (ex, Region.US_PHOENIX_1).

        Note, this will call setEndpoint after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised.

        Parameters:
        region - The region of the service.
      • setRegion

        void setRegion​(String regionId)
        Sets the region to call (ex, ‘us-phoenix-1’).

        Note, this will first try to map the region ID to a known Region and call setRegion.

        If no known Region could be determined, it will create an endpoint based on the default endpoint format (Region.formatDefaultRegionEndpoint(Service, String) and then call setEndpoint.

        Parameters:
        regionId - The public region ID.
      • useRealmSpecificEndpointTemplate

        void useRealmSpecificEndpointTemplate​(boolean realmSpecificEndpointTemplateEnabled)
        Determines whether realm specific endpoint should be used or not.

        Set realmSpecificEndpointTemplateEnabled to “true” if the user wants to enable use of realm specific endpoint template, otherwise set it to “false”

        Parameters:
        realmSpecificEndpointTemplateEnabled - flag to enable the use of realm specific endpoint template
      • cancelSandboxCommand

        Future<CancelSandboxCommandResponse> cancelSandboxCommand​(CancelSandboxCommandRequest request,
                                                                  AsyncHandler<CancelSandboxCommandRequest,​CancelSandboxCommandResponse> handler)
        Requests cancellation of a running sandbox command.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • createSandbox

        Future<CreateSandboxResponse> createSandbox​(CreateSandboxRequest request,
                                                    AsyncHandler<CreateSandboxRequest,​CreateSandboxResponse> handler)
        Creates a sandbox resource and returns its initial state.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • createSandboxSnapshot

        Future<CreateSandboxSnapshotResponse> createSandboxSnapshot​(CreateSandboxSnapshotRequest request,
                                                                    AsyncHandler<CreateSandboxSnapshotRequest,​CreateSandboxSnapshotResponse> handler)
        Creates a sandbox snapshot resource and returns its initial state.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • deleteSandbox

        Future<DeleteSandboxResponse> deleteSandbox​(DeleteSandboxRequest request,
                                                    AsyncHandler<DeleteSandboxRequest,​DeleteSandboxResponse> handler)
        Deletes a sandbox.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • deleteSandboxSnapshot

        Future<DeleteSandboxSnapshotResponse> deleteSandboxSnapshot​(DeleteSandboxSnapshotRequest request,
                                                                    AsyncHandler<DeleteSandboxSnapshotRequest,​DeleteSandboxSnapshotResponse> handler)
        Deletes a sandbox snapshot.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • extendSandbox

        Future<ExtendSandboxResponse> extendSandbox​(ExtendSandboxRequest request,
                                                    AsyncHandler<ExtendSandboxRequest,​ExtendSandboxResponse> handler)
        Extends the duration of a sandbox.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getSandbox

        Future<GetSandboxResponse> getSandbox​(GetSandboxRequest request,
                                              AsyncHandler<GetSandboxRequest,​GetSandboxResponse> handler)
        Gets information about a sandbox.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getSandboxCommand

        Future<GetSandboxCommandResponse> getSandboxCommand​(GetSandboxCommandRequest request,
                                                            AsyncHandler<GetSandboxCommandRequest,​GetSandboxCommandResponse> handler)
        Gets command metadata for a sandbox command.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getSandboxCommandOutput

        Future<GetSandboxCommandOutputResponse> getSandboxCommandOutput​(GetSandboxCommandOutputRequest request,
                                                                        AsyncHandler<GetSandboxCommandOutputRequest,​GetSandboxCommandOutputResponse> handler)
        Gets captured output for a sandbox command starting from the requested event sequence.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getSandboxSnapshot

        Future<GetSandboxSnapshotResponse> getSandboxSnapshot​(GetSandboxSnapshotRequest request,
                                                              AsyncHandler<GetSandboxSnapshotRequest,​GetSandboxSnapshotResponse> handler)
        Gets information about a sandbox snapshot.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listSandboxCommand

        Future<ListSandboxCommandResponse> listSandboxCommand​(ListSandboxCommandRequest request,
                                                              AsyncHandler<ListSandboxCommandRequest,​ListSandboxCommandResponse> handler)
        Lists sandbox commands for a sandbox with optional pagination.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listSandboxSnapshots

        Future<ListSandboxSnapshotsResponse> listSandboxSnapshots​(ListSandboxSnapshotsRequest request,
                                                                  AsyncHandler<ListSandboxSnapshotsRequest,​ListSandboxSnapshotsResponse> handler)
        Lists sandbox snapshot resources with optional filtering and pagination.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listSandboxes

        Future<ListSandboxesResponse> listSandboxes​(ListSandboxesRequest request,
                                                    AsyncHandler<ListSandboxesRequest,​ListSandboxesResponse> handler)
        Lists sandbox resources with optional filtering and pagination.

        Specify exactly one of projectId or compartmentId. A compartment-scoped request returns sandboxes from Generative AI projects directly contained in that compartment; child compartments are not included.

        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • readSandboxFile

        Future<ReadSandboxFileResponse> readSandboxFile​(ReadSandboxFileRequest request,
                                                        AsyncHandler<ReadSandboxFileRequest,​ReadSandboxFileResponse> handler)
        Reads a file from a sandbox.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • resumeSandbox

        Future<ResumeSandboxResponse> resumeSandbox​(ResumeSandboxRequest request,
                                                    AsyncHandler<ResumeSandboxRequest,​ResumeSandboxResponse> handler)
        Resumes a suspended sandbox by scaling its backing runtime back to one replica.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • runSandboxCommand

        Future<RunSandboxCommandResponse> runSandboxCommand​(RunSandboxCommandRequest request,
                                                            AsyncHandler<RunSandboxCommandRequest,​RunSandboxCommandResponse> handler)
        Runs a command in a sandbox and returns the command identifier immediately.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • runSandboxCommandAndStream

        Future<RunSandboxCommandAndStreamResponse> runSandboxCommandAndStream​(RunSandboxCommandAndStreamRequest request,
                                                                              AsyncHandler<RunSandboxCommandAndStreamRequest,​RunSandboxCommandAndStreamResponse> handler)
        Runs a command in a sandbox and streams command events as newline-delimited JSON.

        Each line is a serialized SandboxCommandEvent.

        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • runSandboxCommandAndWait

        Future<RunSandboxCommandAndWaitResponse> runSandboxCommandAndWait​(RunSandboxCommandAndWaitRequest request,
                                                                          AsyncHandler<RunSandboxCommandAndWaitRequest,​RunSandboxCommandAndWaitResponse> handler)
        Runs a command in a sandbox, blocks until command execution finishes, and returns the final command metadata.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • stopSandbox

        Future<StopSandboxResponse> stopSandbox​(StopSandboxRequest request,
                                                AsyncHandler<StopSandboxRequest,​StopSandboxResponse> handler)
        Stops a running sandbox.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • streamSandboxCommandEvents

        Future<StreamSandboxCommandEventsResponse> streamSandboxCommandEvents​(StreamSandboxCommandEventsRequest request,
                                                                              AsyncHandler<StreamSandboxCommandEventsRequest,​StreamSandboxCommandEventsResponse> handler)
        Streams command events for an existing sandbox command from fromSeq through untilSeq using Server-Sent Events.

        Each SSE data field contains a serialized SandboxCommandEvent.

        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • suspendSandbox

        Future<SuspendSandboxResponse> suspendSandbox​(SuspendSandboxRequest request,
                                                      AsyncHandler<SuspendSandboxRequest,​SuspendSandboxResponse> handler)
        Suspends a running sandbox by scaling its backing runtime to zero replicas while retaining the workspace block volume.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • updateSandbox

        Future<UpdateSandboxResponse> updateSandbox​(UpdateSandboxRequest request,
                                                    AsyncHandler<UpdateSandboxRequest,​UpdateSandboxResponse> handler)
        Updates a sandbox.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • writeSandboxFile

        Future<WriteSandboxFileResponse> writeSandboxFile​(WriteSandboxFileRequest request,
                                                          AsyncHandler<WriteSandboxFileRequest,​WriteSandboxFileResponse> handler)
        Writes a file in a sandbox and returns the resulting file resource.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.