Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-28。"],[],[],null,["# Cloud deprecation and breaking changes general recommender\n==========================================================\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\n**Cloud deprecation and breaking changes general recommender** provides you with\nrecommendations about Cloud deprecations and breaking changes. It identifies\nCloud resources that will be affected by upcoming deprecations and breaking\nchanges while providing guidelines on how to manage them. Recommendations\nare viewable through Google Cloud CLI, the API, and BigQuery export.\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Recommender API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recommender.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Recommender API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recommender.googleapis.com)\n\n| **Note:** You only need to enable the API on a single billing project. You can then use this same billing project to retrieve recommendations and insights for other projects, the entire organization or the billing account, using the [`--billing-project` flag](/sdk/gcloud/reference#--billing-project).\n\n4. Ensure that you have the following roles:\n\n### Required roles\n\nThis section describes the roles and necessary permissions to use\nthe **Cloud deprecation and breaking changes general recommender**.\n\nFor more information about roles and about granting access, see the following:\n\n- [Understanding roles](/iam/docs/understanding-roles)\n- [Managing access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access)\n\nPricing\n-------\n\n**Cloud deprecation and breaking changes general recommender** is offered at no\ncharge. For information about other pricing tiers, see\n[Recommender pricing](/recommender/pricing).\n\nView cloud deprecation recommendations\n--------------------------------------\n\nYou can list recommendations by using the Console, the Google Cloud CLI, the\nRecommender API, or through BigQuery export. \n\n### Console\n\n1. Go to the **Recommendation Hub**.\n\n [Go to the Recommendation Hub](https://console.cloud.google.com/active-assist/list/manageability/recommendations?pageState=(%22AaRecommendationTable%22:(%22f%22:%22%255B%255D%22)))\n2. Set the **Filter field** to `Recommender:google.cloud.deprecation.GeneralRecommender`.\n\n | **Note:** You must have the have the correct IAM permissions (listed above) in order to see recommendations. If you have the correct permissions and the page does not show any recommendations, then the project does not have any deprecations or breaking changes that meet the criteria for a recommendation.\n\n### Google Cloud CLI\n\nThis tab shows the commands to list recommendations and insights with\nGoogle Cloud CLI.\n\n- List recommendations\n\n gcloud recommender recommendations list \\\n --billing-project=\u003cvar translate=\"no\"\u003eBILLING_PROJECT_ID\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --recommender=google.cloud.deprecation.GeneralRecommender \\\n --format=yaml\n\n- List Insights\n\n gcloud recommender insights list \\\n --billing-project=\u003cvar translate=\"no\"\u003eBILLING_PROJECT_ID\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --insight-type=google.cloud.deprecation.GeneralInsight \\\n --format=yaml\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eBILLING_PROJECT_ID\u003c/var\u003e with ID of the project that you've enabled with the Recommender API.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the identifier for your Google Cloud project.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e with the Google Cloud location where resources associated with the recommendations are located (for example, global or us-central1-a).\n\n### API\n\nThis tabs shows your the commands to list recommendations and insights with\nthe Recommender API.\n\n- List Recommendations\n\n curl -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"x-goog-user-project: \u003cvar translate=\"no\"\u003eBILLING_PROJECT_ID\u003c/var\u003e \" \\\n \"https://recommender.googleapis.com/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e /locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e /recommenders/google.cloud.deprecation.GeneralRecommender/recommendations\"\n\n- List Insights\n\n curl -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"x-goog-user-project: \u003cvar translate=\"no\"\u003eBILLING_PROJECT_ID\u003c/var\u003e \" \\\n \"https://recommender.googleapis.com/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e /locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e /insightTypes/google.cloud.deprecation.GeneralInsight/insights\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eBILLING_PROJECT_ID\u003c/var\u003e with ID of the project that you've enabled with the Recommender API.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the identifier for your Google Cloud project.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e with the Google Cloud location where resources associated with the recommendations are located (for example, global or us-central1-a).\n\n### BigQuery export\n\nThis tab shows the commands to list recommendations with BigQuery\nexport.\n\nCloud deprecation recommendations are also included in\n[BigQuery export](/recommender/docs/bq-export/export-recommendations-to-bq).\nWith the BigQuery export, you can view daily snapshots of recommendations\nfor your organization.\n\n1. Follow the [BigQuery export documentation](/recommender/docs/bq-export/export-recommendations-to-bq)\n to export recommendations to BigQuery.\n\n2. Query all deprecation recommendations:\n\n SELECT *\n FROM `\u003cproject\u003e.\u003cdataset\u003e.recommendations_export`\n WHERE DATE(_PARTITIONTIME) = \"\u003cdate\u003e\"\n and recommender = \"google.cloud.deprecation.GeneralRecommender\"\n\nAvailable recommendation subtypes\n---------------------------------\n\nThe following table describes the available and disclosable recommendation\nsubtypes.\n\n| **Warning:** Dismissed recommendations are not regenerated and will hide the deprecation recommendation for the instance on all surfaces. Instead, mark it as succeeded once you've applied the recommendation.\n\nNote that this table is not comprehensive and may intentionally omit\nsecurity-sensitive deprecations or breaking changes."]]