Cloud Logging API - Class Google::Cloud::Logging::Resource (v2.3.1)

Reference documentation and code samples for the Cloud Logging API class Google::Cloud::Logging::Resource.

Resource

A monitored resource is an abstraction used to characterize many kinds of objects in your cloud infrastructure, including Google Cloud SQL databases, Google App Engine apps, Google Compute Engine virtual machine instances, and so forth. Each of those kinds of objects is described by an instance of ResourceDescriptor.

For use with Entry#resource, Project#resource, and Project#write_entries.

Inherits

  • Object

Example

require "google/cloud/logging"

logging = Google::Cloud::Logging.new
resource = logging.resource "gae_app",
                            "module_id" => "1",
                            "version_id" => "20150925t173233"

Methods

#initialize

def initialize() -> Resource

Create an empty Resource object.

Returns
  • (Resource) — a new instance of Resource

#labels

def labels()

A set of labels that can be used to describe instances of this monitored resource type.

#labels=

def labels=(value)

A set of labels that can be used to describe instances of this monitored resource type.

#type

def type()

The type of resource, as represented by a ResourceDescriptor.

#type=

def type=(value)

The type of resource, as represented by a ResourceDescriptor.