/* * Copyright 2018-2023 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. */ package com.amazonaws.services.elasticache.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* Represents the input of a CopySnapshotMessage
operation.
*
* The name of an existing snapshot from which to make a copy. *
*/ private String sourceSnapshotName; /** ** 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. *
*/ private String targetSnapshotName; /** ** 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. *
*/ private String targetBucket; /** ** The ID of the KMS key used to encrypt the target snapshot. *
*/ private String kmsKeyId; /** ** 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. *
*/ private com.amazonaws.internal.SdkInternalList* The name of an existing snapshot from which to make a copy. *
* * @param sourceSnapshotName * The name of an existing snapshot from which to make a copy. */ public void setSourceSnapshotName(String sourceSnapshotName) { this.sourceSnapshotName = sourceSnapshotName; } /** ** The name of an existing snapshot from which to make a copy. *
* * @return The name of an existing snapshot from which to make a copy. */ public String getSourceSnapshotName() { return this.sourceSnapshotName; } /** ** The name of an existing snapshot from which to make a copy. *
* * @param sourceSnapshotName * The name of an existing snapshot from which to make a copy. * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotRequest withSourceSnapshotName(String sourceSnapshotName) { setSourceSnapshotName(sourceSnapshotName); return this; } /** ** 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. *
* * @param 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. */ public void setTargetSnapshotName(String targetSnapshotName) { this.targetSnapshotName = 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. *
* * @return 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. */ public String getTargetSnapshotName() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotRequest withTargetSnapshotName(String targetSnapshotName) { setTargetSnapshotName(targetSnapshotName); return this; } /** ** 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. *
* * @param 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 void setTargetBucket(String targetBucket) { this.targetBucket = 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. *
* * @return 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 getTargetBucket() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotRequest withTargetBucket(String targetBucket) { setTargetBucket(targetBucket); return this; } /** *
* The ID of the KMS key used to encrypt the target snapshot. *
* * @param kmsKeyId * The ID of the KMS key used to encrypt the target snapshot. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** ** The ID of the KMS key used to encrypt the target snapshot. *
* * @return The ID of the KMS key used to encrypt the target snapshot. */ public String getKmsKeyId() { return this.kmsKeyId; } /** ** The ID of the KMS key used to encrypt the target snapshot. *
* * @param kmsKeyId * The ID of the KMS key used to encrypt the target snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** ** 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. *
* * @return 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 java.util.List* 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. *
* * @param 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 void setTags(java.util.Collection* 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* 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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotRequest withTags(java.util.Collection