#[non_exhaustive]pub struct Cluster {Show 18 fields
pub cluster_name: Option<String>,
pub description: Option<String>,
pub cluster_arn: Option<String>,
pub total_nodes: Option<i32>,
pub active_nodes: Option<i32>,
pub node_type: Option<String>,
pub status: Option<String>,
pub cluster_discovery_endpoint: Option<Endpoint>,
pub node_ids_to_remove: Option<Vec<String>>,
pub nodes: Option<Vec<Node>>,
pub preferred_maintenance_window: Option<String>,
pub notification_configuration: Option<NotificationConfiguration>,
pub subnet_group: Option<String>,
pub security_groups: Option<Vec<SecurityGroupMembership>>,
pub iam_role_arn: Option<String>,
pub parameter_group: Option<ParameterGroupStatus>,
pub sse_description: Option<SseDescription>,
pub cluster_endpoint_encryption_type: Option<ClusterEndpointEncryptionType>,
}
Expand description
Contains all of the attributes of a specific DAX cluster.
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.cluster_name: Option<String>
The name of the DAX cluster.
description: Option<String>
The description of the cluster.
cluster_arn: Option<String>
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
total_nodes: Option<i32>
The total number of nodes in the cluster.
active_nodes: Option<i32>
The number of nodes in the cluster that are active (i.e., capable of serving requests).
node_type: Option<String>
The node type for the nodes in the cluster. (All nodes in a DAX cluster are of the same type.)
status: Option<String>
The current status of the cluster.
cluster_discovery_endpoint: Option<Endpoint>
The endpoint for this DAX cluster, consisting of a DNS name, a port number, and a URL. Applications should use the URL to configure the DAX client to find their cluster.
node_ids_to_remove: Option<Vec<String>>
A list of nodes to be removed from the cluster.
nodes: Option<Vec<Node>>
A list of nodes that are currently in the cluster.
preferred_maintenance_window: Option<String>
A range of time when maintenance of DAX cluster software will be performed. For example: sun:01:00-sun:09:00
. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window.
notification_configuration: Option<NotificationConfiguration>
Describes a notification topic and its status. Notification topics are used for publishing DAX events to subscribers using Amazon Simple Notification Service (SNS).
subnet_group: Option<String>
The subnet group where the DAX cluster is running.
security_groups: Option<Vec<SecurityGroupMembership>>
A list of security groups, and the status of each, for the nodes in the cluster.
iam_role_arn: Option<String>
A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.
parameter_group: Option<ParameterGroupStatus>
The parameter group being used by nodes in the cluster.
sse_description: Option<SseDescription>
The description of the server-side encryption status on the specified DAX cluster.
cluster_endpoint_encryption_type: Option<ClusterEndpointEncryptionType>
The type of encryption supported by the cluster's endpoint. Values are:
-
NONE
for no encryptionTLS
for Transport Layer Security
Implementations§
Source§impl Cluster
impl Cluster
Sourcepub fn cluster_name(&self) -> Option<&str>
pub fn cluster_name(&self) -> Option<&str>
The name of the DAX cluster.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
The description of the cluster.
Sourcepub fn cluster_arn(&self) -> Option<&str>
pub fn cluster_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
Sourcepub fn total_nodes(&self) -> Option<i32>
pub fn total_nodes(&self) -> Option<i32>
The total number of nodes in the cluster.
Sourcepub fn active_nodes(&self) -> Option<i32>
pub fn active_nodes(&self) -> Option<i32>
The number of nodes in the cluster that are active (i.e., capable of serving requests).
Sourcepub fn node_type(&self) -> Option<&str>
pub fn node_type(&self) -> Option<&str>
The node type for the nodes in the cluster. (All nodes in a DAX cluster are of the same type.)
Sourcepub fn cluster_discovery_endpoint(&self) -> Option<&Endpoint>
pub fn cluster_discovery_endpoint(&self) -> Option<&Endpoint>
The endpoint for this DAX cluster, consisting of a DNS name, a port number, and a URL. Applications should use the URL to configure the DAX client to find their cluster.
Sourcepub fn node_ids_to_remove(&self) -> &[String]
pub fn node_ids_to_remove(&self) -> &[String]
A list of nodes to be removed from the cluster.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .node_ids_to_remove.is_none()
.
Sourcepub fn nodes(&self) -> &[Node]
pub fn nodes(&self) -> &[Node]
A list of nodes that are currently in the cluster.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .nodes.is_none()
.
Sourcepub fn preferred_maintenance_window(&self) -> Option<&str>
pub fn preferred_maintenance_window(&self) -> Option<&str>
A range of time when maintenance of DAX cluster software will be performed. For example: sun:01:00-sun:09:00
. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window.
Sourcepub fn notification_configuration(&self) -> Option<&NotificationConfiguration>
pub fn notification_configuration(&self) -> Option<&NotificationConfiguration>
Describes a notification topic and its status. Notification topics are used for publishing DAX events to subscribers using Amazon Simple Notification Service (SNS).
Sourcepub fn subnet_group(&self) -> Option<&str>
pub fn subnet_group(&self) -> Option<&str>
The subnet group where the DAX cluster is running.
Sourcepub fn security_groups(&self) -> &[SecurityGroupMembership]
pub fn security_groups(&self) -> &[SecurityGroupMembership]
A list of security groups, and the status of each, for the nodes in the cluster.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .security_groups.is_none()
.
Sourcepub fn iam_role_arn(&self) -> Option<&str>
pub fn iam_role_arn(&self) -> Option<&str>
A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.
Sourcepub fn parameter_group(&self) -> Option<&ParameterGroupStatus>
pub fn parameter_group(&self) -> Option<&ParameterGroupStatus>
The parameter group being used by nodes in the cluster.
Sourcepub fn sse_description(&self) -> Option<&SseDescription>
pub fn sse_description(&self) -> Option<&SseDescription>
The description of the server-side encryption status on the specified DAX cluster.
Sourcepub fn cluster_endpoint_encryption_type(
&self,
) -> Option<&ClusterEndpointEncryptionType>
pub fn cluster_endpoint_encryption_type( &self, ) -> Option<&ClusterEndpointEncryptionType>
The type of encryption supported by the cluster's endpoint. Values are:
-
NONE
for no encryptionTLS
for Transport Layer Security
Trait Implementations§
impl StructuralPartialEq for Cluster
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnwindSafe for Cluster
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>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
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>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
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>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
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>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
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>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
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>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
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 underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
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);