/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Lightsail { namespace Model { /** */ class CopySnapshotRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API CopySnapshotRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CopySnapshot"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline const Aws::String& GetSourceSnapshotName() const{ return m_sourceSnapshotName; } /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline bool SourceSnapshotNameHasBeenSet() const { return m_sourceSnapshotNameHasBeenSet; } /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline void SetSourceSnapshotName(const Aws::String& value) { m_sourceSnapshotNameHasBeenSet = true; m_sourceSnapshotName = value; } /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline void SetSourceSnapshotName(Aws::String&& value) { m_sourceSnapshotNameHasBeenSet = true; m_sourceSnapshotName = std::move(value); } /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline void SetSourceSnapshotName(const char* value) { m_sourceSnapshotNameHasBeenSet = true; m_sourceSnapshotName.assign(value); } /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline CopySnapshotRequest& WithSourceSnapshotName(const Aws::String& value) { SetSourceSnapshotName(value); return *this;} /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline CopySnapshotRequest& WithSourceSnapshotName(Aws::String&& value) { SetSourceSnapshotName(std::move(value)); return *this;} /** *

The name of the source manual snapshot to copy.

Constraint:

    *
  • Define this parameter only when copying a manual snapshot as another * manual snapshot.

*/ inline CopySnapshotRequest& WithSourceSnapshotName(const char* value) { SetSourceSnapshotName(value); return *this;} /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline const Aws::String& GetSourceResourceName() const{ return m_sourceResourceName; } /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline bool SourceResourceNameHasBeenSet() const { return m_sourceResourceNameHasBeenSet; } /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline void SetSourceResourceName(const Aws::String& value) { m_sourceResourceNameHasBeenSet = true; m_sourceResourceName = value; } /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline void SetSourceResourceName(Aws::String&& value) { m_sourceResourceNameHasBeenSet = true; m_sourceResourceName = std::move(value); } /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline void SetSourceResourceName(const char* value) { m_sourceResourceNameHasBeenSet = true; m_sourceResourceName.assign(value); } /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline CopySnapshotRequest& WithSourceResourceName(const Aws::String& value) { SetSourceResourceName(value); return *this;} /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline CopySnapshotRequest& WithSourceResourceName(Aws::String&& value) { SetSourceResourceName(std::move(value)); return *this;} /** *

The name of the source instance or disk from which the source automatic * snapshot was created.

Constraint:

*/ inline CopySnapshotRequest& WithSourceResourceName(const char* value) { SetSourceResourceName(value); return *this;} /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline const Aws::String& GetRestoreDate() const{ return m_restoreDate; } /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; } /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline void SetRestoreDate(const Aws::String& value) { m_restoreDateHasBeenSet = true; m_restoreDate = value; } /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline void SetRestoreDate(Aws::String&& value) { m_restoreDateHasBeenSet = true; m_restoreDate = std::move(value); } /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline void SetRestoreDate(const char* value) { m_restoreDateHasBeenSet = true; m_restoreDate.assign(value); } /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline CopySnapshotRequest& WithRestoreDate(const Aws::String& value) { SetRestoreDate(value); return *this;} /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline CopySnapshotRequest& WithRestoreDate(Aws::String&& value) { SetRestoreDate(std::move(value)); return *this;} /** *

The date of the source automatic snapshot to copy. Use the get auto * snapshots operation to identify the dates of the available automatic * snapshots.

Constraints:

  • Must be specified in * YYYY-MM-DD format.

  • This parameter cannot be * defined together with the use latest restorable auto snapshot * parameter. The restore date and use latest restorable auto * snapshot parameters are mutually exclusive.

  • Define this * parameter only when copying an automatic snapshot as a manual snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

*/ inline CopySnapshotRequest& WithRestoreDate(const char* value) { SetRestoreDate(value); return *this;} /** *

A Boolean value to indicate whether to use the latest available automatic * snapshot of the specified source instance or disk.

Constraints:

    *
  • This parameter cannot be defined together with the restore * date parameter. The use latest restorable auto snapshot and * restore date parameters are mutually exclusive.

  • *

    Define this parameter only when copying an automatic snapshot as a manual * snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline bool GetUseLatestRestorableAutoSnapshot() const{ return m_useLatestRestorableAutoSnapshot; } /** *

A Boolean value to indicate whether to use the latest available automatic * snapshot of the specified source instance or disk.

Constraints:

    *
  • This parameter cannot be defined together with the restore * date parameter. The use latest restorable auto snapshot and * restore date parameters are mutually exclusive.

  • *

    Define this parameter only when copying an automatic snapshot as a manual * snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; } /** *

A Boolean value to indicate whether to use the latest available automatic * snapshot of the specified source instance or disk.

Constraints:

    *
  • This parameter cannot be defined together with the restore * date parameter. The use latest restorable auto snapshot and * restore date parameters are mutually exclusive.

  • *

    Define this parameter only when copying an automatic snapshot as a manual * snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline void SetUseLatestRestorableAutoSnapshot(bool value) { m_useLatestRestorableAutoSnapshotHasBeenSet = true; m_useLatestRestorableAutoSnapshot = value; } /** *

A Boolean value to indicate whether to use the latest available automatic * snapshot of the specified source instance or disk.

Constraints:

    *
  • This parameter cannot be defined together with the restore * date parameter. The use latest restorable auto snapshot and * restore date parameters are mutually exclusive.

  • *

    Define this parameter only when copying an automatic snapshot as a manual * snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline CopySnapshotRequest& WithUseLatestRestorableAutoSnapshot(bool value) { SetUseLatestRestorableAutoSnapshot(value); return *this;} /** *

The name of the new manual snapshot to be created as a copy.

*/ inline const Aws::String& GetTargetSnapshotName() const{ return m_targetSnapshotName; } /** *

The name of the new manual snapshot to be created as a copy.

*/ inline bool TargetSnapshotNameHasBeenSet() const { return m_targetSnapshotNameHasBeenSet; } /** *

The name of the new manual snapshot to be created as a copy.

*/ inline void SetTargetSnapshotName(const Aws::String& value) { m_targetSnapshotNameHasBeenSet = true; m_targetSnapshotName = value; } /** *

The name of the new manual snapshot to be created as a copy.

*/ inline void SetTargetSnapshotName(Aws::String&& value) { m_targetSnapshotNameHasBeenSet = true; m_targetSnapshotName = std::move(value); } /** *

The name of the new manual snapshot to be created as a copy.

*/ inline void SetTargetSnapshotName(const char* value) { m_targetSnapshotNameHasBeenSet = true; m_targetSnapshotName.assign(value); } /** *

The name of the new manual snapshot to be created as a copy.

*/ inline CopySnapshotRequest& WithTargetSnapshotName(const Aws::String& value) { SetTargetSnapshotName(value); return *this;} /** *

The name of the new manual snapshot to be created as a copy.

*/ inline CopySnapshotRequest& WithTargetSnapshotName(Aws::String&& value) { SetTargetSnapshotName(std::move(value)); return *this;} /** *

The name of the new manual snapshot to be created as a copy.

*/ inline CopySnapshotRequest& WithTargetSnapshotName(const char* value) { SetTargetSnapshotName(value); return *this;} /** *

The Amazon Web Services Region where the source manual or automatic snapshot * is located.

*/ inline const RegionName& GetSourceRegion() const{ return m_sourceRegion; } /** *

The Amazon Web Services Region where the source manual or automatic snapshot * is located.

*/ inline bool SourceRegionHasBeenSet() const { return m_sourceRegionHasBeenSet; } /** *

The Amazon Web Services Region where the source manual or automatic snapshot * is located.

*/ inline void SetSourceRegion(const RegionName& value) { m_sourceRegionHasBeenSet = true; m_sourceRegion = value; } /** *

The Amazon Web Services Region where the source manual or automatic snapshot * is located.

*/ inline void SetSourceRegion(RegionName&& value) { m_sourceRegionHasBeenSet = true; m_sourceRegion = std::move(value); } /** *

The Amazon Web Services Region where the source manual or automatic snapshot * is located.

*/ inline CopySnapshotRequest& WithSourceRegion(const RegionName& value) { SetSourceRegion(value); return *this;} /** *

The Amazon Web Services Region where the source manual or automatic snapshot * is located.

*/ inline CopySnapshotRequest& WithSourceRegion(RegionName&& value) { SetSourceRegion(std::move(value)); return *this;} private: Aws::String m_sourceSnapshotName; bool m_sourceSnapshotNameHasBeenSet = false; Aws::String m_sourceResourceName; bool m_sourceResourceNameHasBeenSet = false; Aws::String m_restoreDate; bool m_restoreDateHasBeenSet = false; bool m_useLatestRestorableAutoSnapshot; bool m_useLatestRestorableAutoSnapshotHasBeenSet = false; Aws::String m_targetSnapshotName; bool m_targetSnapshotNameHasBeenSet = false; RegionName m_sourceRegion; bool m_sourceRegionHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws