public static class MonitoredResource.Builder extends Object
MonitoredResource
objects.Modifier and Type | Method and Description |
---|---|
MonitoredResource.Builder |
addLabel(String key,
String value)
Adds a label to the labels of the monitored resource.
|
MonitoredResource |
build() |
MonitoredResource.Builder |
clearLabels()
Clears all the labels of the monitored resource.
|
MonitoredResource.Builder |
setLabels(Map<String,String> labels)
Sets the values for all the labels required by the corresponding monitored resource
descriptor (see
MonitoredResourceDescriptor.getLabels() . |
MonitoredResource.Builder |
setType(String type)
Sets the monitored resource type.
|
public MonitoredResource.Builder setType(String type)
MonitoredResourceDescriptor.getType()
of a MonitoredResourceDescriptor
object. For
example, the type cloudsql_database
represent databases in Google Cloud SQL.public MonitoredResource.Builder setLabels(Map<String,String> labels)
MonitoredResourceDescriptor.getLabels()
. For example, Google Compute
Engine VM instances use the labels instance_id
and zone
.public MonitoredResource.Builder addLabel(String key, String value)
public MonitoredResource.Builder clearLabels()
public MonitoredResource build()
Copyright © 2019 Google LLC. All rights reserved.