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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The unique name of the source disk (e.g., Disk-Virginia-1).

*

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

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The name of the destination disk snapshot (e.g., * my-disk-snapshot) based on the source disk.

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

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline const Aws::String& GetInstanceName() const{ return m_instanceName; } /** *

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; } /** *

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; } /** *

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); } /** *

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); } /** *

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline CreateDiskSnapshotRequest& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;} /** *

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline CreateDiskSnapshotRequest& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;} /** *

The unique name of the source instance (e.g., * Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of * the instance's system volume is created.

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

* */ inline CreateDiskSnapshotRequest& WithInstanceName(const char* value) { SetInstanceName(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 CreateDiskSnapshotRequest& 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 CreateDiskSnapshotRequest& 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 CreateDiskSnapshotRequest& 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 CreateDiskSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_diskName; bool m_diskNameHasBeenSet = false; Aws::String m_diskSnapshotName; bool m_diskSnapshotNameHasBeenSet = false; Aws::String m_instanceName; bool m_instanceNameHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws