#[non_exhaustive]pub struct RestoreDbClusterFromSnapshotInput {Show 16 fields
pub availability_zones: Option<Vec<String>>,
pub db_cluster_identifier: Option<String>,
pub snapshot_identifier: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub port: Option<i32>,
pub db_subnet_group_name: Option<String>,
pub vpc_security_group_ids: Option<Vec<String>>,
pub tags: Option<Vec<Tag>>,
pub kms_key_id: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub deletion_protection: Option<bool>,
pub db_cluster_parameter_group_name: Option<String>,
pub serverless_v2_scaling_configuration: Option<ServerlessV2ScalingConfiguration>,
pub storage_type: Option<String>,
pub network_type: Option<String>,
}Expand description
Represents the input to RestoreDBClusterFromSnapshot.
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.availability_zones: Option<Vec<String>>Provides the list of Amazon EC2 Availability Zones that instances in the restored DB cluster can be created in.
db_cluster_identifier: Option<String>The name of the cluster to create from the snapshot or cluster snapshot. This parameter isn't case sensitive.
Constraints:
-
Must contain from 1 to 63 letters, numbers, or hyphens.
-
The first character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-snapshot-id
snapshot_identifier: Option<String>The identifier for the snapshot or cluster snapshot to restore from.
You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot.
Constraints:
-
Must match the identifier of an existing snapshot.
engine: Option<String>The database engine to use for the new cluster.
Default: The same as source.
Constraint: Must be compatible with the engine of the source.
engine_version: Option<String>The version of the database engine to use for the new cluster.
port: Option<i32>The port number on which the new cluster accepts connections.
Constraints: Must be a value from 1150 to 65535.
Default: The same port as the original cluster.
db_subnet_group_name: Option<String>The name of the subnet group to use for the new cluster.
Constraints: If provided, must match the name of an existing DBSubnetGroup.
Example: mySubnetgroup
vpc_security_group_ids: Option<Vec<String>>A list of virtual private cloud (VPC) security groups that the new cluster will belong to.
The tags to be assigned to the restored cluster.
kms_key_id: Option<String>The KMS key identifier to use when restoring an encrypted cluster from a DB snapshot or cluster snapshot.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a cluster with the same Amazon Web Services account that owns the KMS encryption key used to encrypt the new cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If you do not specify a value for the KmsKeyId parameter, then the following occurs:
-
If the snapshot or cluster snapshot in
SnapshotIdentifieris encrypted, then the restored cluster is encrypted using the KMS key that was used to encrypt the snapshot or the cluster snapshot. -
If the snapshot or the cluster snapshot in
SnapshotIdentifieris not encrypted, then the restored DB cluster is not encrypted.
enable_cloudwatch_logs_exports: Option<Vec<String>>A list of log types that must be enabled for exporting to Amazon CloudWatch Logs.
deletion_protection: Option<bool>Specifies whether this cluster can be deleted. If DeletionProtection is enabled, the cluster cannot be deleted unless it is modified and DeletionProtection is disabled. DeletionProtection protects clusters from being accidentally deleted.
db_cluster_parameter_group_name: Option<String>The name of the DB cluster parameter group to associate with this DB cluster.
Type: String. Required: No.
If this argument is omitted, the default DB cluster parameter group is used. If supplied, must match the name of an existing default DB cluster parameter group. The string must consist of from 1 to 255 letters, numbers or hyphens. Its first character must be a letter, and it cannot end with a hyphen or contain two consecutive hyphens.
serverless_v2_scaling_configuration: Option<ServerlessV2ScalingConfiguration>Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.
storage_type: Option<String>The storage type to associate with the DB cluster.
For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.
Valid values for storage type - standard | iopt1
Default value is standard
network_type: Option<String>The network type of the cluster.
The network type is determined by the DBSubnetGroup specified for the cluster. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (DUAL).
For more information, see DocumentDB clusters in a VPC in the Amazon DocumentDB Developer Guide.
Valid Values: IPV4 | DUAL
Implementations§
Source§impl RestoreDbClusterFromSnapshotInput
impl RestoreDbClusterFromSnapshotInput
Sourcepub fn availability_zones(&self) -> &[String]
pub fn availability_zones(&self) -> &[String]
Provides the list of Amazon EC2 Availability Zones that instances in the restored DB cluster can be created in.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .availability_zones.is_none().
Sourcepub fn db_cluster_identifier(&self) -> Option<&str>
pub fn db_cluster_identifier(&self) -> Option<&str>
The name of the cluster to create from the snapshot or cluster snapshot. This parameter isn't case sensitive.
Constraints:
-
Must contain from 1 to 63 letters, numbers, or hyphens.
-
The first character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-snapshot-id
Sourcepub fn snapshot_identifier(&self) -> Option<&str>
pub fn snapshot_identifier(&self) -> Option<&str>
The identifier for the snapshot or cluster snapshot to restore from.
You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot.
Constraints:
-
Must match the identifier of an existing snapshot.
Sourcepub fn engine(&self) -> Option<&str>
pub fn engine(&self) -> Option<&str>
The database engine to use for the new cluster.
Default: The same as source.
Constraint: Must be compatible with the engine of the source.
Sourcepub fn engine_version(&self) -> Option<&str>
pub fn engine_version(&self) -> Option<&str>
The version of the database engine to use for the new cluster.
Sourcepub fn port(&self) -> Option<i32>
pub fn port(&self) -> Option<i32>
The port number on which the new cluster accepts connections.
Constraints: Must be a value from 1150 to 65535.
Default: The same port as the original cluster.
Sourcepub fn db_subnet_group_name(&self) -> Option<&str>
pub fn db_subnet_group_name(&self) -> Option<&str>
The name of the subnet group to use for the new cluster.
Constraints: If provided, must match the name of an existing DBSubnetGroup.
Example: mySubnetgroup
Sourcepub fn vpc_security_group_ids(&self) -> &[String]
pub fn vpc_security_group_ids(&self) -> &[String]
A list of virtual private cloud (VPC) security groups that the new cluster will belong to.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .vpc_security_group_ids.is_none().
The tags to be assigned to the restored 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 .tags.is_none().
Sourcepub fn kms_key_id(&self) -> Option<&str>
pub fn kms_key_id(&self) -> Option<&str>
The KMS key identifier to use when restoring an encrypted cluster from a DB snapshot or cluster snapshot.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a cluster with the same Amazon Web Services account that owns the KMS encryption key used to encrypt the new cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If you do not specify a value for the KmsKeyId parameter, then the following occurs:
-
If the snapshot or cluster snapshot in
SnapshotIdentifieris encrypted, then the restored cluster is encrypted using the KMS key that was used to encrypt the snapshot or the cluster snapshot. -
If the snapshot or the cluster snapshot in
SnapshotIdentifieris not encrypted, then the restored DB cluster is not encrypted.
Sourcepub fn enable_cloudwatch_logs_exports(&self) -> &[String]
pub fn enable_cloudwatch_logs_exports(&self) -> &[String]
A list of log types that must be enabled for exporting to Amazon CloudWatch Logs.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .enable_cloudwatch_logs_exports.is_none().
Sourcepub fn deletion_protection(&self) -> Option<bool>
pub fn deletion_protection(&self) -> Option<bool>
Specifies whether this cluster can be deleted. If DeletionProtection is enabled, the cluster cannot be deleted unless it is modified and DeletionProtection is disabled. DeletionProtection protects clusters from being accidentally deleted.
Sourcepub fn db_cluster_parameter_group_name(&self) -> Option<&str>
pub fn db_cluster_parameter_group_name(&self) -> Option<&str>
The name of the DB cluster parameter group to associate with this DB cluster.
Type: String. Required: No.
If this argument is omitted, the default DB cluster parameter group is used. If supplied, must match the name of an existing default DB cluster parameter group. The string must consist of from 1 to 255 letters, numbers or hyphens. Its first character must be a letter, and it cannot end with a hyphen or contain two consecutive hyphens.
Sourcepub fn serverless_v2_scaling_configuration(
&self,
) -> Option<&ServerlessV2ScalingConfiguration>
pub fn serverless_v2_scaling_configuration( &self, ) -> Option<&ServerlessV2ScalingConfiguration>
Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.
Sourcepub fn storage_type(&self) -> Option<&str>
pub fn storage_type(&self) -> Option<&str>
The storage type to associate with the DB cluster.
For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the Amazon DocumentDB Developer Guide.
Valid values for storage type - standard | iopt1
Default value is standard
Sourcepub fn network_type(&self) -> Option<&str>
pub fn network_type(&self) -> Option<&str>
The network type of the cluster.
The network type is determined by the DBSubnetGroup specified for the cluster. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (DUAL).
For more information, see DocumentDB clusters in a VPC in the Amazon DocumentDB Developer Guide.
Valid Values: IPV4 | DUAL
Source§impl RestoreDbClusterFromSnapshotInput
impl RestoreDbClusterFromSnapshotInput
Sourcepub fn builder() -> RestoreDbClusterFromSnapshotInputBuilder
pub fn builder() -> RestoreDbClusterFromSnapshotInputBuilder
Creates a new builder-style object to manufacture RestoreDbClusterFromSnapshotInput.
Trait Implementations§
Source§impl Clone for RestoreDbClusterFromSnapshotInput
impl Clone for RestoreDbClusterFromSnapshotInput
Source§fn clone(&self) -> RestoreDbClusterFromSnapshotInput
fn clone(&self) -> RestoreDbClusterFromSnapshotInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for RestoreDbClusterFromSnapshotInput
impl PartialEq for RestoreDbClusterFromSnapshotInput
Source§fn eq(&self, other: &RestoreDbClusterFromSnapshotInput) -> bool
fn eq(&self, other: &RestoreDbClusterFromSnapshotInput) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RestoreDbClusterFromSnapshotInput
Auto Trait Implementations§
impl Freeze for RestoreDbClusterFromSnapshotInput
impl RefUnwindSafe for RestoreDbClusterFromSnapshotInput
impl Send for RestoreDbClusterFromSnapshotInput
impl Sync for RestoreDbClusterFromSnapshotInput
impl Unpin for RestoreDbClusterFromSnapshotInput
impl UnwindSafe for RestoreDbClusterFromSnapshotInput
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);