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 the Client class.

Parameters:
  • type (str) – The resource type name.
  • labels (dict) – A mapping from label names to values for all labels enumerated in the associated ResourceDescriptor.

Create new instance of Resource(type, labels)

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 (str) – The “resource name” of the monitored resource descriptor: "projects/<project_id>/monitoredResourceDescriptors/<type>"
  • type (str) – The monitored resource type. For example: "gce_instance"
  • display_name (str) – A concise name that might be displayed in user interfaces.
  • description (str) – 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.