Struct aws_sdk_elasticache::client::fluent_builders::CopySnapshot
source · pub struct CopySnapshot { /* private fields */ }
Expand description
Fluent builder constructing a request to CopySnapshot
.
Makes a copy of an existing snapshot.
This operation is valid for Redis only.
Users or groups that have permissions to use the CopySnapshot
operation can create their own Amazon S3 buckets and copy snapshots to it. To control access to your snapshots, use an IAM policy to control who has the ability to use the CopySnapshot
operation. For more information about using IAM to control the use of ElastiCache operations, see Exporting Snapshots and Authentication & Access Control.
You could receive the following error messages.
Error Messages
-
Error Message: The S3 bucket %s is outside of the region.
Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket in the ElastiCache User Guide.
-
Error Message: The S3 bucket %s does not exist.
Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket in the ElastiCache User Guide.
-
Error Message: The S3 bucket %s is not owned by the authenticated user.
Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket in the ElastiCache User Guide.
-
Error Message: The authenticated user does not have sufficient permissions to perform the desired activity.
Solution: Contact your system administrator to get the needed permissions.
-
Error Message: The S3 bucket %s already contains an object with key %s.
Solution: Give the
TargetSnapshotName
a new and unique value. If exporting a snapshot, you could alternatively create a new Amazon S3 bucket and use this same value forTargetSnapshotName
. -
Error Message: ElastiCache has not been granted READ permissions %s on the S3 Bucket.
Solution: Add List and Read permissions on the bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the ElastiCache User Guide.
-
Error Message: ElastiCache has not been granted WRITE permissions %s on the S3 Bucket.
Solution: Add Upload/Delete permissions on the bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the ElastiCache User Guide.
-
Error Message: ElastiCache has not been granted READ_ACP permissions %s on the S3 Bucket.
Solution: Add View Permissions on the bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the ElastiCache User Guide.
Implementations§
source§impl CopySnapshot
impl CopySnapshot
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CopySnapshot, AwsResponseRetryClassifier>, SdkError<CopySnapshotError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CopySnapshot, AwsResponseRetryClassifier>, SdkError<CopySnapshotError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<CopySnapshotOutput, SdkError<CopySnapshotError>>
pub async fn send(
self
) -> Result<CopySnapshotOutput, SdkError<CopySnapshotError>>
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 source_snapshot_name(self, input: impl Into<String>) -> Self
pub fn source_snapshot_name(self, input: impl Into<String>) -> Self
The name of an existing snapshot from which to make a copy.
sourcepub fn set_source_snapshot_name(self, input: Option<String>) -> Self
pub fn set_source_snapshot_name(self, input: Option<String>) -> Self
The name of an existing snapshot from which to make a copy.
sourcepub fn target_snapshot_name(self, input: impl Into<String>) -> Self
pub fn target_snapshot_name(self, input: impl Into<String>) -> Self
A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, therefore this name must be unique within its context - ElastiCache or an Amazon S3 bucket if exporting.
sourcepub fn set_target_snapshot_name(self, input: Option<String>) -> Self
pub fn set_target_snapshot_name(self, input: Option<String>) -> Self
A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, therefore this name must be unique within its context - ElastiCache or an Amazon S3 bucket if exporting.
sourcepub fn target_bucket(self, input: impl Into<String>) -> Self
pub fn target_bucket(self, input: impl Into<String>) -> Self
The Amazon S3 bucket to which the snapshot is exported. This parameter is used only when exporting a snapshot for external access.
When using this parameter to export a snapshot, be sure Amazon ElastiCache has the needed permissions to this S3 bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon ElastiCache User Guide.
For more information, see Exporting a Snapshot in the Amazon ElastiCache User Guide.
sourcepub fn set_target_bucket(self, input: Option<String>) -> Self
pub fn set_target_bucket(self, input: Option<String>) -> Self
The Amazon S3 bucket to which the snapshot is exported. This parameter is used only when exporting a snapshot for external access.
When using this parameter to export a snapshot, be sure Amazon ElastiCache has the needed permissions to this S3 bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon ElastiCache User Guide.
For more information, see Exporting a Snapshot in the Amazon ElastiCache User Guide.
sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
The ID of the KMS key used to encrypt the target snapshot.
sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
The ID of the KMS key used to encrypt the target snapshot.
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
Trait Implementations§
source§impl Clone for CopySnapshot
impl Clone for CopySnapshot
source§fn clone(&self) -> CopySnapshot
fn clone(&self) -> CopySnapshot
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more