Class MonitoredResource
An object representing a resource that can be used for monitoring, logging,
billing, or other purposes. Examples include virtual machine instances,
databases, and storage devices such as disks. The type
field identifies a
[MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object that describes the resource's
schema. Information in the labels
field identifies the actual resource and
its attributes according to the schema. For example, a particular Compute
Engine VM instance could be represented by the following object, because the
[MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for "gce_instance"
has labels
"instance_id"
and "zone"
:
{ "type": "gce_instance",
"labels": { "instance_id": "12345678901234",
"zone": "us-central1-a" }}
Inheritance
System.Object
MonitoredResource
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class MonitoredResource : IMessage<MonitoredResource>, IMessage, IEquatable<MonitoredResource>, IDeepCloneable<MonitoredResource>
Constructors
MonitoredResource()
Declaration
public MonitoredResource()
MonitoredResource(MonitoredResource)
Declaration
public MonitoredResource(MonitoredResource other)
Parameters
Fields
LabelsFieldNumber
Field number for the "labels" field.
Declaration
public const int LabelsFieldNumber = 2
Field Value
Type |
Description |
System.Int32 |
|
TypeFieldNumber
Field number for the "type" field.
Declaration
public const int TypeFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
Properties
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Labels
Required. 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"
.
Declaration
public MapField<string, string> Labels { get; }
Property Value
Type |
Description |
MapField<System.String, System.String> |
|
Parser
Declaration
public static MessageParser<MonitoredResource> Parser { get; }
Property Value
Type
Required. The monitored resource type. This field must match
the type
field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For
example, the type of a Compute Engine VM instance is gce_instance
.
Declaration
public string Type { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
Clone()
Declaration
public MonitoredResource Clone()
Returns
Implements
Equals(MonitoredResource)
Declaration
public bool Equals(MonitoredResource other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
MergeFrom(MonitoredResource)
Declaration
public void MergeFrom(MonitoredResource other)
Parameters
Implements
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Implements
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Implements