Package com.google.cloud
Class MonitoredResource
java.lang.Object
com.google.cloud.MonitoredResource
- All Implemented Interfaces:
Serializable
Objects of this class represent a resource that can be used for monitoring, logging, billing, or
other purposes. Examples include virtual machine instances, databases, and storage devices such
as disks. The type field identifies a
MonitoredResourceDescriptor object that describes
the resource's schema. Information in the labels field identifies the actual resource and its
attributes according to the schema.
For example, the monitored resource for Google Compute Engine VM instances has
gce_instance type and specifies values for the labels instance_id and zone to
identify particular VM instances.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder forMonitoredResourceobjects. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic MonitoredResourcefromPb(MonitoredResource descriptorPb) Returns the values for all the labels required by the corresponding monitored resource descriptor (seeMonitoredResourceDescriptor.getLabels().getType()Returns the monitored resource type.inthashCode()static MonitoredResource.BuildernewBuilder(String type) Returns a builder forMonitoredResourceobjects given the resource's type.static MonitoredResourceCreates aMonitoredResourceobject given the resource's type and labels.Returns a builder for thisMonitoredResourceobject.toPb()toString()
-
Method Details
-
getType
Returns the monitored resource type. This value must match the one ofMonitoredResourceDescriptor.getType()of aMonitoredResourceDescriptorobject. For example, the typecloudsql_databaserepresent databases in Google Cloud SQL. -
getLabels
Returns the values for all the labels required by the corresponding monitored resource descriptor (seeMonitoredResourceDescriptor.getLabels(). For example, Google Compute Engine VM instances use the labelsinstance_idandzone. -
hashCode
public int hashCode() -
equals
-
toString
-
toPb
-
toBuilder
Returns a builder for thisMonitoredResourceobject. -
newBuilder
Returns a builder forMonitoredResourceobjects given the resource's type. -
of
Creates aMonitoredResourceobject given the resource's type and labels. -
fromPb
-