#[non_exhaustive]pub struct Instance {Show 17 fields
pub name: String,
pub id: String,
pub app_engine_release: String,
pub availability: Availability,
pub vm_name: String,
pub vm_zone_name: String,
pub vm_id: String,
pub start_time: Option<Timestamp>,
pub requests: i32,
pub errors: i32,
pub qps: f32,
pub average_latency: i32,
pub memory_usage: i64,
pub vm_status: String,
pub vm_debug_enabled: bool,
pub vm_ip: String,
pub vm_liveness: LivenessState,
/* private fields */
}Expand description
An Instance resource is the computing unit that App Engine uses to automatically scale an application.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. Full path to the Instance resource in the API.
Example: apps/myapp/services/default/versions/v1/instances/instance-1.
id: StringOutput only. Relative name of the instance within the version.
Example: instance-1.
app_engine_release: StringOutput only. App Engine release this instance is running on.
availability: AvailabilityOutput only. Availability of the instance.
vm_name: StringOutput only. Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.
vm_zone_name: StringOutput only. Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.
vm_id: StringOutput only. Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.
start_time: Option<Timestamp>Output only. Time that this instance was started.
@OutputOnly
requests: i32Output only. Number of requests since this instance was started.
errors: i32Output only. Number of errors since this instance was started.
qps: f32Output only. Average queries per second (QPS) over the last minute.
average_latency: i32Output only. Average latency (ms) over the last minute.
memory_usage: i64Output only. Total memory in use (bytes).
vm_status: StringOutput only. Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.
vm_debug_enabled: boolOutput only. Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.
vm_ip: StringOutput only. The IP address of this instance. Only applicable for instances in App Engine flexible environment.
vm_liveness: LivenessStateOutput only. The liveness health check of this instance. Only applicable for instances in App Engine flexible environment.
Implementations§
Source§impl Instance
impl Instance
Sourcepub fn set_app_engine_release<T: Into<String>>(self, v: T) -> Self
pub fn set_app_engine_release<T: Into<String>>(self, v: T) -> Self
Sets the value of app_engine_release.
§Example
let x = Instance::new().set_app_engine_release("example");Sourcepub fn set_availability<T: Into<Availability>>(self, v: T) -> Self
pub fn set_availability<T: Into<Availability>>(self, v: T) -> Self
Sets the value of availability.
§Example
use google_cloud_appengine_v1::model::instance::Availability;
let x0 = Instance::new().set_availability(Availability::Resident);
let x1 = Instance::new().set_availability(Availability::Dynamic);Sourcepub fn set_vm_name<T: Into<String>>(self, v: T) -> Self
pub fn set_vm_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_vm_zone_name<T: Into<String>>(self, v: T) -> Self
pub fn set_vm_zone_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_requests<T: Into<i32>>(self, v: T) -> Self
pub fn set_requests<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_errors<T: Into<i32>>(self, v: T) -> Self
pub fn set_errors<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_average_latency<T: Into<i32>>(self, v: T) -> Self
pub fn set_average_latency<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_memory_usage<T: Into<i64>>(self, v: T) -> Self
pub fn set_memory_usage<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_vm_status<T: Into<String>>(self, v: T) -> Self
pub fn set_vm_status<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_vm_debug_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_vm_debug_enabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_vm_liveness<T: Into<LivenessState>>(self, v: T) -> Self
pub fn set_vm_liveness<T: Into<LivenessState>>(self, v: T) -> Self
Sets the value of vm_liveness.
§Example
use google_cloud_appengine_v1::model::instance::liveness::LivenessState;
let x0 = Instance::new().set_vm_liveness(LivenessState::Unknown);
let x1 = Instance::new().set_vm_liveness(LivenessState::Healthy);
let x2 = Instance::new().set_vm_liveness(LivenessState::Unhealthy);Trait Implementations§
impl StructuralPartialEq for Instance
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnsafeUnpin for Instance
impl UnwindSafe for Instance
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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