MonitoredResource
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
表示可用于监控、日志记录、结算或其他目的的资源的对象。示例包括虚拟机实例、数据库和存储设备(例如磁盘)。type 字段用于标识描述资源架构的 MonitoredResourceDescriptor 对象。labels字段中的信息根据架构标识实际资源及其属性。例如,某个特定的 Compute Engine 虚拟机实例可由以下对象表示,因为 "gce_instance" 的 MonitoredResourceDescriptor 具有标签 "project_id"、"instance_id" 和 "zone":
{ "type": "gce_instance",
"labels": { "project_id": "my-project",
"instance_id": "12345678901234",
"zone": "us-central1-a" }}
| JSON 表示法 |
{
"type": string,
"labels": {
string: string,
...
}
} |
| 字段 |
type |
string
必需。受监控的资源类型。此字段必须与 MonitoredResourceDescriptor 对象的 type 字段匹配。例如,Compute Engine 虚拟机实例的类型为 gce_instance。某些描述符会在类型中包含服务名称;例如,Datastream 流的类型为 datastream.googleapis.com/Stream。
|
labels |
map (key: string, value: string)
必需。关联的受监控资源描述符中列出的所有标签的值。例如,Compute Engine 虚拟机实例使用标签 "project_id"、"instance_id" 和 "zone"。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-11-18。
[[["易于理解","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-11-18。"],[],[]]