Class: Gcloud::Logging::ResourceDescriptor::LabelDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/gcloud/logging/resource_descriptor.rb

Overview

LabelDescriptor

A definition of a label that can be used to describe instances of a monitored resource type. For example, Cloud SQL databases can be labeled with their "database_id" and their "zone". See #labels.

Examples:

require "gcloud"

gcloud = Gcloud.new
logging = gcloud.logging
resource_descriptor = logging.resource_descriptors.first
label_descriptor = resource_descriptor.labels.first
label_descriptor.key #=> "database_id"
label_descriptor.description #=> "The ID of the database."

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionObject (readonly)

A human-readable description for the label.


111
112
113
# File 'lib/gcloud/logging/resource_descriptor.rb', line 111

def description
  @description
end

#keyObject (readonly)

The key (name) of the label.


99
100
101
# File 'lib/gcloud/logging/resource_descriptor.rb', line 99

def key
  @key
end

#typeSymbol? (readonly)

The type of data that can be assigned to the label.

Returns:

  • (Symbol, nil)

    Returns :string, :boolean, :integer, or nil if there is no type.


107
108
109
# File 'lib/gcloud/logging/resource_descriptor.rb', line 107

def type
  @type
end