Struct google_api_proto::google::api::MonitoredResource
source · pub struct MonitoredResource {
pub type: String,
pub labels: BTreeMap<String, String>,
}
Expand description
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
"project_id"
, "instance_id"
and "zone"
:
{ "type": "gce_instance",
"labels": { "project_id": "my-project",
"instance_id": "12345678901234",
"zone": "us-central1-a" }}
Fields§
§type: String
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
. Some descriptors include the service name in the type; for
example, the type of a Datastream stream is
datastream.googleapis.com/Stream
.
labels: BTreeMap<String, String>
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"
.
Trait Implementations§
source§impl Clone for MonitoredResource
impl Clone for MonitoredResource
source§fn clone(&self) -> MonitoredResource
fn clone(&self) -> MonitoredResource
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MonitoredResource
impl Debug for MonitoredResource
source§impl Default for MonitoredResource
impl Default for MonitoredResource
source§impl Message for MonitoredResource
impl Message for MonitoredResource
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for MonitoredResource
impl PartialEq for MonitoredResource
source§fn eq(&self, other: &MonitoredResource) -> bool
fn eq(&self, other: &MonitoredResource) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MonitoredResource
Auto Trait Implementations§
impl Freeze for MonitoredResource
impl RefUnwindSafe for MonitoredResource
impl Send for MonitoredResource
impl Sync for MonitoredResource
impl Unpin for MonitoredResource
impl UnwindSafe for MonitoredResource
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request