您需要先启用 Cloud Asset Inventory API 并设置权限,然后才能使用 Cloud Asset Inventory。
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-03-10。"],[[["This guide demonstrates how to use Cloud Asset Inventory and the Google Cloud CLI in Cloud Shell to view your assets within a Google Cloud project."],["Before utilizing Cloud Asset Inventory, you must enable the Cloud Asset Inventory API and assign the Cloud Asset Owner role (`roles/cloudasset.owner`) to your user."],["You can create a Compute Engine VM instance to practice viewing assets, then list all VM instances in your project using the `gcloud asset list` command in Cloud Shell."],["The `gcloud asset list` command allows filtering by asset types, such as `compute.googleapis.com/Instance` for VM instances, and you can specify the `resource` content type to include detailed metadata."],["This document includes cleanup instructions to avoid incurring charges, through deleting your created VM instance."]]],[]]