Class Resource

public class Resource

The monitored resource that produced this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.

Inheritance

java.lang.Object > Resource

Constructors

Resource()

public Resource()

Methods

getLabels()

public Map<String,String> getLabels()

Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.

Returns
TypeDescription
Map<String,String>

getType()

public String getType()

Required. The monitored resource type. For example, the type of a Compute Engine VM instance is `gce_instance`.

Returns
TypeDescription
String

setLabels(Map<String,String> value)

public void setLabels(Map<String,String> value)
Parameter
NameDescription
valueMap<String,String>

setType(String value)

public void setType(String value)
Parameter
NameDescription
valueString