工作负载类型 | 最佳用途 |
---|---|
费用低 | 将此实例用于非生产工作负载 |
Web 服务器 | 使用此实例托管基本网站 |
应用服务器 | 使用此实例运行应用 |
内存中数据库 | 将此实例用作数据库或用于执行分析 |
OpenShift 模式 | 使用此实例运行 OpenShift 集群节点 |
Windows | 将此实例用作 Windows 服务器实例 |
SQL Server | 将此实例用作 SQL Server 实例 |
准备工作
-
如果您尚未设置身份验证,请进行设置。身份验证是通过其进行身份验证以访问 Trusted Cloud by S3NS 服务和 API 的过程。如需从本地开发环境运行代码或示例,您可以通过选择以下选项之一向 Compute Engine 进行身份验证:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Trusted Cloud console to access Trusted Cloud by S3NS services and APIs, you don't need to set up authentication.
gcloud
-
After installing the Google Cloud CLI, sign in to the gcloud CLI with your federated identity and then initialize it by running the following command:
gcloud init
- Set a default region and zone.
在 Trusted Cloud 控制台中,前往创建实例页面。
如果出现提示,请选择您的项目并点击继续。 系统会显示创建实例页面,并显示机器配置窗格。
点击
虚拟机创建自…。在显示的列表中,选择预设配置,如下所示:
如果预设部分中的工作负载类型适合您的用例,请选择该工作负载类型的预设配置。系统会显示该预设配置的窗口。
否则,如需从可用预设配置的完整列表中进行选择,请点击查看所有预设...。然后,在显示的预设虚拟机页面上,选择适合您用例的工作负载类型的预设配置。系统会显示该预设配置的窗口。
可选。如需进一步自定义实例配置或替换任何预设属性,请执行以下操作之一:
如果当前页面是创建实例页面,请点击应用预设,然后自定义实例配置。
如果当前页面是预设虚拟机页面,请点击自定义,然后自定义实例配置。
如需了解详情,请参阅创建并启动实例。
点击创建或立即创建以完成实例的创建。
REST
如需在本地开发环境中使用本页面上的 REST API 示例,请使用您提供给 gcloud CLI 的凭据。
After installing the Google Cloud CLI, sign in to the gcloud CLI with your federated identity and then initialize it by running the following command:
gcloud init
如需了解详情,请参阅 Trusted Cloud 身份验证文档中的使用 REST 时进行身份验证。
所需的角色
如需获得创建实例所需的权限,请让您的管理员为您授予项目的 Compute Instance Admin (v1) (
roles/compute.instanceAdmin.v1
) IAM 角色。如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。限制
您只能通过 Trusted Cloud 控制台创建针对您的工作负载进行了优化的 Google 配置实例。
创建由 Google 配置并针对您的工作负载进行了优化的实例
使用 Trusted Cloud 控制台创建实例时,您可以选择工作负载类型,以创建针对工作负载优化的实例。然后,Google 会使用针对该工作负载类型进行了优化的预设配置。在完成实例创建之前,您可以进一步自定义实例配置。如果需要,您还可以使用所选值替换这些预设实例属性中的任何一个。
如需创建针对您的工作负载进行了优化的 Google 配置实例,请按以下步骤操作:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-06-23。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-06-23。"],[[["Google Cloud Console offers pre-configured instances optimized for specific workloads, eliminating the need for manual configuration."],["Workload-optimized instance types include options like low cost, web server, application server, in-memory database, OpenShift mode, Windows, and SQL server."],["To create a workload-optimized instance, users must select a preset configuration within the Google Cloud Console, which then automatically applies settings suited for that workload."],["Users can customize preset configurations further or override them with their preferred settings after selecting a preset for their workload type."],["To get the needed permissions to create these instances, users need to ask their administrator to grant them the Compute Instance Admin (v1) role on the project."]]],[]] -