Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OptimizerClient

This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.

Hierarchy

  • OptimizerClient

Constructors

constructor

  • new OptimizerClient(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration): OptimizerClient

Properties

Protected _bodyDuplexMode

_bodyDuplexMode: any = undefined

Protected _circuitBreaker

_circuitBreaker: typeof Breaker | null = null

Protected _clientConfiguration

_clientConfiguration: ClientConfiguration

Protected _defaultHeaders

_defaultHeaders: any

Protected _endpoint

_endpoint: string = ""

Protected _httpClient

_httpClient: HttpClient

Protected _httpOptions

_httpOptions: any = undefined

Protected _lastSetRegionOrRegionId

_lastSetRegionOrRegionId: string = ""

Protected _realmSpecificEndpointTemplateEnabled

_realmSpecificEndpointTemplateEnabled: boolean | undefined = undefined

Protected _region

_region: Region

Protected _regionId

_regionId: string = ""

Protected _waiters

_waiters: OptimizerWaiter

targetService

targetService: string = "Optimizer"

Static Protected endpointServiceName

endpointServiceName: string = ""

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://optimizer.{region}.oci.{secondLevelDomain}"

Accessors

endpoint

  • get endpoint(): string
  • set endpoint(endpoint: string): void

logger

region

  • set region(region: Region): void
  • Sets the region to call (ex, Region.US_PHOENIX_1). Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.

    Parameters

    • region: Region

      The region of the service.

    Returns void

regionId

  • set regionId(regionId: string): void
  • Sets the regionId to call (ex, 'us-phoenix-1').

    Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}. If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1 and then call {@link #endpoint(String) endpoint}.

    Parameters

    • regionId: string

      The public region ID.

    Returns void

useRealmSpecificEndpointTemplate

  • set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled: boolean): void
  • 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: boolean

      flag to enable the use of realm specific endpoint template

    Returns void

Methods

bulkApplyRecommendations

close

  • close(): void

createProfile

  • Creates a new profile.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateProfile API.

    Parameters

    Returns Promise<CreateProfileResponse>

    CreateProfileResponse

createWaiters

  • Creates a new OptimizerWaiter for resources for this service.

    Parameters

    • Optional config: common.WaiterConfiguration

      The waiter configuration for termination and delay strategy

    Returns OptimizerWaiter

    The service waiters.

deleteProfile

  • Deletes the specified profile. Uses the profile's OCID to determine which profile to delete.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteProfile API.

    Parameters

    Returns Promise<DeleteProfileResponse>

    DeleteProfileResponse

filterResourceActions

  • Queries the Cloud Advisor resource actions that are supported.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use FilterResourceActions API.

    Parameters

    Returns Promise<FilterResourceActionsResponse>

    FilterResourceActionsResponse

getCategory

  • Gets the category that corresponds to the specified OCID.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetCategory API.

    Parameters

    Returns Promise<GetCategoryResponse>

    GetCategoryResponse

getEnrollmentStatus

  • Gets the Cloud Advisor enrollment status.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetEnrollmentStatus API.

    Parameters

    Returns Promise<GetEnrollmentStatusResponse>

    GetEnrollmentStatusResponse

getProfile

  • Gets the specified profile's information. Uses the profile's OCID to determine which profile to retrieve.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetProfile API.

    Parameters

    Returns Promise<GetProfileResponse>

    GetProfileResponse

getRecommendation

  • Gets the recommendation for the specified OCID.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetRecommendation API.

    Parameters

    Returns Promise<GetRecommendationResponse>

    GetRecommendationResponse

getResourceAction

  • Gets the resource action that corresponds to the specified OCID.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetResourceAction API.

    Parameters

    Returns Promise<GetResourceActionResponse>

    GetResourceActionResponse

getWaiters

getWorkRequest

  • Gets the status of the work request associated with the specified ID. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetWorkRequest API.

    Parameters

    Returns Promise<GetWorkRequestResponse>

    GetWorkRequestResponse

listCategories

  • Lists the supported Cloud Advisor categories.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListCategories API.

    Parameters

    Returns Promise<ListCategoriesResponse>

    ListCategoriesResponse

listEnrollmentStatuses

listHistories

  • Lists changes to the recommendations based on user activity. For example, lists when recommendations have been implemented, dismissed, postponed, or reactivated.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListHistories API.

    Parameters

    Returns Promise<ListHistoriesResponse>

    ListHistoriesResponse

listProfileLevels

  • Lists the existing profile levels.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListProfileLevels API.

    Parameters

    Returns Promise<ListProfileLevelsResponse>

    ListProfileLevelsResponse

listProfiles

  • Lists the existing profiles.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListProfiles API.

    Parameters

    Returns Promise<ListProfilesResponse>

    ListProfilesResponse

listRecommendationStrategies

listRecommendations

  • Lists the Cloud Advisor recommendations that are currently supported.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListRecommendations API.

    Parameters

    Returns Promise<ListRecommendationsResponse>

    ListRecommendationsResponse

listResourceActionQueryableFields

listResourceActions

  • Lists the Cloud Advisor resource actions that are supported.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListResourceActions API.

    Parameters

    Returns Promise<ListResourceActionsResponse>

    ListResourceActionsResponse

listWorkRequestErrors

  • Lists errors associated with the specified work request.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListWorkRequestErrors API.

    Parameters

    Returns Promise<ListWorkRequestErrorsResponse>

    ListWorkRequestErrorsResponse

listWorkRequestLogs

  • Lists the logs associated with the specified work request.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListWorkRequestLogs API.

    Parameters

    Returns Promise<ListWorkRequestLogsResponse>

    ListWorkRequestLogsResponse

listWorkRequests

  • Lists the work requests in the tenancy. The tenancy is the root compartment.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListWorkRequests API.

    Parameters

    Returns Promise<ListWorkRequestsResponse>

    ListWorkRequestsResponse

shutdownCircuitBreaker

  • shutdownCircuitBreaker(): void

updateEnrollmentStatus

updateProfile

  • Updates the specified profile. Uses the profile's OCID to determine which profile to update.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateProfile API.

    Parameters

    Returns Promise<UpdateProfileResponse>

    UpdateProfileResponse

updateRecommendation

  • Updates the recommendation that corresponds to the specified OCID. Use this operation to implement the following actions:

    Postpone recommendation * Dismiss recommendation * Reactivate recommendation

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateRecommendation API.

    Parameters

    Returns Promise<UpdateRecommendationResponse>

    UpdateRecommendationResponse

updateResourceAction

  • 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

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateResourceAction API.

    Parameters

    Returns Promise<UpdateResourceActionResponse>

    UpdateResourceActionResponse