Interface Vaults

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    VaultsClient

    @Generated(value="OracleSDKGenerator",
               comments="API Version: 20180608")
    public interface Vaults
    extends AutoCloseable
    Use the Secret Management API to manage secrets and secret versions.

    For more information, see Managing Secrets. 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
      • cancelSecretDeletion

        CancelSecretDeletionResponse cancelSecretDeletion​(CancelSecretDeletionRequest request)
        Cancels the pending deletion of the specified secret.

        Canceling a scheduled deletion restores the secret’s lifecycle state to what it was before you scheduled the secret for deletion.

        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 will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. 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.63.0/vault/CancelSecretDeletionExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use CancelSecretDeletion API.

      • cancelSecretRotation

        CancelSecretRotationResponse cancelSecretRotation​(CancelSecretRotationRequest request)
        Cancels the ongoing secret rotation.

        The cancellation is contingent on how far the rotation process has progressed. Upon cancelling a rotation, all future rotations are also disabled.

        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.63.0/vault/CancelSecretRotationExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use CancelSecretRotation API.

      • cancelSecretVersionDeletion

        CancelSecretVersionDeletionResponse cancelSecretVersionDeletion​(CancelSecretVersionDeletionRequest request)
        Cancels the scheduled deletion of a secret version.
        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 will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. 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.63.0/vault/CancelSecretVersionDeletionExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use CancelSecretVersionDeletion API.

      • changeSecretCompartment

        ChangeSecretCompartmentResponse changeSecretCompartment​(ChangeSecretCompartmentRequest request)
        Moves a secret into a different compartment within the same tenancy.

        For information about moving resources between compartments, see Moving Resources to a Different Compartment.

        When provided, if-match is checked against the ETag values of the secret.

        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 will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. 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.63.0/vault/ChangeSecretCompartmentExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ChangeSecretCompartment API.

      • createSecret

        CreateSecretResponse createSecret​(CreateSecretRequest request)
        Creates a new secret according to the details of the request.

        This operation is not supported by the Oracle Cloud Infrastructure Terraform Provider.

        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.63.0/vault/CreateSecretExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use CreateSecret API.

      • getSecret

        GetSecretResponse getSecret​(GetSecretRequest request)
        Gets information about the specified secret.
        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.63.0/vault/GetSecretExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use GetSecret API.

      • getSecretVersion

        GetSecretVersionResponse getSecretVersion​(GetSecretVersionRequest request)
        Gets information about the specified version of a secret.
        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.63.0/vault/GetSecretVersionExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use GetSecretVersion API.

      • listSecretVersions

        ListSecretVersionsResponse listSecretVersions​(ListSecretVersionsRequest request)
        Lists all secret versions for the specified secret.
        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.63.0/vault/ListSecretVersionsExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ListSecretVersions API.

      • listSecrets

        ListSecretsResponse listSecrets​(ListSecretsRequest request)
        Lists all secrets in the specified vault and compartment.
        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.63.0/vault/ListSecretsExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ListSecrets API.

      • rotateSecret

        RotateSecretResponse rotateSecret​(RotateSecretRequest request)
        API to force rotation of an existing secret in Vault and the specified target system; expects secret to have a valid Target System Details object
        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.63.0/vault/RotateSecretExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use RotateSecret API.

      • scheduleSecretDeletion

        ScheduleSecretDeletionResponse scheduleSecretDeletion​(ScheduleSecretDeletionRequest request)
        Schedules the deletion of the specified secret.

        This sets the lifecycle state of the secret to PENDING_DELETION and then deletes it after the specified retention period ends.

        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 will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. 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.63.0/vault/ScheduleSecretDeletionExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ScheduleSecretDeletion API.

      • scheduleSecretVersionDeletion

        ScheduleSecretVersionDeletionResponse scheduleSecretVersionDeletion​(ScheduleSecretVersionDeletionRequest request)
        Schedules the deletion of the specified secret version.

        This deletes it after the specified retention period ends. You can only delete a secret version if the secret version rotation state is marked as DEPRECATED.

        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 will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. 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.63.0/vault/ScheduleSecretVersionDeletionExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use ScheduleSecretVersionDeletion API.

      • updateSecret

        UpdateSecretResponse updateSecret​(UpdateSecretRequest request)
        Updates the properties of a secret.

        Specifically, you can update the version number of the secret to make that version number the current version. You can also update a secret’s description, its free-form or defined tags, rules and the secret contents. Updating the secret content automatically creates a new secret version. You cannot, however, update the current secret version number, secret contents, and secret rules at the same time. Furthermore, the secret must in an ACTIVE lifecycle state to be updated.

        This operation is not supported by the Oracle Cloud Infrastructure Terraform Provider.

        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 will not retry by default, users can also use RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION provided by the SDK to enable retries for it. 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.63.0/vault/UpdateSecretExample.java.html"target=”_blank"rel=“noopener noreferrer”>here to see how to use UpdateSecret API.

      • getWaiters

        @Deprecated
        VaultsWaiters getWaiters()
        Deprecated.
        use newWaiters(WorkRequest) instead. Otherwise, a default one will be provided that does not support operations that rely on the WorkRequestClient for polling. An IllegalStateException will be thrown for such operations.
        Gets the pre-configured waiters available for resources for this service.
        Returns:
        The service waiters.
      • newWaiters

        VaultsWaiters newWaiters​(WorkRequest workRequestClient)
        Creates a new VaultsWaiters for resources for this service.
        Parameters:
        workRequestClient - The work request service client used to query for work request status
        Returns:
        The service waiters.
      • getPaginators

        VaultsPaginators 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.