Monitored Resource Descriptors#
Monitored Resource Descriptors for the Google Stackdriver Monitoring API (V3).
-
class
google.cloud.monitoring.resource.
Resource
[source]# Bases:
google.cloud.monitoring.resource.Resource
A monitored resource identified by specifying values for all labels.
The preferred way to construct a resource object is using the
resource()
factory method of theClient
class.Parameters: - type (string) – The resource type name.
- labels (dict) – A mapping from label names to values for all labels
enumerated in the associated
ResourceDescriptor
.
-
class
google.cloud.monitoring.resource.
ResourceDescriptor
(name, type_, display_name, description, labels)[source]# Bases:
object
Specification of a monitored resource type and its schema.
Parameters: - name (string) – The “resource name” of the monitored resource descriptor:
"projects/<project_id>/monitoredResourceDescriptors/<type>"
- type (string) – The monitored resource type. For example:
"gce_instance"
- display_name (string) – A concise name that might be displayed in user interfaces.
- description (string) – A detailed description that might be used in documentation.
- labels (list of
LabelDescriptor
) – A sequence of label descriptors specifying the labels used to identify a specific instance of this monitored resource.
- name (string) – The “resource name” of the monitored resource descriptor: