/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Lightsail { namespace Model { /** */ class CreateDiskFromSnapshotRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API CreateDiskFromSnapshotRequest(); // 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 "CreateDiskFromSnapshot"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline const Aws::String& GetDiskName() const{ return m_diskName; } /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline bool DiskNameHasBeenSet() const { return m_diskNameHasBeenSet; } /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline void SetDiskName(const Aws::String& value) { m_diskNameHasBeenSet = true; m_diskName = value; } /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline void SetDiskName(Aws::String&& value) { m_diskNameHasBeenSet = true; m_diskName = std::move(value); } /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline void SetDiskName(const char* value) { m_diskNameHasBeenSet = true; m_diskName.assign(value); } /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline CreateDiskFromSnapshotRequest& WithDiskName(const Aws::String& value) { SetDiskName(value); return *this;} /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline CreateDiskFromSnapshotRequest& WithDiskName(Aws::String&& value) { SetDiskName(std::move(value)); return *this;} /** *

The unique Lightsail disk name (e.g., my-disk).

*/ inline CreateDiskFromSnapshotRequest& WithDiskName(const char* value) { SetDiskName(value); return *this;} /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline const Aws::String& GetDiskSnapshotName() const{ return m_diskSnapshotName; } /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline bool DiskSnapshotNameHasBeenSet() const { return m_diskSnapshotNameHasBeenSet; } /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline void SetDiskSnapshotName(const Aws::String& value) { m_diskSnapshotNameHasBeenSet = true; m_diskSnapshotName = value; } /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline void SetDiskSnapshotName(Aws::String&& value) { m_diskSnapshotNameHasBeenSet = true; m_diskSnapshotName = std::move(value); } /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline void SetDiskSnapshotName(const char* value) { m_diskSnapshotNameHasBeenSet = true; m_diskSnapshotName.assign(value); } /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline CreateDiskFromSnapshotRequest& WithDiskSnapshotName(const Aws::String& value) { SetDiskSnapshotName(value); return *this;} /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline CreateDiskFromSnapshotRequest& WithDiskSnapshotName(Aws::String&& value) { SetDiskSnapshotName(std::move(value)); return *this;} /** *

The name of the disk snapshot (e.g., my-snapshot) from which to * create the new storage disk.

Constraint:

  • This parameter * cannot be defined together with the source disk name parameter. The * disk snapshot name and source disk name parameters are * mutually exclusive.

*/ inline CreateDiskFromSnapshotRequest& WithDiskSnapshotName(const char* value) { SetDiskSnapshotName(value); return *this;} /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline CreateDiskFromSnapshotRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline CreateDiskFromSnapshotRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone where you want to create the disk (e.g., * us-east-2a). Choose the same Availability Zone as the Lightsail * instance where you want to create the disk.

Use the GetRegions operation * to list the Availability Zones where Lightsail is currently available.

*/ inline CreateDiskFromSnapshotRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The size of the disk in GB (e.g., 32).

*/ inline int GetSizeInGb() const{ return m_sizeInGb; } /** *

The size of the disk in GB (e.g., 32).

*/ inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; } /** *

The size of the disk in GB (e.g., 32).

*/ inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; } /** *

The size of the disk in GB (e.g., 32).

*/ inline CreateDiskFromSnapshotRequest& WithSizeInGb(int value) { SetSizeInGb(value); return *this;} /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateDiskFromSnapshotRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateDiskFromSnapshotRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateDiskFromSnapshotRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateDiskFromSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline const Aws::Vector& GetAddOns() const{ return m_addOns; } /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; } /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline void SetAddOns(const Aws::Vector& value) { m_addOnsHasBeenSet = true; m_addOns = value; } /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline void SetAddOns(Aws::Vector&& value) { m_addOnsHasBeenSet = true; m_addOns = std::move(value); } /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline CreateDiskFromSnapshotRequest& WithAddOns(const Aws::Vector& value) { SetAddOns(value); return *this;} /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline CreateDiskFromSnapshotRequest& WithAddOns(Aws::Vector&& value) { SetAddOns(std::move(value)); return *this;} /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline CreateDiskFromSnapshotRequest& AddAddOns(const AddOnRequest& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(value); return *this; } /** *

An array of objects that represent the add-ons to enable for the new * disk.

*/ inline CreateDiskFromSnapshotRequest& AddAddOns(AddOnRequest&& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(std::move(value)); return *this; } /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline const Aws::String& GetSourceDiskName() const{ return m_sourceDiskName; } /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline bool SourceDiskNameHasBeenSet() const { return m_sourceDiskNameHasBeenSet; } /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline void SetSourceDiskName(const Aws::String& value) { m_sourceDiskNameHasBeenSet = true; m_sourceDiskName = value; } /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline void SetSourceDiskName(Aws::String&& value) { m_sourceDiskNameHasBeenSet = true; m_sourceDiskName = std::move(value); } /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline void SetSourceDiskName(const char* value) { m_sourceDiskNameHasBeenSet = true; m_sourceDiskName.assign(value); } /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline CreateDiskFromSnapshotRequest& WithSourceDiskName(const Aws::String& value) { SetSourceDiskName(value); return *this;} /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline CreateDiskFromSnapshotRequest& WithSourceDiskName(Aws::String&& value) { SetSourceDiskName(std::move(value)); return *this;} /** *

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

Constraints:

  • This parameter cannot be defined * together with the disk snapshot name parameter. The source * disk name and disk snapshot name parameters are mutually * exclusive.

  • Define this parameter only when creating a new disk * from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline CreateDiskFromSnapshotRequest& WithSourceDiskName(const char* value) { SetSourceDiskName(value); return *this;} /** *

The date of the automatic snapshot to use for the new disk. 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 creating a new disk from an automatic snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

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

The date of the automatic snapshot to use for the new disk. 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 creating a new disk from an automatic snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

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

The date of the automatic snapshot to use for the new disk. 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 creating a new disk from an automatic 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 automatic snapshot to use for the new disk. 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 creating a new disk from an automatic 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 automatic snapshot to use for the new disk. 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 creating a new disk from an automatic 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 automatic snapshot to use for the new disk. 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 creating a new disk from an automatic snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

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

The date of the automatic snapshot to use for the new disk. 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 creating a new disk from an automatic snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

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

The date of the automatic snapshot to use for the new disk. 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 creating a new disk from an automatic snapshot. For more * information, see the Amazon * Lightsail Developer Guide.

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

A Boolean value to indicate whether to use the latest available automatic * snapshot.

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 creating a * new disk from an automatic 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.

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 creating a * new disk from an automatic 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.

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 creating a * new disk from an automatic 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.

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 creating a * new disk from an automatic snapshot. For more information, see the Amazon * Lightsail Developer Guide.

*/ inline CreateDiskFromSnapshotRequest& WithUseLatestRestorableAutoSnapshot(bool value) { SetUseLatestRestorableAutoSnapshot(value); return *this;} private: Aws::String m_diskName; bool m_diskNameHasBeenSet = false; Aws::String m_diskSnapshotName; bool m_diskSnapshotNameHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; int m_sizeInGb; bool m_sizeInGbHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::Vector m_addOns; bool m_addOnsHasBeenSet = false; Aws::String m_sourceDiskName; bool m_sourceDiskNameHasBeenSet = false; Aws::String m_restoreDate; bool m_restoreDateHasBeenSet = false; bool m_useLatestRestorableAutoSnapshot; bool m_useLatestRestorableAutoSnapshotHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws