クラウドの非推奨と破壊的変更に関する一般的な推奨事項
クラウドの非推奨と破壊的変更に関する一般的な推奨事項では、クラウドの非推奨と破壊的変更に関する推奨事項が提示されます。今後の非推奨と破壊的変更の影響を受ける Cloud リソースが特定され、それらを管理するためのガイドラインが示されます。推奨事項は、Google Cloud CLI、API、BigQuery へのエクスポートを通じて確認できます。
始める前に
- 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.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Recommender API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Recommender API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. - 以下のロールがあることを確認してください。
recommender.cloudDeprecationGeneralInsights.get
recommender.cloudDeprecationGeneralInsights.list
recommender.cloudDeprecationGeneralRecommendations.get
recommender.cloudDeprecationGeneralRecommendations.list
recommender.cloudDeprecationGeneralInsights.update
recommender.cloudDeprecationGeneralRecommendations.update
Active Assist に移動します。
[フィルタ] フィールドを
Recommender:google.cloud.deprecation.GeneralRecommender
に設定します。推奨事項の一覧表示
gcloud recommender recommendations list \ --billing-project=BILLING_PROJECT_ID \ --project=PROJECT_ID \ --location=LOCATION \ --recommender=google.cloud.deprecation.GeneralRecommender \ --format=yaml
分析情報のリストを取得する
gcloud recommender insights list \ --billing-project=BILLING_PROJECT_ID \ --project=PROJECT_ID \ --location=LOCATION \ --insight-type=google.cloud.deprecation.GeneralInsight \ --format=yaml
- BILLING_PROJECT_ID は、Recommender API を有効にしたプロジェクトの ID に置き換えます。
- PROJECT_ID は、 Google Cloud プロジェクトの ID に置き換えます。
- LOCATION は、推奨事項に関連付けられているリソースがある Google Cloud ロケーション(global、us-central1-a など)に置き換えます。
推奨事項の一覧表示
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "x-goog-user-project: BILLING_PROJECT_ID " \ "https://recommender.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /recommenders/google.cloud.deprecation.GeneralRecommender/recommendations"
分析情報のリストを取得する
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "x-goog-user-project: BILLING_PROJECT_ID " \ "https://recommender.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /insightTypes/google.cloud.deprecation.GeneralInsight/insights"
- BILLING_PROJECT_ID は、Recommender API を有効にしたプロジェクトの ID に置き換えます。
- PROJECT_ID は、 Google Cloud プロジェクトの ID に置き換えます。
- LOCATION は、推奨事項に関連付けられているリソースがある Google Cloud ロケーション(global、us-central1-a など)に置き換えます。
BigQuery へのエクスポートに関するドキュメントに従って、推奨事項を BigQuery にエクスポートします。
すべての非推奨に関する推奨事項をクエリします。
SELECT * FROM `<project>.<dataset>.recommendations_export` WHERE DATE(_PARTITIONTIME) = "<date>" and recommender = "google.cloud.deprecation.GeneralRecommender"
説明 | ロール |
---|---|
レコメンデーションを表示 |
recommender.cloudDeprecationRecommendationViewer
|
推奨事項の表示と更新 |
recommender.cloudDeprecationRecommendationAdmin
|
必要なロール
このセクションでは、クラウドの非推奨と破壊的変更に関する全般的な推奨事項を使用するためのロールと必要な権限について説明します。
ロール | 含まれる権限 |
---|---|
roles/recommender.cloudDeprecationRecommendationViewer |
|
roles/recommender.cloudDeprecationRecommendationAdmin |
|
ロールとアクセス権の付与の詳細については、以下をご覧ください。
料金
クラウドの非推奨と破壊的変更に関する一般的な推奨事項は無料です。他の料金ティアの詳細については、Recommender の料金をご覧ください。
クラウドの非推奨に関する推奨事項を確認する
コンソール、Google Cloud CLI、Recommender API、または BigQuery エクスポートを使用して、推奨事項のリストを取得できます。
コンソール
Google Cloud CLI
このタブでは、Google Cloud CLI を使用して推奨事項と分析情報のリストを取得するコマンドを示します。
次のように置き換えます。
API
このタブでは、Recommender API を使用して推奨事項と分析情報のリストを取得するコマンドを示します。
次のように置き換えます。
BigQuery Export
このタブでは、BigQuery へのエクスポートを使用して推奨事項と分析情報のリストを取得するコマンドを示します。
BigQuery へのエクスポートには、クラウドの非推奨に関する推奨事項も含まれています。BigQuery へのエクスポートでは、組織に対する推奨事項の日次スナップショットを表示できます。
利用可能な推奨事項のサブタイプ
次の表に、利用可能であり開示可能な推奨事項のサブタイプを示します。
サブタイプ | 非推奨または破壊的変更 |
---|---|
GCE_METADATA_SERVER_HEADER_WHITESPACE | Compute Engine では、Compute Engine メタデータ サービスで RFC 7230 のセクション 3.2 に沿って HTTP リクエスト フォーマット チェックを適用します。フォーマットが正しくないリクエストを受け入れると、セキュリティの脆弱性につながる可能性があります。 |
この表は包括的なものではなく、セキュリティ関連の非推奨や破壊的変更は意図的に省略されている場合があります。