/** * 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 AWS_EC2_API DescribeSnapshotsRequest : public EC2Request { public: 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::String SerializePayload() const override; protected: 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 AWS account alias set * using the IAM console. We recommend that you use the related parameter instead * of this filter.

  • owner-id - The AWS 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).

  • 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 snapshot results returned by * DescribeSnapshots in paginated output. When this parameter is used, * DescribeSnapshots only returns MaxResults results in a * single page along with a NextToken response element. The remaining * results of the initial request can be seen by sending another * DescribeSnapshots request with the returned NextToken * value. This value can be between 5 and 1000; if MaxResults is given * a value larger than 1000, only 1000 results are returned. If this parameter is * not used, then DescribeSnapshots returns all results. You cannot * specify this parameter and the snapshot IDs parameter in the same request.

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

The maximum number of snapshot results returned by * DescribeSnapshots in paginated output. When this parameter is used, * DescribeSnapshots only returns MaxResults results in a * single page along with a NextToken response element. The remaining * results of the initial request can be seen by sending another * DescribeSnapshots request with the returned NextToken * value. This value can be between 5 and 1000; if MaxResults is given * a value larger than 1000, only 1000 results are returned. If this parameter is * not used, then DescribeSnapshots returns all results. You cannot * specify this parameter and the snapshot IDs parameter in the same request.

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

The maximum number of snapshot results returned by * DescribeSnapshots in paginated output. When this parameter is used, * DescribeSnapshots only returns MaxResults results in a * single page along with a NextToken response element. The remaining * results of the initial request can be seen by sending another * DescribeSnapshots request with the returned NextToken * value. This value can be between 5 and 1000; if MaxResults is given * a value larger than 1000, only 1000 results are returned. If this parameter is * not used, then DescribeSnapshots returns all results. You cannot * specify this parameter and the snapshot IDs parameter in the same request.

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

The maximum number of snapshot results returned by * DescribeSnapshots in paginated output. When this parameter is used, * DescribeSnapshots only returns MaxResults results in a * single page along with a NextToken response element. The remaining * results of the initial request can be seen by sending another * DescribeSnapshots request with the returned NextToken * value. This value can be between 5 and 1000; if MaxResults is given * a value larger than 1000, only 1000 results are returned. If this parameter is * not used, then DescribeSnapshots returns all results. You cannot * specify this parameter and the snapshot IDs parameter in the same request.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

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

The NextToken value returned from a previous paginated * DescribeSnapshots request where MaxResults was used * and the results exceeded the value of that parameter. Pagination continues from * the end of the previous results that returned the NextToken value. * This value is null when there are no more results to return.

*/ 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 AWS 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 AWS 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 AWS 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 AWS 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 AWS 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 AWS 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 AWS 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 AWS 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 AWS 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 AWS accounts that can create volumes from the snapshot.

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

The IDs of the AWS accounts that can create volumes from the snapshot.

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

The IDs of the AWS 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 AWS 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 AWS accounts that can create volumes from the snapshot.

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

The IDs of the AWS accounts that can create volumes from the snapshot.

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

The IDs of the AWS 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 AWS 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 AWS 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; int m_maxResults; bool m_maxResultsHasBeenSet; Aws::String m_nextToken; bool m_nextTokenHasBeenSet; Aws::Vector m_ownerIds; bool m_ownerIdsHasBeenSet; Aws::Vector m_restorableByUserIds; bool m_restorableByUserIdsHasBeenSet; Aws::Vector m_snapshotIds; bool m_snapshotIdsHasBeenSet; bool m_dryRun; bool m_dryRunHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws