Interface OptimizerAsync

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    OptimizerAsyncClient

    @Generated(value="OracleSDKGenerator",
               comments="API Version: 20200606")
    public interface OptimizerAsync
    extends AutoCloseable
    Use the Cloud Advisor API to find potential inefficiencies in your tenancy and address them.

    Cloud Advisor can help you save money, improve performance, strengthen system resilience, and improve security. For more information, see Cloud Advisor.

    • 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
      • createProfile

        Future<CreateProfileResponse> createProfile​(CreateProfileRequest request,
                                                    AsyncHandler<CreateProfileRequest,​CreateProfileResponse> handler)
        Creates a new profile.
        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.
      • deleteProfile

        Future<DeleteProfileResponse> deleteProfile​(DeleteProfileRequest request,
                                                    AsyncHandler<DeleteProfileRequest,​DeleteProfileResponse> handler)
        Deletes the specified profile.

        Uses the profile’s OCID to determine which profile to delete.

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

        Future<FilterResourceActionsResponse> filterResourceActions​(FilterResourceActionsRequest request,
                                                                    AsyncHandler<FilterResourceActionsRequest,​FilterResourceActionsResponse> handler)
        Queries the Cloud Advisor resource actions that are supported.
        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.
      • getCategory

        Future<GetCategoryResponse> getCategory​(GetCategoryRequest request,
                                                AsyncHandler<GetCategoryRequest,​GetCategoryResponse> handler)
        Gets the category that corresponds to the specified OCID.
        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.
      • getEnrollmentStatus

        Future<GetEnrollmentStatusResponse> getEnrollmentStatus​(GetEnrollmentStatusRequest request,
                                                                AsyncHandler<GetEnrollmentStatusRequest,​GetEnrollmentStatusResponse> handler)
        Gets the Cloud Advisor enrollment status.
        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.
      • getProfile

        Future<GetProfileResponse> getProfile​(GetProfileRequest request,
                                              AsyncHandler<GetProfileRequest,​GetProfileResponse> handler)
        Gets the specified profile’s information.

        Uses the profile’s OCID to determine which profile to retrieve.

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

        Future<GetRecommendationResponse> getRecommendation​(GetRecommendationRequest request,
                                                            AsyncHandler<GetRecommendationRequest,​GetRecommendationResponse> handler)
        Gets the recommendation for the specified OCID.
        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.
      • getResourceAction

        Future<GetResourceActionResponse> getResourceAction​(GetResourceActionRequest request,
                                                            AsyncHandler<GetResourceActionRequest,​GetResourceActionResponse> handler)
        Gets the resource action that corresponds to the specified OCID.
        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.
      • getWorkRequest

        Future<GetWorkRequestResponse> getWorkRequest​(GetWorkRequestRequest request,
                                                      AsyncHandler<GetWorkRequestRequest,​GetWorkRequestResponse> handler)
        Gets the status of the work request associated with the specified ID.
        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.
      • listCategories

        Future<ListCategoriesResponse> listCategories​(ListCategoriesRequest request,
                                                      AsyncHandler<ListCategoriesRequest,​ListCategoriesResponse> handler)
        Lists the supported Cloud Advisor categories.
        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.
      • listEnrollmentStatuses

        Future<ListEnrollmentStatusesResponse> listEnrollmentStatuses​(ListEnrollmentStatusesRequest request,
                                                                      AsyncHandler<ListEnrollmentStatusesRequest,​ListEnrollmentStatusesResponse> handler)
        Lists the Cloud Advisor enrollment statuses.
        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.
      • listHistories

        Future<ListHistoriesResponse> listHistories​(ListHistoriesRequest request,
                                                    AsyncHandler<ListHistoriesRequest,​ListHistoriesResponse> handler)
        Lists changes to the recommendations based on user activity.

        For example, lists when recommendations have been implemented, dismissed, postponed, or reactivated.

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

        Future<ListProfileLevelsResponse> listProfileLevels​(ListProfileLevelsRequest request,
                                                            AsyncHandler<ListProfileLevelsRequest,​ListProfileLevelsResponse> handler)
        Lists the existing profile levels.
        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.
      • listProfiles

        Future<ListProfilesResponse> listProfiles​(ListProfilesRequest request,
                                                  AsyncHandler<ListProfilesRequest,​ListProfilesResponse> handler)
        Lists the existing profiles.
        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.
      • listRecommendations

        Future<ListRecommendationsResponse> listRecommendations​(ListRecommendationsRequest request,
                                                                AsyncHandler<ListRecommendationsRequest,​ListRecommendationsResponse> handler)
        Lists the Cloud Advisor recommendations that are currently supported.
        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.
      • listResourceActions

        Future<ListResourceActionsResponse> listResourceActions​(ListResourceActionsRequest request,
                                                                AsyncHandler<ListResourceActionsRequest,​ListResourceActionsResponse> handler)
        Lists the Cloud Advisor resource actions that are supported.
        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.
      • listWorkRequestErrors

        Future<ListWorkRequestErrorsResponse> listWorkRequestErrors​(ListWorkRequestErrorsRequest request,
                                                                    AsyncHandler<ListWorkRequestErrorsRequest,​ListWorkRequestErrorsResponse> handler)
        Lists errors associated with the specified work request.
        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.
      • listWorkRequestLogs

        Future<ListWorkRequestLogsResponse> listWorkRequestLogs​(ListWorkRequestLogsRequest request,
                                                                AsyncHandler<ListWorkRequestLogsRequest,​ListWorkRequestLogsResponse> handler)
        Lists the logs associated with the specified work request.
        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.
      • listWorkRequests

        Future<ListWorkRequestsResponse> listWorkRequests​(ListWorkRequestsRequest request,
                                                          AsyncHandler<ListWorkRequestsRequest,​ListWorkRequestsResponse> handler)
        Lists the work requests in the tenancy.

        The tenancy is the root compartment.

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

        Future<UpdateEnrollmentStatusResponse> updateEnrollmentStatus​(UpdateEnrollmentStatusRequest request,
                                                                      AsyncHandler<UpdateEnrollmentStatusRequest,​UpdateEnrollmentStatusResponse> handler)
        Updates the enrollment status of the tenancy.
        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.
      • updateProfile

        Future<UpdateProfileResponse> updateProfile​(UpdateProfileRequest request,
                                                    AsyncHandler<UpdateProfileRequest,​UpdateProfileResponse> handler)
        Updates the specified profile.

        Uses the profile’s OCID to determine which profile to update.

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

        Future<UpdateRecommendationResponse> updateRecommendation​(UpdateRecommendationRequest request,
                                                                  AsyncHandler<UpdateRecommendationRequest,​UpdateRecommendationResponse> handler)
        Updates the recommendation that corresponds to the specified OCID.

        Use this operation to implement the following actions:

        Postpone recommendation * Dismiss recommendation * Reactivate recommendation

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

        Future<UpdateResourceActionResponse> updateResourceAction​(UpdateResourceActionRequest request,
                                                                  AsyncHandler<UpdateResourceActionRequest,​UpdateResourceActionResponse> handler)
        Updates the resource action that corresponds to the specified OCID.

        Use this operation to implement the following actions:

        Postpone resource action * Ignore resource action * Reactivate resource action

        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.