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

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline const Aws::Vector& GetFilters() const{ return m_filters; } /** *

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; } /** *

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline void SetFilters(const Aws::Vector& value) { m_filtersHasBeenSet = true; m_filters = value; } /** *

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline void SetFilters(Aws::Vector&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); } /** *

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline DescribeSnapshotsRequest& WithFilters(const Aws::Vector& value) { SetFilters(value); return *this;} /** *

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline DescribeSnapshotsRequest& WithFilters(Aws::Vector&& value) { SetFilters(std::move(value)); return *this;} /** *

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline DescribeSnapshotsRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; } /** *

The filters.

  • description - A description of * the snapshot.

  • encrypted - Indicates whether the * snapshot is encrypted (true | false)

  • *

    owner-alias - The owner alias, from an Amazon-maintained list * (amazon). This is not the user-configured Amazon Web Services * account alias set using the IAM console. We recommend that you use the related * parameter instead of this filter.

  • owner-id - The * Amazon Web Services account ID of the owner. We recommend that you use the * related parameter instead of this filter.

  • * progress - The progress of the snapshot, as a percentage (for * example, 80%).

  • snapshot-id - The snapshot * ID.

  • start-time - The time stamp when the * snapshot was initiated.

  • status - The status of * the snapshot (pending | completed | * error).

  • storage-tier - The storage * tier of the snapshot (archive | standard).

  • *
  • tag:<key> - The key/value combination of a tag * assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the * key Owner and the value TeamA, specify * tag:Owner for the filter name and TeamA for the filter * value.

  • tag-key - The key of a tag assigned to * the resource. Use this filter to find all resources assigned a tag with a * specific key, regardless of the tag value.

  • * volume-id - The ID of the volume the snapshot is for.

  • *
  • volume-size - The size of the volume, in GiB.

  • *
*/ inline DescribeSnapshotsRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; } /** *

The maximum number of snapshots to return for this request. This value can be * between 5 and 1,000; if this value is larger than 1,000, only 1,000 results are * returned. If this parameter is not used, then the request returns all snapshots. * You cannot specify this parameter and the snapshot IDs parameter in the same * request. For more information, see Pagination.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The maximum number of snapshots to return for this request. This value can be * between 5 and 1,000; if this value is larger than 1,000, only 1,000 results are * returned. If this parameter is not used, then the request returns all snapshots. * You cannot specify this parameter and the snapshot IDs parameter in the same * request. For more information, see Pagination.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The maximum number of snapshots to return for this request. This value can be * between 5 and 1,000; if this value is larger than 1,000, only 1,000 results are * returned. If this parameter is not used, then the request returns all snapshots. * You cannot specify this parameter and the snapshot IDs parameter in the same * request. For more information, see Pagination.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The maximum number of snapshots to return for this request. This value can be * between 5 and 1,000; if this value is larger than 1,000, only 1,000 results are * returned. If this parameter is not used, then the request returns all snapshots. * You cannot specify this parameter and the snapshot IDs parameter in the same * request. For more information, see Pagination.

*/ inline DescribeSnapshotsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeSnapshotsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeSnapshotsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeSnapshotsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline const Aws::Vector& GetOwnerIds() const{ return m_ownerIds; } /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline bool OwnerIdsHasBeenSet() const { return m_ownerIdsHasBeenSet; } /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline void SetOwnerIds(const Aws::Vector& value) { m_ownerIdsHasBeenSet = true; m_ownerIds = value; } /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline void SetOwnerIds(Aws::Vector&& value) { m_ownerIdsHasBeenSet = true; m_ownerIds = std::move(value); } /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline DescribeSnapshotsRequest& WithOwnerIds(const Aws::Vector& value) { SetOwnerIds(value); return *this;} /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline DescribeSnapshotsRequest& WithOwnerIds(Aws::Vector&& value) { SetOwnerIds(std::move(value)); return *this;} /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline DescribeSnapshotsRequest& AddOwnerIds(const Aws::String& value) { m_ownerIdsHasBeenSet = true; m_ownerIds.push_back(value); return *this; } /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline DescribeSnapshotsRequest& AddOwnerIds(Aws::String&& value) { m_ownerIdsHasBeenSet = true; m_ownerIds.push_back(std::move(value)); return *this; } /** *

Scopes the results to snapshots with the specified owners. You can specify a * combination of Amazon Web Services account IDs, self, and * amazon.

*/ inline DescribeSnapshotsRequest& AddOwnerIds(const char* value) { m_ownerIdsHasBeenSet = true; m_ownerIds.push_back(value); return *this; } /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline const Aws::Vector& GetRestorableByUserIds() const{ return m_restorableByUserIds; } /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline bool RestorableByUserIdsHasBeenSet() const { return m_restorableByUserIdsHasBeenSet; } /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline void SetRestorableByUserIds(const Aws::Vector& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds = value; } /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline void SetRestorableByUserIds(Aws::Vector&& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds = std::move(value); } /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline DescribeSnapshotsRequest& WithRestorableByUserIds(const Aws::Vector& value) { SetRestorableByUserIds(value); return *this;} /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline DescribeSnapshotsRequest& WithRestorableByUserIds(Aws::Vector&& value) { SetRestorableByUserIds(std::move(value)); return *this;} /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline DescribeSnapshotsRequest& AddRestorableByUserIds(const Aws::String& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds.push_back(value); return *this; } /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline DescribeSnapshotsRequest& AddRestorableByUserIds(Aws::String&& value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds.push_back(std::move(value)); return *this; } /** *

The IDs of the Amazon Web Services accounts that can create volumes from the * snapshot.

*/ inline DescribeSnapshotsRequest& AddRestorableByUserIds(const char* value) { m_restorableByUserIdsHasBeenSet = true; m_restorableByUserIds.push_back(value); return *this; } /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline const Aws::Vector& GetSnapshotIds() const{ return m_snapshotIds; } /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline bool SnapshotIdsHasBeenSet() const { return m_snapshotIdsHasBeenSet; } /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline void SetSnapshotIds(const Aws::Vector& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds = value; } /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline void SetSnapshotIds(Aws::Vector&& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds = std::move(value); } /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline DescribeSnapshotsRequest& WithSnapshotIds(const Aws::Vector& value) { SetSnapshotIds(value); return *this;} /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline DescribeSnapshotsRequest& WithSnapshotIds(Aws::Vector&& value) { SetSnapshotIds(std::move(value)); return *this;} /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline DescribeSnapshotsRequest& AddSnapshotIds(const Aws::String& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds.push_back(value); return *this; } /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline DescribeSnapshotsRequest& AddSnapshotIds(Aws::String&& value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds.push_back(std::move(value)); return *this; } /** *

The snapshot IDs.

Default: Describes the snapshots for which you have * create volume permissions.

*/ inline DescribeSnapshotsRequest& AddSnapshotIds(const char* value) { m_snapshotIdsHasBeenSet = true; m_snapshotIds.push_back(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 DescribeSnapshotsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::Vector m_filters; bool m_filtersHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; Aws::Vector m_ownerIds; bool m_ownerIdsHasBeenSet = false; Aws::Vector m_restorableByUserIds; bool m_restorableByUserIdsHasBeenSet = false; Aws::Vector m_snapshotIds; bool m_snapshotIdsHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws