Implementing Cloud Advisor Recommendations
This section describes how to implement recommendations using fix-it flows in Cloud Advisor.
For manual implementation instructions, see the related recommendation at Cloud Advisor Categories and Recommendations.
Required IAM Policies
To use Oracle Cloud Infrastructure, you must be granted security access in a policy by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have and which compartment to work in.
To get started with Cloud Advisor, an administrator must grant each user access to Cloud Advisor and to the resources that Cloud Advisor recommendations impact through an IAM policy. Each service in Oracle Cloud Infrastructure integrates with IAM for authentication and authorization, for all interfaces (the Console, SDK or CLI, and REST API).
The resource name for Cloud Advisor is optimizer-api-family
. The following is an example policy to grant users access to Cloud Advisor to the resources that Cloud Advisor recommendations impact:
Allow group OptimizerAdmins to manage optimizer-api-family in tenancy
If you're new to policies, see Getting Started with Policies and Common Policies. For more information about Cloud Advisor policies, see Policy Details for Cloud Advisor.
Resource Actions
Learn how to view and update resource actions.
Listing Resource Actions
Using the CLI
Use the oci optimizer resource-action-summary list command to list resource actions.
oci optimizer resource-action-summary list --compartment-id <compartment_ocid> --resource-action-id <resource_action_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the ListResourceActions operation to list resource actions.
Getting Resource Actions
Using the CLI
Use the oci optimizer resource-action get command to get resource actions.
oci optimizer resource-action get --resource-action-id <resource_action_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the GetResourceAction operation to get resource actions.
Updating Resource Actions
Update resource actions to postpone or dismiss a recommendation for a single resource.
Using the CLI
Use the oci optimizer resource-action update command to update resource actions.
oci optimizer resource-action update --resource-action-id <resource_action_ocid> --status <status>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the UpdateResourceAction operation to update resource actions.
Recommendations
Learn how to implement and update recommendations.
Implementing Recommendations
Using the Console
Using the CLI
Use the oci optimizer recommendation bulk-apply command to implement recommendations.
oci optimizer recommendation bulk-apply --recommendation-id <recommendation_ocid> --status <status>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the BulkApplyRecommendations operation to implement recommendations.
Updating Recommendations
Update a recommendation to dismiss, postpone, reactivate, or edit the recommendation for one or more resources.
Using the Console
Using the CLI
Use the oci optimizer recommendation update command to update recommendations for all resources.
oci optimizer recommendation update --recommendation-id <recommendation_ocid> --status <status>
You can update recommendations for one or more resources using oci optimizer recommendation bulk-apply, or for a single resource using oci optimizer resource-action update.
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the UpdateRecommendation operation to update recommendations for all resources.
You can update recommendations for one or more resources using BulkApplyRecommendations, or for a single resource using UpdateResourceAction.
History
Learn how to view history (recommendation status changes).
Listing History (Recommendation Status Changes)
Using the Console
Using the CLI
Use the oci optimizer history-summary list command to user changes to recommendations.
oci optimizer history-summary list --compartment-id <compartment_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the ListHistories operation to list user changes to recommendations.
Work Requests
Learn how to view work requests, including details, errors, and logs.
Listing Work Requests
Using the Console
Using the CLI
Use the oci optimizer work-request list command to list work requests.
oci optimizer work-request list --compartment-id <compartment_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the ListWorkRequests operation to list work requests.
Getting Work Request Details
Using the Console
Using the CLI
Use the oci optimizer work-request get command to get a work request.
oci optimizer work-request get --work-request-id <work_request_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the GetWorkRequest operation to get work requests.
Listing Work Request Errors
Using the Console
Using the CLI
Use the oci optimizer work-request-error list command to list errors for a work request.
oci optimizer work-request-error list --work-request-id <work_request_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the ListWorkRequestErrors operation to list errors for a work request.
Listing Work Request Logs
Using the Console
Using the CLI
Use the oci optimizer work-request-log-entry list command to list logs for work requests.
oci optimizer work-request-log-entry list --work-request-id <work_request_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the ListWorkRequestLogs operation to list logs for work requests.
Recommendation Strategies
Learn how to view recommendation strategies.
Listing Recommendation Strategies
Using the CLI
Use the oci optimizer recommendation-strategy-summary list-recommendation-strategies command to
oci optimizer recommendation-strategy-summary list-recommendation-strategies --compartment-id <compartment_ocid>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Using the API
Use the ListRecommendationStrategies operation to list recommendation strategies.