pub struct RestoreDBClusterToPointInTime { /* private fields */ }
Expand description
Fluent builder constructing a request to RestoreDBClusterToPointInTime
.
Restores a cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime
for up to BackupRetentionPeriod
days. The target cluster is created from the source cluster with the same configuration as the original cluster, except that the new cluster is created with the default security group.
Implementations
sourceimpl RestoreDBClusterToPointInTime
impl RestoreDBClusterToPointInTime
sourcepub async fn send(
self
) -> Result<RestoreDbClusterToPointInTimeOutput, SdkError<RestoreDBClusterToPointInTimeError>>
pub async fn send(
self
) -> Result<RestoreDbClusterToPointInTimeOutput, SdkError<RestoreDBClusterToPointInTimeError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn db_cluster_identifier(self, input: impl Into<String>) -> Self
pub fn db_cluster_identifier(self, input: impl Into<String>) -> Self
The name of the new cluster to be created.
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.
sourcepub fn set_db_cluster_identifier(self, input: Option<String>) -> Self
pub fn set_db_cluster_identifier(self, input: Option<String>) -> Self
The name of the new cluster to be created.
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.
sourcepub fn source_db_cluster_identifier(self, input: impl Into<String>) -> Self
pub fn source_db_cluster_identifier(self, input: impl Into<String>) -> Self
The identifier of the source cluster from which to restore.
Constraints:
-
Must match the identifier of an existing
DBCluster
.
sourcepub fn set_source_db_cluster_identifier(self, input: Option<String>) -> Self
pub fn set_source_db_cluster_identifier(self, input: Option<String>) -> Self
The identifier of the source cluster from which to restore.
Constraints:
-
Must match the identifier of an existing
DBCluster
.
sourcepub fn restore_to_time(self, input: DateTime) -> Self
pub fn restore_to_time(self, input: DateTime) -> Self
The date and time to restore the cluster to.
Valid values: A time in Universal Coordinated Time (UTC) format.
Constraints:
-
Must be before the latest restorable time for the instance.
-
Must be specified if the
UseLatestRestorableTime
parameter is not provided. -
Cannot be specified if the
UseLatestRestorableTime
parameter istrue
. -
Cannot be specified if the
RestoreType
parameter iscopy-on-write
.
Example: 2015-03-07T23:45:00Z
sourcepub fn set_restore_to_time(self, input: Option<DateTime>) -> Self
pub fn set_restore_to_time(self, input: Option<DateTime>) -> Self
The date and time to restore the cluster to.
Valid values: A time in Universal Coordinated Time (UTC) format.
Constraints:
-
Must be before the latest restorable time for the instance.
-
Must be specified if the
UseLatestRestorableTime
parameter is not provided. -
Cannot be specified if the
UseLatestRestorableTime
parameter istrue
. -
Cannot be specified if the
RestoreType
parameter iscopy-on-write
.
Example: 2015-03-07T23:45:00Z
sourcepub fn use_latest_restorable_time(self, input: bool) -> Self
pub fn use_latest_restorable_time(self, input: bool) -> Self
A value that is set to true
to restore the cluster to the latest restorable backup time, and false
otherwise.
Default: false
Constraints: Cannot be specified if the RestoreToTime
parameter is provided.
sourcepub fn set_use_latest_restorable_time(self, input: Option<bool>) -> Self
pub fn set_use_latest_restorable_time(self, input: Option<bool>) -> Self
A value that is set to true
to restore the cluster to the latest restorable backup time, and false
otherwise.
Default: false
Constraints: Cannot be specified if the RestoreToTime
parameter is provided.
sourcepub fn port(self, input: i32) -> Self
pub fn port(self, input: i32) -> Self
The port number on which the new cluster accepts connections.
Constraints: Must be a value from 1150
to 65535
.
Default: The default port for the engine.
sourcepub fn set_port(self, input: Option<i32>) -> Self
pub fn set_port(self, input: Option<i32>) -> Self
The port number on which the new cluster accepts connections.
Constraints: Must be a value from 1150
to 65535
.
Default: The default port for the engine.
sourcepub fn db_subnet_group_name(self, input: impl Into<String>) -> Self
pub fn db_subnet_group_name(self, input: impl Into<String>) -> Self
The subnet group name to use for the new cluster.
Constraints: If provided, must match the name of an existing DBSubnetGroup
.
Example: mySubnetgroup
sourcepub fn set_db_subnet_group_name(self, input: Option<String>) -> Self
pub fn set_db_subnet_group_name(self, input: Option<String>) -> Self
The subnet group name 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, input: impl Into<String>) -> Self
pub fn vpc_security_group_ids(self, input: impl Into<String>) -> Self
Appends an item to VpcSecurityGroupIds
.
To override the contents of this collection use set_vpc_security_group_ids
.
A list of VPC security groups that the new cluster belongs to.
sourcepub fn set_vpc_security_group_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_vpc_security_group_ids(self, input: Option<Vec<String>>) -> Self
A list of VPC security groups that the new cluster belongs to.
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
The tags to be assigned to the restored cluster.
The tags to be assigned to the restored cluster.
sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
The KMS key identifier to use when restoring an encrypted cluster from an encrypted cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a cluster with the same 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.
You can restore to a new cluster and encrypt the new cluster with an KMS key that is different from the KMS key used to encrypt the source cluster. The new DB cluster is encrypted with the KMS key identified by the KmsKeyId
parameter.
If you do not specify a value for the KmsKeyId
parameter, then the following occurs:
-
If the cluster is encrypted, then the restored cluster is encrypted using the KMS key that was used to encrypt the source cluster.
-
If the cluster is not encrypted, then the restored cluster is not encrypted.
If DBClusterIdentifier
refers to a cluster that is not encrypted, then the restore request is rejected.
sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
The KMS key identifier to use when restoring an encrypted cluster from an encrypted cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a cluster with the same 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.
You can restore to a new cluster and encrypt the new cluster with an KMS key that is different from the KMS key used to encrypt the source cluster. The new DB cluster is encrypted with the KMS key identified by the KmsKeyId
parameter.
If you do not specify a value for the KmsKeyId
parameter, then the following occurs:
-
If the cluster is encrypted, then the restored cluster is encrypted using the KMS key that was used to encrypt the source cluster.
-
If the cluster is not encrypted, then the restored cluster is not encrypted.
If DBClusterIdentifier
refers to a cluster that is not encrypted, then the restore request is rejected.
sourcepub fn enable_cloudwatch_logs_exports(self, input: impl Into<String>) -> Self
pub fn enable_cloudwatch_logs_exports(self, input: impl Into<String>) -> Self
Appends an item to EnableCloudwatchLogsExports
.
To override the contents of this collection use set_enable_cloudwatch_logs_exports
.
A list of log types that must be enabled for exporting to Amazon CloudWatch Logs.
sourcepub fn set_enable_cloudwatch_logs_exports(
self,
input: Option<Vec<String>>
) -> Self
pub fn set_enable_cloudwatch_logs_exports(
self,
input: Option<Vec<String>>
) -> Self
A list of log types that must be enabled for exporting to Amazon CloudWatch Logs.
sourcepub fn deletion_protection(self, input: bool) -> Self
pub fn deletion_protection(self, input: bool) -> Self
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 set_deletion_protection(self, input: Option<bool>) -> Self
pub fn set_deletion_protection(self, input: Option<bool>) -> Self
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.
Trait Implementations
sourceimpl Clone for RestoreDBClusterToPointInTime
impl Clone for RestoreDBClusterToPointInTime
sourcefn clone(&self) -> RestoreDBClusterToPointInTime
fn clone(&self) -> RestoreDBClusterToPointInTime
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for RestoreDBClusterToPointInTime
impl Send for RestoreDBClusterToPointInTime
impl Sync for RestoreDBClusterToPointInTime
impl Unpin for RestoreDBClusterToPointInTime
impl !UnwindSafe for RestoreDBClusterToPointInTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more