Interface GenerativeAiSandbox

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    GenerativeAiSandboxClient

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

    This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user.

    • 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 service.
      • 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

        CancelSandboxCommandResponse cancelSandboxCommand​(CancelSandboxCommandRequest request)
        Requests cancellation of a running sandbox command.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/CancelSandboxCommandExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use CancelSandboxCommand API.

      • createSandbox

        CreateSandboxResponse createSandbox​(CreateSandboxRequest request)
        Creates a sandbox resource and returns its initial state.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/CreateSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use CreateSandbox API.

      • createSandboxSnapshot

        CreateSandboxSnapshotResponse createSandboxSnapshot​(CreateSandboxSnapshotRequest request)
        Creates a sandbox snapshot resource and returns its initial state.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/CreateSandboxSnapshotExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use CreateSandboxSnapshot API.

      • deleteSandbox

        DeleteSandboxResponse deleteSandbox​(DeleteSandboxRequest request)
        Deletes a sandbox.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/DeleteSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use DeleteSandbox API.

      • deleteSandboxSnapshot

        DeleteSandboxSnapshotResponse deleteSandboxSnapshot​(DeleteSandboxSnapshotRequest request)
        Deletes a sandbox snapshot.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/DeleteSandboxSnapshotExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use DeleteSandboxSnapshot API.

      • extendSandbox

        ExtendSandboxResponse extendSandbox​(ExtendSandboxRequest request)
        Extends the duration of a sandbox.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/ExtendSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ExtendSandbox API.

      • getSandbox

        GetSandboxResponse getSandbox​(GetSandboxRequest request)
        Gets information about a sandbox.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/GetSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use GetSandbox API.

      • getSandboxCommand

        GetSandboxCommandResponse getSandboxCommand​(GetSandboxCommandRequest request)
        Gets command metadata for a sandbox command.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/GetSandboxCommandExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use GetSandboxCommand API.

      • getSandboxCommandOutput

        GetSandboxCommandOutputResponse getSandboxCommandOutput​(GetSandboxCommandOutputRequest request)
        Gets captured output for a sandbox command starting from the requested event sequence.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/GetSandboxCommandOutputExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use GetSandboxCommandOutput API.

      • getSandboxSnapshot

        GetSandboxSnapshotResponse getSandboxSnapshot​(GetSandboxSnapshotRequest request)
        Gets information about a sandbox snapshot.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/GetSandboxSnapshotExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use GetSandboxSnapshot API.

      • listSandboxCommand

        ListSandboxCommandResponse listSandboxCommand​(ListSandboxCommandRequest request)
        Lists sandbox commands for a sandbox with optional pagination.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/ListSandboxCommandExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ListSandboxCommand API.

      • listSandboxSnapshots

        ListSandboxSnapshotsResponse listSandboxSnapshots​(ListSandboxSnapshotsRequest request)
        Lists sandbox snapshot resources with optional filtering and pagination.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/ListSandboxSnapshotsExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ListSandboxSnapshots API.

      • listSandboxes

        ListSandboxesResponse listSandboxes​(ListSandboxesRequest request)
        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
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/ListSandboxesExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ListSandboxes API.

      • readSandboxFile

        ReadSandboxFileResponse readSandboxFile​(ReadSandboxFileRequest request)
        Reads a file from a sandbox.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/ReadSandboxFileExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ReadSandboxFile API.

      • resumeSandbox

        ResumeSandboxResponse resumeSandbox​(ResumeSandboxRequest request)
        Resumes a suspended sandbox by scaling its backing runtime back to one replica.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/ResumeSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ResumeSandbox API.

      • runSandboxCommand

        RunSandboxCommandResponse runSandboxCommand​(RunSandboxCommandRequest request)
        Runs a command in a sandbox and returns the command identifier immediately.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/RunSandboxCommandExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use RunSandboxCommand API.

      • runSandboxCommandAndStream

        RunSandboxCommandAndStreamResponse runSandboxCommandAndStream​(RunSandboxCommandAndStreamRequest request)
        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
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/RunSandboxCommandAndStreamExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use RunSandboxCommandAndStream API.

      • runSandboxCommandAndWait

        RunSandboxCommandAndWaitResponse runSandboxCommandAndWait​(RunSandboxCommandAndWaitRequest request)
        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
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/RunSandboxCommandAndWaitExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use RunSandboxCommandAndWait API.

      • stopSandbox

        StopSandboxResponse stopSandbox​(StopSandboxRequest request)
        Stops a running sandbox.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/StopSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use StopSandbox API.

      • streamSandboxCommandEvents

        StreamSandboxCommandEventsResponse streamSandboxCommandEvents​(StreamSandboxCommandEventsRequest request)
        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
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/StreamSandboxCommandEventsExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use StreamSandboxCommandEvents API.

      • suspendSandbox

        SuspendSandboxResponse suspendSandbox​(SuspendSandboxRequest request)
        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
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/SuspendSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use SuspendSandbox API.

      • updateSandbox

        UpdateSandboxResponse updateSandbox​(UpdateSandboxRequest request)
        Updates a sandbox.
        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/UpdateSandboxExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use UpdateSandbox API.

      • writeSandboxFile

        WriteSandboxFileResponse writeSandboxFile​(WriteSandboxFileRequest request)
        Writes a file in a sandbox and returns the resulting file resource.

        Note: This operation consumes a stream.

        If the stream supports InputStream.mark(int) and InputStream.reset(), when a retry is necessary, the stream is reset so it starts at the beginning (or whatever the stream's position was at the time this operation is called}.

        Note this means that if the caller has used InputStream.mark(int) before, then the mark will not be the same anymore after this operation, and a subsequent call to InputStream.reset() by the caller will reset the stream not to the caller's mark, but to the position the stream was in when this operation was called.

        If the stream is a FileInputStream, and the stream's FileChannel position can be changed (like for a regular file), the stream will be wrapped in such a way that it does provide support for InputStream.mark(int) and InputStream.reset(). Then the same procedure as above is followed. If the stream's FileChannel position cannot be changed (like for a named pipe), then the stream's contents will be buffered in memory, as described below.

        If the stream does not support InputStream.mark(int) and InputStream.reset(), then the stream is wrapped in a BufferedInputStream, which means the entire contents may be buffered in memory. Then the same procedure as above is followed.

        The contents of the stream, except when the stream is a FileInputStream whose FileChannel position can be changed, should be less than 2 GiB in size if retries are used. This is because streams 2 GiB in size or larger do no guarantee that mark-and-reset can be performed. If the stream is larger, do not use built-in retries and manage retries yourself.

        Parameters:
        request - The request object containing the details to send
        Returns:
        A response object containing details about the completed operation
        Throws:
        BmcException - when an error occurs. This operation uses RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is provided. The specifics of the default retry strategy are described here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries

        Example: Click <a href=“https://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/3.99.0/generativeaisandbox/WriteSandboxFileExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use WriteSandboxFile API.

      • getWaiters

        GenerativeAiSandboxWaiters getWaiters()
        Gets the pre-configured waiters available for resources for this service.
        Returns:
        The service waiters.
      • getPaginators

        GenerativeAiSandboxPaginators getPaginators()
        Gets the pre-configured paginators available for list operations in this service which may return multiple pages of data.

        These paginators provide an Iterable interface so that service responses, or resources/records, can be iterated through without having to manually deal with pagination and page tokens.

        Returns:
        The service paginators.