Cloud

Struct Cloud 

Source
pub struct Cloud { /* private fields */ }
Expand description

Fields related to the cloud or infrastructure the events are coming from.

Implementations§

Source§

impl Cloud

Source

pub fn get_provider(&self) -> Option<&String>

Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.

Source

pub fn set_provider(&mut self, provider_arg: String)

Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.

§Example

aws

Source

pub fn get_availability_zone(&self) -> Option<&String>

Availability zone in which this host, resource, or service is located.

Source

pub fn set_availability_zone(&mut self, availability_zone_arg: String)

Availability zone in which this host, resource, or service is located.

§Example

us-east-1c

Source

pub fn get_region(&self) -> Option<&String>

Region in which this host, resource, or service is located.

Source

pub fn set_region(&mut self, region_arg: String)

Region in which this host, resource, or service is located.

§Example

us-east-1

Source

pub fn get_instance_id(&self) -> Option<&String>

Instance ID of the host machine.

Source

pub fn set_instance_id(&mut self, instance_id_arg: String)

Instance ID of the host machine.

§Example

i-1234567890abcdef0

Source

pub fn get_instance_name(&self) -> Option<&String>

Instance name of the host machine.

Source

pub fn set_instance_name(&mut self, instance_name_arg: String)

Instance name of the host machine.

Source

pub fn get_machine_type(&self) -> Option<&String>

Machine type of the host machine.

Source

pub fn set_machine_type(&mut self, machine_type_arg: String)

Machine type of the host machine.

§Example

t2.medium

Source

pub fn get_account_id(&self) -> Option<&String>

The cloud account or organization id used to identify different entities in a multi-tenant environment.

Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.

Source

pub fn set_account_id(&mut self, account_id_arg: String)

The cloud account or organization id used to identify different entities in a multi-tenant environment.

Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.

§Example

666777888999

Source

pub fn get_account_name(&self) -> Option<&String>

The cloud account name or alias used to identify different entities in a multi-tenant environment.

Examples: AWS account name, Google Cloud ORG display name.

Source

pub fn set_account_name(&mut self, account_name_arg: String)

The cloud account name or alias used to identify different entities in a multi-tenant environment.

Examples: AWS account name, Google Cloud ORG display name.

§Example

elastic-dev

Source

pub fn get_service_name(&self) -> Option<&String>

The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.

Examples: app engine, app service, cloud run, fargate, lambda.

Source

pub fn set_service_name(&mut self, service_name_arg: String)

The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.

Examples: app engine, app service, cloud run, fargate, lambda.

§Example

lambda

Source

pub fn get_project_id(&self) -> Option<&String>

The cloud project identifier.

Examples: Google Cloud Project id, Azure Project id.

Source

pub fn set_project_id(&mut self, project_id_arg: String)

The cloud project identifier.

Examples: Google Cloud Project id, Azure Project id.

§Example

my-project

Source

pub fn get_project_name(&self) -> Option<&String>

The cloud project name.

Examples: Google Cloud Project name, Azure Project name.

Source

pub fn set_project_name(&mut self, project_name_arg: String)

The cloud project name.

Examples: Google Cloud Project name, Azure Project name.

§Example

my project

Trait Implementations§

Source§

impl Clone for Cloud

Source§

fn clone(&self) -> Cloud

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Cloud

Source§

fn default() -> Cloud

Returns the “default value” for a type. Read more
Source§

impl Serialize for Cloud

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Cloud

§

impl RefUnwindSafe for Cloud

§

impl Send for Cloud

§

impl Sync for Cloud

§

impl Unpin for Cloud

§

impl UnwindSafe for Cloud

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.