/** * 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 #include namespace Aws { namespace EC2 { namespace Model { /** */ class AWS_EC2_API CreateSnapshotsRequest : public EC2Request { public: CreateSnapshotsRequest(); // 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 "CreateSnapshots"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

A description propagated to every snapshot specified by the instance.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description propagated to every snapshot specified by the instance.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description propagated to every snapshot specified by the instance.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description propagated to every snapshot specified by the instance.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description propagated to every snapshot specified by the instance.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description propagated to every snapshot specified by the instance.

*/ inline CreateSnapshotsRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description propagated to every snapshot specified by the instance.

*/ inline CreateSnapshotsRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description propagated to every snapshot specified by the instance.

*/ inline CreateSnapshotsRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The instance to specify which volumes should be included in the * snapshots.

*/ inline const InstanceSpecification& GetInstanceSpecification() const{ return m_instanceSpecification; } /** *

The instance to specify which volumes should be included in the * snapshots.

*/ inline bool InstanceSpecificationHasBeenSet() const { return m_instanceSpecificationHasBeenSet; } /** *

The instance to specify which volumes should be included in the * snapshots.

*/ inline void SetInstanceSpecification(const InstanceSpecification& value) { m_instanceSpecificationHasBeenSet = true; m_instanceSpecification = value; } /** *

The instance to specify which volumes should be included in the * snapshots.

*/ inline void SetInstanceSpecification(InstanceSpecification&& value) { m_instanceSpecificationHasBeenSet = true; m_instanceSpecification = std::move(value); } /** *

The instance to specify which volumes should be included in the * snapshots.

*/ inline CreateSnapshotsRequest& WithInstanceSpecification(const InstanceSpecification& value) { SetInstanceSpecification(value); return *this;} /** *

The instance to specify which volumes should be included in the * snapshots.

*/ inline CreateSnapshotsRequest& WithInstanceSpecification(InstanceSpecification&& value) { SetInstanceSpecification(std::move(value)); return *this;} /** *

Tags to apply to every snapshot specified by the instance.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

Tags to apply to every snapshot specified by the instance.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

Tags to apply to every snapshot specified by the instance.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

Tags to apply to every snapshot specified by the instance.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

Tags to apply to every snapshot specified by the instance.

*/ inline CreateSnapshotsRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

Tags to apply to every snapshot specified by the instance.

*/ inline CreateSnapshotsRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

Tags to apply to every snapshot specified by the instance.

*/ inline CreateSnapshotsRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

Tags to apply to every snapshot specified by the instance.

*/ inline CreateSnapshotsRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline CreateSnapshotsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

Copies the tags from the specified volume to corresponding snapshot.

*/ inline const CopyTagsFromSource& GetCopyTagsFromSource() const{ return m_copyTagsFromSource; } /** *

Copies the tags from the specified volume to corresponding snapshot.

*/ inline bool CopyTagsFromSourceHasBeenSet() const { return m_copyTagsFromSourceHasBeenSet; } /** *

Copies the tags from the specified volume to corresponding snapshot.

*/ inline void SetCopyTagsFromSource(const CopyTagsFromSource& value) { m_copyTagsFromSourceHasBeenSet = true; m_copyTagsFromSource = value; } /** *

Copies the tags from the specified volume to corresponding snapshot.

*/ inline void SetCopyTagsFromSource(CopyTagsFromSource&& value) { m_copyTagsFromSourceHasBeenSet = true; m_copyTagsFromSource = std::move(value); } /** *

Copies the tags from the specified volume to corresponding snapshot.

*/ inline CreateSnapshotsRequest& WithCopyTagsFromSource(const CopyTagsFromSource& value) { SetCopyTagsFromSource(value); return *this;} /** *

Copies the tags from the specified volume to corresponding snapshot.

*/ inline CreateSnapshotsRequest& WithCopyTagsFromSource(CopyTagsFromSource&& value) { SetCopyTagsFromSource(std::move(value)); return *this;} private: Aws::String m_description; bool m_descriptionHasBeenSet; InstanceSpecification m_instanceSpecification; bool m_instanceSpecificationHasBeenSet; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet; bool m_dryRun; bool m_dryRunHasBeenSet; CopyTagsFromSource m_copyTagsFromSource; bool m_copyTagsFromSourceHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws