Reference documentation and code samples for the Cloud Logging API class Google::Cloud::Logging::ResourceDescriptor::LabelDescriptor.
LabelDescriptor
A definition of a label that can be used to describe instances of a
Google::Cloud::Logging::Resource. For example, Cloud SQL databases must be labeled with
their database_id. See #labels.
Inherits
Object
Example
require"google/cloud/logging"logging=Google::Cloud::Logging.newresource_descriptor=logging.resource_descriptors.firstlabel_descriptor=resource_descriptor.labels.firstlabel_descriptor.key#=> "database_id"label_descriptor.description#=> "The ID of the database."
Methods
#description
defdescription()
A human-readable description for the label.
#key
defkey()
The key (name) of the label.
#type
deftype()->Symbol,nil
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[],[]]