#[non_exhaustive]pub struct Session {Show 20 fields
pub id: Option<String>,
pub created_on: Option<DateTime>,
pub status: Option<SessionStatus>,
pub error_message: Option<String>,
pub description: Option<String>,
pub role: Option<String>,
pub command: Option<SessionCommand>,
pub default_arguments: Option<HashMap<String, String>>,
pub connections: Option<ConnectionsList>,
pub progress: f64,
pub max_capacity: Option<f64>,
pub security_configuration: Option<String>,
pub glue_version: Option<String>,
pub number_of_workers: Option<i32>,
pub worker_type: Option<WorkerType>,
pub completed_on: Option<DateTime>,
pub execution_time: Option<f64>,
pub dpu_seconds: Option<f64>,
pub idle_timeout: Option<i32>,
pub profile_name: Option<String>,
}
Expand description
The period in which a remote Spark runtime environment is running.
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.id: Option<String>
The ID of the session.
created_on: Option<DateTime>
The time and date when the session was created.
status: Option<SessionStatus>
The session status.
error_message: Option<String>
The error message displayed during the session.
description: Option<String>
The description of the session.
role: Option<String>
The name or Amazon Resource Name (ARN) of the IAM role associated with the Session.
command: Option<SessionCommand>
The command object.See SessionCommand.
default_arguments: Option<HashMap<String, String>>
A map array of key-value pairs. Max is 75 pairs.
connections: Option<ConnectionsList>
The number of connections used for the session.
progress: f64
The code execution progress of the session.
max_capacity: Option<f64>
The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
security_configuration: Option<String>
The name of the SecurityConfiguration structure to be used with the session.
glue_version: Option<String>
The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
number_of_workers: Option<i32>
The number of workers of a defined WorkerType
to use for the session.
worker_type: Option<WorkerType>
The type of predefined worker that is allocated when a session runs. Accepts a value of G.1X
, G.2X
, G.4X
, or G.8X
for Spark sessions. Accepts the value Z.2X
for Ray sessions.
completed_on: Option<DateTime>
The date and time that this session is completed.
execution_time: Option<f64>
The total time the session ran for.
dpu_seconds: Option<f64>
The DPUs consumed by the session (formula: ExecutionTime * MaxCapacity).
idle_timeout: Option<i32>
The number of minutes when idle before the session times out.
profile_name: Option<String>
The name of an Glue usage profile associated with the session.
Implementations§
Source§impl Session
impl Session
Sourcepub fn created_on(&self) -> Option<&DateTime>
pub fn created_on(&self) -> Option<&DateTime>
The time and date when the session was created.
Sourcepub fn status(&self) -> Option<&SessionStatus>
pub fn status(&self) -> Option<&SessionStatus>
The session status.
Sourcepub fn error_message(&self) -> Option<&str>
pub fn error_message(&self) -> Option<&str>
The error message displayed during the session.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
The description of the session.
Sourcepub fn role(&self) -> Option<&str>
pub fn role(&self) -> Option<&str>
The name or Amazon Resource Name (ARN) of the IAM role associated with the Session.
Sourcepub fn command(&self) -> Option<&SessionCommand>
pub fn command(&self) -> Option<&SessionCommand>
The command object.See SessionCommand.
Sourcepub fn default_arguments(&self) -> Option<&HashMap<String, String>>
pub fn default_arguments(&self) -> Option<&HashMap<String, String>>
A map array of key-value pairs. Max is 75 pairs.
Sourcepub fn connections(&self) -> Option<&ConnectionsList>
pub fn connections(&self) -> Option<&ConnectionsList>
The number of connections used for the session.
Sourcepub fn max_capacity(&self) -> Option<f64>
pub fn max_capacity(&self) -> Option<f64>
The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
Sourcepub fn security_configuration(&self) -> Option<&str>
pub fn security_configuration(&self) -> Option<&str>
The name of the SecurityConfiguration structure to be used with the session.
Sourcepub fn glue_version(&self) -> Option<&str>
pub fn glue_version(&self) -> Option<&str>
The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
Sourcepub fn number_of_workers(&self) -> Option<i32>
pub fn number_of_workers(&self) -> Option<i32>
The number of workers of a defined WorkerType
to use for the session.
Sourcepub fn worker_type(&self) -> Option<&WorkerType>
pub fn worker_type(&self) -> Option<&WorkerType>
The type of predefined worker that is allocated when a session runs. Accepts a value of G.1X
, G.2X
, G.4X
, or G.8X
for Spark sessions. Accepts the value Z.2X
for Ray sessions.
Sourcepub fn completed_on(&self) -> Option<&DateTime>
pub fn completed_on(&self) -> Option<&DateTime>
The date and time that this session is completed.
Sourcepub fn execution_time(&self) -> Option<f64>
pub fn execution_time(&self) -> Option<f64>
The total time the session ran for.
Sourcepub fn dpu_seconds(&self) -> Option<f64>
pub fn dpu_seconds(&self) -> Option<f64>
The DPUs consumed by the session (formula: ExecutionTime * MaxCapacity).
Sourcepub fn idle_timeout(&self) -> Option<i32>
pub fn idle_timeout(&self) -> Option<i32>
The number of minutes when idle before the session times out.
Sourcepub fn profile_name(&self) -> Option<&str>
pub fn profile_name(&self) -> Option<&str>
The name of an Glue usage profile associated with the session.
Trait Implementations§
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);