/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the elasticache-2015-02-02.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ElastiCache.Model
{
///
/// Container for the parameters to the CopySnapshot operation.
/// 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 for TargetSnapshotName
.
///
/// -
///
/// 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.
///
///
///
public partial class CopySnapshotRequest : AmazonElastiCacheRequest
{
private string _kmsKeyId;
private string _sourceSnapshotName;
private List _tags = new List();
private string _targetBucket;
private string _targetSnapshotName;
///
/// Gets and sets the property KmsKeyId.
///
/// The ID of the KMS key used to encrypt the target snapshot.
///
///
public string KmsKeyId
{
get { return this._kmsKeyId; }
set { this._kmsKeyId = value; }
}
// Check to see if KmsKeyId property is set
internal bool IsSetKmsKeyId()
{
return this._kmsKeyId != null;
}
///
/// Gets and sets the property SourceSnapshotName.
///
/// The name of an existing snapshot from which to make a copy.
///
///
[AWSProperty(Required=true)]
public string SourceSnapshotName
{
get { return this._sourceSnapshotName; }
set { this._sourceSnapshotName = value; }
}
// Check to see if SourceSnapshotName property is set
internal bool IsSetSourceSnapshotName()
{
return this._sourceSnapshotName != null;
}
///
/// Gets and sets the property 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.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property TargetBucket.
///
/// 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.
///
///
public string TargetBucket
{
get { return this._targetBucket; }
set { this._targetBucket = value; }
}
// Check to see if TargetBucket property is set
internal bool IsSetTargetBucket()
{
return this._targetBucket != null;
}
///
/// Gets and sets the property TargetSnapshotName.
///
/// 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.
///
///
[AWSProperty(Required=true)]
public string TargetSnapshotName
{
get { return this._targetSnapshotName; }
set { this._targetSnapshotName = value; }
}
// Check to see if TargetSnapshotName property is set
internal bool IsSetTargetSnapshotName()
{
return this._targetSnapshotName != null;
}
}
}