#[non_exhaustive]pub struct StartWorkloadCaptureContext {
pub enable_live_replay: bool,
pub replay_instance: Option<String>,
/* private fields */
}Expand description
The context for the StartWorkloadCapture operation, which contains
details to start recording the workload (SQL queries) on a Cloud SQL
instance.
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.enable_live_replay: boolOptional. If true, the captured workload is simultaneously executed on a
separate, ephemeral Cloud SQL instance. This “live replay” instance
is automatically provisioned and is cloned from the source instance. If
false (the default), the workload is only stored and no live replay occurs.
It can be replayed later using a separate StartWorkloadReplayRequest.
Note: The workload capture runs continuously until an explicit
StopWorkloadCaptureRequest is issued.
replay_instance: Option<String>Optional. Required if enable_live_replay is true.
The name of the Cloud SQL instance where the captured workload
(SQL queries) is being executed, excluding the project ID (for example,
my-replay-instance). The instance name must start with a lowercase letter
and contain only lowercase letters, numbers, and hyphens. The combined
length of project-ID:instance-name must be 98 characters or less.
Implementations§
Source§impl StartWorkloadCaptureContext
impl StartWorkloadCaptureContext
Sourcepub fn set_enable_live_replay<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_live_replay<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_live_replay.
§Example
let x = StartWorkloadCaptureContext::new().set_enable_live_replay(true);Sourcepub fn set_replay_instance<T>(self, v: T) -> Self
pub fn set_replay_instance<T>(self, v: T) -> Self
Sets the value of replay_instance.
§Example
let x = StartWorkloadCaptureContext::new().set_replay_instance("example");Sourcepub fn set_or_clear_replay_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_replay_instance<T>(self, v: Option<T>) -> Self
Sets or clears the value of replay_instance.
§Example
let x = StartWorkloadCaptureContext::new().set_or_clear_replay_instance(Some("example"));
let x = StartWorkloadCaptureContext::new().set_or_clear_replay_instance(None::<String>);